a game about throwing hammers made for the github game off
Diffstat (limited to 'fx/enemy_death.gd')
| -rw-r--r-- | fx/enemy_death.gd | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fx/enemy_death.gd b/fx/enemy_death.gd index 969eaff..510e518 100644 --- a/fx/enemy_death.gd +++ b/fx/enemy_death.gd @@ -3,12 +3,10 @@ extends Node2D const DustFx := preload("./dust.tscn") func _ready() -> void: - # print(global_position) randomize() - # print_stack() - # get_tree().paused = true var randv := func randv(): return Vector2(randf_range(-10, 10), randf_range(-10, 10)) for i in range(10): - var inst := Utils.instance_scene_on_main(DustFx, global_position + randv.call()) + var inst := Utils.instance_on_main(DustFx.instantiate()) as Node2D + inst.global_position = global_position + randv.call() if i == 9: inst.tree_exited.connect(queue_free) |