From a9d246ea6caa25d94e729f2aff8b64366b68b79c Mon Sep 17 00:00:00 2001 From: jmintb Date: Mon, 30 May 2016 22:34:59 +0200 Subject: Switched the space shooter demo from none fixed process to fixed process --- demos/2d/space_shooter/asteroid.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'demos/2d/space_shooter/asteroid.gd') 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") -- cgit v1.2.3