diff options
author | marcelofg55 <marcelofg55@gmail.com> | 2016-06-02 18:56:28 -0300 |
---|---|---|
committer | marcelofg55 <marcelofg55@gmail.com> | 2016-06-02 18:56:28 -0300 |
commit | 4e0f2389c3a79f1e558ee13e6d51e7dbe531368e (patch) | |
tree | a8bd2b831ae005a614d2a5c8a56ea4bccec3d59e /demos/2d/space_shooter/asteroid.gd | |
parent | bb223869e0d016d372d8f3d98b3d5680cc069368 (diff) | |
parent | bc25492e636a82a30d77aa1b37edede0a2a9182f (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'demos/2d/space_shooter/asteroid.gd')
-rw-r--r-- | demos/2d/space_shooter/asteroid.gd | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/demos/2d/space_shooter/asteroid.gd b/demos/2d/space_shooter/asteroid.gd index 9f6734e122..ab71f413eb 100644 --- a/demos/2d/space_shooter/asteroid.gd +++ b/demos/2d/space_shooter/asteroid.gd @@ -10,7 +10,7 @@ var speed_y = 0.0 var destroyed = false -func _process(delta): +func _fixed_process(delta): translate(Vector2(SPEED, speed_y)*delta) @@ -23,7 +23,7 @@ func destroy(): return destroyed = true get_node("anim").play("explode") - set_process(false) + set_fixed_process(false) get_node("sfx").play("sound_explode") # Accumulate points get_node("/root/game_state").points += 1 @@ -34,7 +34,7 @@ func is_enemy(): func _on_visibility_enter_screen(): - set_process(true) + set_fixed_process(true) # Make it spin! get_node("anim").play("spin") |