diff options
Diffstat (limited to 'demos/2d/isometric_light/shoot.gd')
-rw-r--r-- | demos/2d/isometric_light/shoot.gd | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/demos/2d/isometric_light/shoot.gd b/demos/2d/isometric_light/shoot.gd index 0486bbb658..b48d4ad34b 100644 --- a/demos/2d/isometric_light/shoot.gd +++ b/demos/2d/isometric_light/shoot.gd @@ -1,27 +1,21 @@ extends KinematicBody2D -# member variables here, example: -# var a=2 -# var b="textvar" - -var advance_dir=Vector2(1,0) +# Member variables const ADVANCE_SPEED = 500.0 -var hit=false +var advance_dir = Vector2(1, 0) +var hit = false + func _fixed_process(delta): - if (hit): return - move(advance_dir*delta*ADVANCE_SPEED) + move(advance_dir*delta*ADVANCE_SPEED) if (is_colliding()): get_node("anim").play("explode") - hit=true + hit = true + func _ready(): - # Initialization here set_fixed_process(true) - pass - - |