Control port 1.1
This commit is contained in:
@@ -18,7 +18,7 @@ collision/layers = 1
|
|||||||
collision/mask = 1
|
collision/mask = 1
|
||||||
collision/margin = 0.08
|
collision/margin = 0.08
|
||||||
script/script = ExtResource( 1 )
|
script/script = ExtResource( 1 )
|
||||||
speed_mult = 180
|
speed_mult = 200
|
||||||
|
|
||||||
[node name="MissileSprite" type="Sprite" parent="."]
|
[node name="MissileSprite" type="Sprite" parent="."]
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ func _ready():
|
|||||||
func _process(delta):
|
func _process(delta):
|
||||||
state.update(delta)
|
state.update(delta)
|
||||||
|
|
||||||
|
func _fixed_process(delta):
|
||||||
|
if state.has_method("fixed_update"):
|
||||||
|
state.fixed_process(delta)
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
print(event.type)
|
print(event.type)
|
||||||
@@ -90,6 +93,8 @@ class StateAiming:
|
|||||||
#var mouse_pos = base.get_global_mouse_pos()
|
#var mouse_pos = base.get_global_mouse_pos()
|
||||||
#cannon.look_at(mouse_pos)
|
#cannon.look_at(mouse_pos)
|
||||||
#cannon.set_rot(cannon.get_global_pos().angle_to_point(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
|
base.cannon_rotation += base.cannon_rot_dir
|
||||||
cannon.set_rot(deg2rad(base.cannon_rotation))
|
cannon.set_rot(deg2rad(base.cannon_rotation))
|
||||||
|
|
||||||
|
|||||||
@@ -92,9 +92,10 @@ func anim_finished():
|
|||||||
print(\"SETTING QTIME SACALE\")
|
print(\"SETTING QTIME SACALE\")
|
||||||
OS.set_time_scale(0)
|
OS.set_time_scale(0)
|
||||||
|
|
||||||
func on_button_clicked():
|
func _input(event):
|
||||||
OS.set_time_scale(1)
|
if(event.is_action_pressed(\"Coin\")):
|
||||||
hide()
|
OS.set_time_scale(1)
|
||||||
|
hide()
|
||||||
"
|
"
|
||||||
|
|
||||||
[node name="Node" type="Node"]
|
[node name="Node" type="Node"]
|
||||||
|
|||||||
Reference in New Issue
Block a user