godot/demos/2d/isometric_light/shoot.gd
Juan Linietsky 09489e3a78 lot of work on 2D lighting and isometric maps
added a new demo, isometric_light that does full isometric sorting,
lights, shadows, etc.
2015-03-09 02:34:56 -03:00

28 lines
392 B
GDScript

extends KinematicBody2D
# member variables here, example:
# var a=2
# var b="textvar"
var advance_dir=Vector2(1,0)
const ADVANCE_SPEED = 500.0
var hit=false
func _fixed_process(delta):
if (hit):
return
move(advance_dir*delta*ADVANCE_SPEED)
if (is_colliding()):
get_node("anim").play("explode")
hit=true
func _ready():
# Initialization here
set_fixed_process(true)
pass