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

@@ -18,7 +18,7 @@ collision/layers = 1
collision/mask = 1
collision/margin = 0.08
script/script = ExtResource( 1 )
speed_mult = 180
speed_mult = 200
[node name="MissileSprite" type="Sprite" parent="."]

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))

View File

@@ -92,7 +92,8 @@ func anim_finished():
print(\"SETTING QTIME SACALE\")
OS.set_time_scale(0)
func on_button_clicked():
func _input(event):
if(event.is_action_pressed(\"Coin\")):
OS.set_time_scale(1)
hide()
"