Control port 1.1

This commit is contained in:
Jan Groß
2017-11-18 11:51:50 +01:00
parent 8700a7c404
commit 3f78b986b1
3 changed files with 10 additions and 4 deletions

View File

@@ -20,6 +20,9 @@ func _ready():
func _process(delta):
state.update(delta)
func _fixed_process(delta):
if state.has_method("fixed_update"):
state.fixed_process(delta)
func _input(event):
print(event.type)
@@ -90,6 +93,8 @@ class StateAiming:
#var mouse_pos = base.get_global_mouse_pos()
#cannon.look_at(mouse_pos)
#cannon.set_rot(cannon.get_global_pos().angle_to_point(mouse_pos))
func fixed_process(delta):
base.cannon_rotation += base.cannon_rot_dir
cannon.set_rot(deg2rad(base.cannon_rotation))