initial commit
This commit is contained in:
18
scripts/PickupAnnounce.gd
Normal file
18
scripts/PickupAnnounce.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
extends Label
|
||||
|
||||
var rng = RandomNumberGenerator.new()
|
||||
const WIGGLE_SPEED = 100
|
||||
var pickuptext
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
self.visible = true
|
||||
text = pickuptext
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var lv_x = rng.randf_range(-10,10.0)
|
||||
var lv_y = rng.randf_range(-10.0,10.0)
|
||||
self.position = + Vector2(lv_x, lv_y) * (delta * WIGGLE_SPEED)
|
||||
await get_tree().create_timer(.6).timeout
|
||||
queue_free()
|
||||
Reference in New Issue
Block a user