forked from team-sg/hero-mark-2
fixed the bug affecting today's political climate
This commit is contained in:
parent
2ed1969ba1
commit
6a581b960c
2 changed files with 6 additions and 112 deletions
|
@ -1,7 +1,6 @@
|
||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
export var travel_time: float = 1.0
|
export var travel_time: float = 1.0
|
||||||
export var can_menu: bool = true
|
|
||||||
|
|
||||||
var selected_level: int = 0
|
var selected_level: int = 0
|
||||||
var made_selection: bool = false
|
var made_selection: bool = false
|
||||||
|
@ -97,9 +96,8 @@ func _input(event: InputEvent) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func _gui_input(event: InputEvent) -> void:
|
func _gui_input(event: InputEvent) -> void:
|
||||||
if event.is_action_pressed("ui_cancel") or event.is_action_pressed("pause") and $"%MenuPopup".visible == false:
|
if event.is_action_pressed("ui_cancel") or event.is_action_pressed("pause") && $"%MenuPopup".visible == false:
|
||||||
if can_menu:
|
animation_player.play("show_menu")
|
||||||
animation_player.play("show_menu")
|
|
||||||
if not made_selection: # player is walking around
|
if not made_selection: # player is walking around
|
||||||
if event.is_action_pressed("ui_accept"):
|
if event.is_action_pressed("ui_accept"):
|
||||||
_update_stats()
|
_update_stats()
|
||||||
|
@ -270,3 +268,6 @@ func _on_OptionsScreen_exit():
|
||||||
func _on_OptionsButton_button_down():
|
func _on_OptionsButton_button_down():
|
||||||
options_screen.visible = true
|
options_screen.visible = true
|
||||||
options_screen.focus()
|
options_screen.focus()
|
||||||
|
|
||||||
|
func _on_ResumeButton_button_down():
|
||||||
|
$MenuSounds.can_play = false
|
||||||
|
|
|
@ -133,18 +133,6 @@ tracks/5/keys = {
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ Vector2( 1, 1 ) ]
|
"values": [ Vector2( 1, 1 ) ]
|
||||||
}
|
}
|
||||||
tracks/6/type = "value"
|
|
||||||
tracks/6/path = NodePath(".:can_menu")
|
|
||||||
tracks/6/interp = 1
|
|
||||||
tracks/6/loop_wrap = true
|
|
||||||
tracks/6/imported = false
|
|
||||||
tracks/6/enabled = true
|
|
||||||
tracks/6/keys = {
|
|
||||||
"times": PoolRealArray( 0 ),
|
|
||||||
"transitions": PoolRealArray( 1 ),
|
|
||||||
"update": 1,
|
|
||||||
"values": [ true ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=16]
|
[sub_resource type="Animation" id=16]
|
||||||
resource_name = "hide_boss"
|
resource_name = "hide_boss"
|
||||||
|
@ -173,18 +161,6 @@ tracks/1/keys = {
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ Vector2( 1, 1 ), Vector2( 1, 0.04 ), Vector2( 0, 0.04 ) ]
|
"values": [ Vector2( 1, 1 ), Vector2( 1, 0.04 ), Vector2( 0, 0.04 ) ]
|
||||||
}
|
}
|
||||||
tracks/2/type = "value"
|
|
||||||
tracks/2/path = NodePath(".:can_menu")
|
|
||||||
tracks/2/interp = 1
|
|
||||||
tracks/2/loop_wrap = true
|
|
||||||
tracks/2/imported = false
|
|
||||||
tracks/2/enabled = true
|
|
||||||
tracks/2/keys = {
|
|
||||||
"times": PoolRealArray( 0.4 ),
|
|
||||||
"transitions": PoolRealArray( 1 ),
|
|
||||||
"update": 1,
|
|
||||||
"values": [ true ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=11]
|
[sub_resource type="Animation" id=11]
|
||||||
resource_name = "hide_exit"
|
resource_name = "hide_exit"
|
||||||
|
@ -238,18 +214,6 @@ tracks/3/keys = {
|
||||||
"transitions": PoolRealArray( ),
|
"transitions": PoolRealArray( ),
|
||||||
"values": [ ]
|
"values": [ ]
|
||||||
}
|
}
|
||||||
tracks/4/type = "value"
|
|
||||||
tracks/4/path = NodePath(".:can_menu")
|
|
||||||
tracks/4/interp = 1
|
|
||||||
tracks/4/loop_wrap = true
|
|
||||||
tracks/4/imported = false
|
|
||||||
tracks/4/enabled = true
|
|
||||||
tracks/4/keys = {
|
|
||||||
"times": PoolRealArray( 0.4 ),
|
|
||||||
"transitions": PoolRealArray( 1 ),
|
|
||||||
"update": 1,
|
|
||||||
"values": [ true ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=13]
|
[sub_resource type="Animation" id=13]
|
||||||
resource_name = "hide_menu"
|
resource_name = "hide_menu"
|
||||||
|
@ -292,18 +256,6 @@ tracks/2/keys = {
|
||||||
"method": "grab_focus"
|
"method": "grab_focus"
|
||||||
} ]
|
} ]
|
||||||
}
|
}
|
||||||
tracks/3/type = "value"
|
|
||||||
tracks/3/path = NodePath(".:can_menu")
|
|
||||||
tracks/3/interp = 1
|
|
||||||
tracks/3/loop_wrap = true
|
|
||||||
tracks/3/imported = false
|
|
||||||
tracks/3/enabled = true
|
|
||||||
tracks/3/keys = {
|
|
||||||
"times": PoolRealArray( 0.4 ),
|
|
||||||
"transitions": PoolRealArray( 1 ),
|
|
||||||
"update": 1,
|
|
||||||
"values": [ true ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=8]
|
[sub_resource type="Animation" id=8]
|
||||||
resource_name = "hide_stats"
|
resource_name = "hide_stats"
|
||||||
|
@ -332,18 +284,6 @@ tracks/1/keys = {
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ Vector2( 1, 1 ), Vector2( 1, 0.02 ), Vector2( 0, 0.02 ) ]
|
"values": [ Vector2( 1, 1 ), Vector2( 1, 0.02 ), Vector2( 0, 0.02 ) ]
|
||||||
}
|
}
|
||||||
tracks/2/type = "value"
|
|
||||||
tracks/2/path = NodePath(".:can_menu")
|
|
||||||
tracks/2/interp = 1
|
|
||||||
tracks/2/loop_wrap = true
|
|
||||||
tracks/2/imported = false
|
|
||||||
tracks/2/enabled = true
|
|
||||||
tracks/2/keys = {
|
|
||||||
"times": PoolRealArray( 0.4 ),
|
|
||||||
"transitions": PoolRealArray( 1 ),
|
|
||||||
"update": 1,
|
|
||||||
"values": [ true ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=17]
|
[sub_resource type="Animation" id=17]
|
||||||
resource_name = "show_boss"
|
resource_name = "show_boss"
|
||||||
|
@ -372,18 +312,6 @@ tracks/1/keys = {
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ Vector2( 0, 0.04 ), Vector2( 1, 0.04 ), Vector2( 1, 1 ) ]
|
"values": [ Vector2( 0, 0.04 ), Vector2( 1, 0.04 ), Vector2( 1, 1 ) ]
|
||||||
}
|
}
|
||||||
tracks/2/type = "value"
|
|
||||||
tracks/2/path = NodePath(".:can_menu")
|
|
||||||
tracks/2/interp = 1
|
|
||||||
tracks/2/loop_wrap = true
|
|
||||||
tracks/2/imported = false
|
|
||||||
tracks/2/enabled = true
|
|
||||||
tracks/2/keys = {
|
|
||||||
"times": PoolRealArray( 0 ),
|
|
||||||
"transitions": PoolRealArray( 1 ),
|
|
||||||
"update": 1,
|
|
||||||
"values": [ false ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=12]
|
[sub_resource type="Animation" id=12]
|
||||||
resource_name = "show_exit"
|
resource_name = "show_exit"
|
||||||
|
@ -426,18 +354,6 @@ tracks/2/keys = {
|
||||||
"method": "grab_focus"
|
"method": "grab_focus"
|
||||||
} ]
|
} ]
|
||||||
}
|
}
|
||||||
tracks/3/type = "value"
|
|
||||||
tracks/3/path = NodePath(".:can_menu")
|
|
||||||
tracks/3/interp = 1
|
|
||||||
tracks/3/loop_wrap = true
|
|
||||||
tracks/3/imported = false
|
|
||||||
tracks/3/enabled = true
|
|
||||||
tracks/3/keys = {
|
|
||||||
"times": PoolRealArray( 0 ),
|
|
||||||
"transitions": PoolRealArray( 1 ),
|
|
||||||
"update": 1,
|
|
||||||
"values": [ false ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=14]
|
[sub_resource type="Animation" id=14]
|
||||||
resource_name = "show_menu"
|
resource_name = "show_menu"
|
||||||
|
@ -480,18 +396,6 @@ tracks/2/keys = {
|
||||||
"method": "grab_focus"
|
"method": "grab_focus"
|
||||||
} ]
|
} ]
|
||||||
}
|
}
|
||||||
tracks/3/type = "value"
|
|
||||||
tracks/3/path = NodePath(".:can_menu")
|
|
||||||
tracks/3/interp = 1
|
|
||||||
tracks/3/loop_wrap = true
|
|
||||||
tracks/3/imported = false
|
|
||||||
tracks/3/enabled = true
|
|
||||||
tracks/3/keys = {
|
|
||||||
"times": PoolRealArray( 0 ),
|
|
||||||
"transitions": PoolRealArray( 1 ),
|
|
||||||
"update": 1,
|
|
||||||
"values": [ false ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=7]
|
[sub_resource type="Animation" id=7]
|
||||||
resource_name = "show_stats"
|
resource_name = "show_stats"
|
||||||
|
@ -520,18 +424,6 @@ tracks/1/keys = {
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ Vector2( 0, 0.02 ), Vector2( 1, 0.02 ), Vector2( 1, 1 ) ]
|
"values": [ Vector2( 0, 0.02 ), Vector2( 1, 0.02 ), Vector2( 1, 1 ) ]
|
||||||
}
|
}
|
||||||
tracks/2/type = "value"
|
|
||||||
tracks/2/path = NodePath(".:can_menu")
|
|
||||||
tracks/2/interp = 1
|
|
||||||
tracks/2/loop_wrap = true
|
|
||||||
tracks/2/imported = false
|
|
||||||
tracks/2/enabled = true
|
|
||||||
tracks/2/keys = {
|
|
||||||
"times": PoolRealArray( 0 ),
|
|
||||||
"transitions": PoolRealArray( 1 ),
|
|
||||||
"update": 1,
|
|
||||||
"values": [ false ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=18]
|
[sub_resource type="Animation" id=18]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
|
@ -1597,6 +1489,7 @@ visible = false
|
||||||
[node name="MenuSounds" parent="." instance=ExtResource( 19 )]
|
[node name="MenuSounds" parent="." instance=ExtResource( 19 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
|
[connection signal="button_down" from="MenuPopup/PanelContainer/VBoxContainer/Resume/ResumeButton" to="." method="_on_ResumeButton_button_down"]
|
||||||
[connection signal="button_down" from="MenuPopup/PanelContainer/VBoxContainer/Resume/ResumeButton" to="AnimationPlayer" method="play" binds= [ "hide_menu" ]]
|
[connection signal="button_down" from="MenuPopup/PanelContainer/VBoxContainer/Resume/ResumeButton" to="AnimationPlayer" method="play" binds= [ "hide_menu" ]]
|
||||||
[connection signal="button_down" from="MenuPopup/PanelContainer/VBoxContainer/Resume/ResumeButton" to="MenuSounds" method="play_confirm_sound"]
|
[connection signal="button_down" from="MenuPopup/PanelContainer/VBoxContainer/Resume/ResumeButton" to="MenuSounds" method="play_confirm_sound"]
|
||||||
[connection signal="focus_entered" from="MenuPopup/PanelContainer/VBoxContainer/Resume/ResumeButton" to="MenuSounds" method="play_select_sound"]
|
[connection signal="focus_entered" from="MenuPopup/PanelContainer/VBoxContainer/Resume/ResumeButton" to="MenuSounds" method="play_select_sound"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue