Control port 1.3
This commit is contained in:
@@ -18,12 +18,12 @@ stretch_mode="2d"
|
|||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
|
A=[jbutton(0, 9), key(Space)]
|
||||||
slow_motion=[key(Return)]
|
slow_motion=[key(Return)]
|
||||||
fire=[key(Space), mbutton(0, 1)]
|
fire=[key(Space), mbutton(0, 1)]
|
||||||
Start=[jbutton(0, 6)]
|
Start=[jbutton(0, 6)]
|
||||||
B=[jbutton(0, 8)]
|
B=[jbutton(0, 8)]
|
||||||
Coin=[jbutton(0, 7)]
|
Coin=[jbutton(0, 7)]
|
||||||
A=[jbutton(0, 9)]
|
|
||||||
Coin2=[jbutton(0, 4)]
|
Coin2=[jbutton(0, 4)]
|
||||||
Select=[jbutton(0, 5)]
|
Select=[jbutton(0, 5)]
|
||||||
Y=[jbutton(0, 10)]
|
Y=[jbutton(0, 10)]
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class StateAiming:
|
|||||||
cannon.set_rot(deg2rad(base.cannon_rotation))
|
cannon.set_rot(deg2rad(base.cannon_rotation))
|
||||||
|
|
||||||
func input(event):
|
func input(event):
|
||||||
if event.is_action_pressed("slow_motion"):
|
if event.is_action_pressed("slow_motion") or event.is_action_pressed("X"):
|
||||||
OS.set_time_scale(0.15)
|
OS.set_time_scale(0.15)
|
||||||
if event.is_action_released("fire") or event.is_action_released("A") and reload_timer <= 0:
|
if event.is_action_released("fire") or event.is_action_released("A") and reload_timer <= 0:
|
||||||
print("We fire")
|
print("We fire")
|
||||||
|
|||||||
@@ -46,11 +46,18 @@ func update_value(val):
|
|||||||
[sub_resource type="GDScript" id=4]
|
[sub_resource type="GDScript" id=4]
|
||||||
|
|
||||||
script/source = "extends TextureButton
|
script/source = "extends TextureButton
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
connect(\"button_down\", self, \"restart\")
|
set_process_input(true)
|
||||||
|
|
||||||
game_manager.update_ui()
|
game_manager.update_ui()
|
||||||
connect(\"visibility_changed\", self, \"on_visibility_changed\")
|
connect(\"visibility_changed\", self, \"on_visibility_changed\")
|
||||||
|
|
||||||
|
func _input(event):
|
||||||
|
if is_visible():
|
||||||
|
if event.is_action_pressed(\"Coin\") or event.is_action_pressed(\"Coin2\"):
|
||||||
|
restart()
|
||||||
|
|
||||||
func on_visibility_changed():
|
func on_visibility_changed():
|
||||||
randomize()
|
randomize()
|
||||||
print(\"WE ARE NOW VISIBLE? %s\" % is_visible())
|
print(\"WE ARE NOW VISIBLE? %s\" % is_visible())
|
||||||
|
|||||||
Reference in New Issue
Block a user