imported main menu scene addon
This commit is contained in:
50
evolve-die-repeat/scenes/menus/main_menu/main_menu.gd
Normal file
50
evolve-die-repeat/scenes/menus/main_menu/main_menu.gd
Normal file
@@ -0,0 +1,50 @@
|
||||
extends MainMenu
|
||||
## Main menu extension that adds options.
|
||||
## The scene adds a 'Continue' button if a game is in progress.
|
||||
|
||||
## Optional scene to open when the player clicks a 'Level Select' button.
|
||||
@export var level_select_packed_scene: PackedScene
|
||||
## If true, have the player confirm before starting a new game if a game is in progress.
|
||||
@export var confirm_new_game : bool = true
|
||||
|
||||
@onready var continue_game_button = %ContinueGameButton
|
||||
@onready var level_select_button = %LevelSelectButton
|
||||
@onready var new_game_confirmation = %NewGameConfirmation
|
||||
|
||||
func load_game_scene() -> void:
|
||||
GameState.start_game()
|
||||
super.load_game_scene()
|
||||
|
||||
func new_game() -> void:
|
||||
if confirm_new_game and continue_game_button.visible:
|
||||
new_game_confirmation.show()
|
||||
else:
|
||||
GameState.reset()
|
||||
load_game_scene()
|
||||
|
||||
func _add_level_select_if_set() -> void:
|
||||
if level_select_packed_scene == null: return
|
||||
if GameState.get_levels_reached() <= 1 : return
|
||||
level_select_button.show()
|
||||
|
||||
func _show_continue_if_set() -> void:
|
||||
if GameState.get_current_level_path().is_empty(): return
|
||||
continue_game_button.show()
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
_add_level_select_if_set()
|
||||
_show_continue_if_set()
|
||||
|
||||
func _on_continue_game_button_pressed() -> void:
|
||||
GameState.continue_game()
|
||||
load_game_scene()
|
||||
|
||||
func _on_level_select_button_pressed() -> void:
|
||||
var level_select_scene := _open_sub_menu(level_select_packed_scene)
|
||||
if level_select_scene.has_signal("level_selected"):
|
||||
level_select_scene.connect("level_selected", load_game_scene)
|
||||
|
||||
func _on_new_game_confirmation_confirmed() -> void:
|
||||
GameState.reset()
|
||||
load_game_scene()
|
||||
@@ -0,0 +1 @@
|
||||
uid://djw25uvv3uu1f
|
||||
44
evolve-die-repeat/scenes/menus/main_menu/main_menu.tscn
Normal file
44
evolve-die-repeat/scenes/menus/main_menu/main_menu.tscn
Normal file
@@ -0,0 +1,44 @@
|
||||
[gd_scene format=3 uid="uid://xci60pu6vaeq"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_game_template/base/nodes/menus/main_menu/main_menu.tscn" id="1_ub2bi"]
|
||||
[ext_resource type="Script" path="res://scenes/menus/main_menu/main_menu.gd" id="2_x31ro"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/windows/main_menu_options_window.tscn" id="3_0jpat"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/windows/main_menu_credits_window.tscn" id="4_m0ubd"]
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_game_template/base/nodes/windows/confirmation_overlaid_window.tscn" id="5_627ab"]
|
||||
|
||||
[node name="MainMenu" unique_id=869232425 instance=ExtResource("1_ub2bi")]
|
||||
script = ExtResource("2_x31ro")
|
||||
level_select_packed_scene = null
|
||||
confirm_new_game = true
|
||||
options_packed_scene = ExtResource("3_0jpat")
|
||||
credits_packed_scene = ExtResource("4_m0ubd")
|
||||
|
||||
[node name="ContinueGameButton" type="Button" parent="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer" parent_id_path=PackedInt32Array(2017477786) index="1" unique_id=1495566523]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Continue"
|
||||
|
||||
[node name="LevelSelectButton" type="Button" parent="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer" parent_id_path=PackedInt32Array(2017477786) index="2" unique_id=1348895676]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Level Select"
|
||||
|
||||
[node name="NewGameConfirmation" parent="." index="5" unique_id=487332143 instance=ExtResource("5_627ab")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(420, 200)
|
||||
layout_mode = 1
|
||||
offset_left = -210.0
|
||||
offset_top = -100.0
|
||||
offset_right = 210.0
|
||||
offset_bottom = 100.0
|
||||
text = "Are you sure you want to start a new game?
|
||||
|
||||
All progress in the current game will be lost."
|
||||
title = "New Game"
|
||||
|
||||
[connection signal="pressed" from="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer/ContinueGameButton" to="." method="_on_continue_game_button_pressed"]
|
||||
[connection signal="pressed" from="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer/LevelSelectButton" to="." method="_on_level_select_button_pressed"]
|
||||
[connection signal="confirmed" from="NewGameConfirmation" to="." method="_on_new_game_confirmation_confirmed"]
|
||||
@@ -0,0 +1,80 @@
|
||||
extends MainMenu
|
||||
## Main menu extension that adds options and animates the title and menu fading in.
|
||||
## The scene adds a 'Continue' button if a game is in progress.
|
||||
## The animation can be skipped by the player with any input.
|
||||
|
||||
## Optional scene to open when the player clicks a 'Level Select' button.
|
||||
@export var level_select_packed_scene: PackedScene
|
||||
## If true, have the player confirm before starting a new game if a game is in progress.
|
||||
@export var confirm_new_game : bool = true
|
||||
|
||||
var animation_state_machine : AnimationNodeStateMachinePlayback
|
||||
|
||||
@onready var continue_game_button = %ContinueGameButton
|
||||
@onready var level_select_button = %LevelSelectButton
|
||||
@onready var new_game_confirmation = %NewGameConfirmation
|
||||
|
||||
func load_game_scene() -> void:
|
||||
GameState.start_game()
|
||||
super.load_game_scene()
|
||||
|
||||
func new_game() -> void:
|
||||
if confirm_new_game and continue_game_button.visible:
|
||||
new_game_confirmation.show()
|
||||
else:
|
||||
GameState.reset()
|
||||
load_game_scene()
|
||||
|
||||
func intro_done() -> void:
|
||||
animation_state_machine.travel("OpenMainMenu")
|
||||
|
||||
func _is_in_intro() -> bool:
|
||||
return animation_state_machine.get_current_node() == "Intro"
|
||||
|
||||
func _event_skips_intro(event : InputEvent) -> bool:
|
||||
return event.is_action_released("ui_accept") or \
|
||||
event.is_action_released("ui_select") or \
|
||||
event.is_action_released("ui_cancel") or \
|
||||
_event_is_mouse_button_released(event)
|
||||
|
||||
func _open_sub_menu(menu : PackedScene) -> Node:
|
||||
animation_state_machine.travel("OpenSubMenu")
|
||||
return super._open_sub_menu(menu)
|
||||
|
||||
func _close_sub_menu() -> void:
|
||||
super._close_sub_menu()
|
||||
animation_state_machine.travel("OpenMainMenu")
|
||||
|
||||
func _input(event : InputEvent) -> void:
|
||||
if _is_in_intro() and _event_skips_intro(event):
|
||||
intro_done()
|
||||
return
|
||||
super._input(event)
|
||||
|
||||
func _show_level_select_if_set() -> void:
|
||||
if level_select_packed_scene == null: return
|
||||
if GameState.get_levels_reached() <= 1 : return
|
||||
level_select_button.show()
|
||||
|
||||
func _show_continue_if_set() -> void:
|
||||
if GameState.get_current_level_path().is_empty(): return
|
||||
continue_game_button.show()
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
_show_level_select_if_set()
|
||||
_show_continue_if_set()
|
||||
animation_state_machine = $MenuAnimationTree.get("parameters/playback")
|
||||
|
||||
func _on_continue_game_button_pressed() -> void:
|
||||
GameState.continue_game()
|
||||
load_game_scene()
|
||||
|
||||
func _on_level_select_button_pressed() -> void:
|
||||
var level_select_scene := _open_sub_menu(level_select_packed_scene)
|
||||
if level_select_scene.has_signal("level_selected"):
|
||||
level_select_scene.connect("level_selected", load_game_scene)
|
||||
|
||||
func _on_new_game_confirmation_confirmed() -> void:
|
||||
GameState.reset()
|
||||
load_game_scene()
|
||||
@@ -0,0 +1 @@
|
||||
uid://6itnsrcgk2wu
|
||||
@@ -0,0 +1,385 @@
|
||||
[gd_scene format=3 uid="uid://bq4y2g0eurewb"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_game_template/base/nodes/menus/main_menu/main_menu.tscn" id="1_sr523"]
|
||||
[ext_resource type="Script" path="res://scenes/menus/main_menu/main_menu_with_animations.gd" id="2_ixa71"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/windows/main_menu_options_window.tscn" id="3_2k5l7"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/windows/main_menu_credits_window.tscn" id="4_vsp5b"]
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_game_template/base/nodes/windows/confirmation_overlaid_window.tscn" id="5_6xh1d"]
|
||||
|
||||
[sub_resource type="Animation" id="1"]
|
||||
resource_name = "Intro"
|
||||
length = 2.4
|
||||
tracks/0/type = "method"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(2.4),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"intro_done"
|
||||
}]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("MenuContainer/TitleMargin/TitleContainer:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.8),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("MenuContainer/SubTitleMargin/SubTitleContainer:modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.8, 1.6),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer:modulate")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0, 1.6, 2.4),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("MouseFilter:mouse_filter")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 2.4),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [0, 2]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("VersionMargin/VersionContainer:modulate")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0, 1.6, 2.4),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="6"]
|
||||
resource_name = "OpenMainMenu"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("MenuContainer/TitleMargin/TitleContainer:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("MenuContainer/SubTitleMargin/SubTitleContainer:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer:modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("MouseFilter:mouse_filter")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [2]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("MenuContainer:modulate")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("VersionMargin/VersionContainer:modulate")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer:lock")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="4"]
|
||||
resource_name = "OpenSubMenu"
|
||||
length = 0.2
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("MenuContainer:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="2"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("MenuContainer/TitleMargin/TitleContainer:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("MenuContainer/SubTitleMargin/SubTitleContainer:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer:modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("MouseFilter:mouse_filter")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [2]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("MenuContainer:modulate")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("VersionMargin/VersionContainer:modulate")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer:lock")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_2kqig"]
|
||||
_data = {
|
||||
&"Intro": SubResource("1"),
|
||||
&"OpenMainMenu": SubResource("6"),
|
||||
&"OpenSubMenu": SubResource("4"),
|
||||
&"RESET": SubResource("2")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="7"]
|
||||
animation = &"Intro"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="10"]
|
||||
animation = &"OpenMainMenu"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="13"]
|
||||
animation = &"OpenSubMenu"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="11"]
|
||||
advance_condition = &"intro_done"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="14"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_j0orr"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_63dxc"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_vikuh"]
|
||||
states/End/position = Vector2(958, 123)
|
||||
states/Intro/node = SubResource("7")
|
||||
states/Intro/position = Vector2(259, 123)
|
||||
states/OpenMainMenu/node = SubResource("10")
|
||||
states/OpenMainMenu/position = Vector2(472, 123)
|
||||
states/OpenSubMenu/node = SubResource("13")
|
||||
states/OpenSubMenu/position = Vector2(734, 123)
|
||||
states/Start/position = Vector2(82, 123)
|
||||
transitions = ["Intro", "OpenMainMenu", SubResource("11"), "OpenMainMenu", "OpenSubMenu", SubResource("14"), "Start", "Intro", SubResource("AnimationNodeStateMachineTransition_j0orr"), "OpenSubMenu", "OpenMainMenu", SubResource("AnimationNodeStateMachineTransition_63dxc")]
|
||||
graph_offset = Vector2(-180.277, 49)
|
||||
|
||||
[node name="MainMenu" unique_id=589811630 instance=ExtResource("1_sr523")]
|
||||
script = ExtResource("2_ixa71")
|
||||
level_select_packed_scene = null
|
||||
confirm_new_game = true
|
||||
options_packed_scene = ExtResource("3_2k5l7")
|
||||
credits_packed_scene = ExtResource("4_vsp5b")
|
||||
|
||||
[node name="MenuAnimationPlayer" type="AnimationPlayer" parent="." index="1" unique_id=1492532975]
|
||||
libraries/ = SubResource("AnimationLibrary_2kqig")
|
||||
|
||||
[node name="MenuAnimationTree" type="AnimationTree" parent="." index="2" unique_id=1630488919]
|
||||
tree_root = SubResource("AnimationNodeStateMachine_vikuh")
|
||||
anim_player = NodePath("../MenuAnimationPlayer")
|
||||
parameters/conditions/intro_done = false
|
||||
|
||||
[node name="TitleContainer" parent="MenuContainer/TitleMargin" parent_id_path=PackedInt32Array(2112060331) index="0" unique_id=556427956]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="SubTitleContainer" parent="MenuContainer/SubTitleMargin" parent_id_path=PackedInt32Array(1510335937) index="0" unique_id=930520368]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="MenuButtonsContainer" parent="MenuContainer/MenuButtonsMargin" parent_id_path=PackedInt32Array(210553886) index="0" unique_id=116448484]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="MenuButtonsBoxContainer" parent="MenuContainer/MenuButtonsMargin/MenuButtonsContainer" index="0" unique_id=2017477786]
|
||||
lock = true
|
||||
|
||||
[node name="ContinueGameButton" type="Button" parent="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer" index="1" unique_id=1206401873]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Continue"
|
||||
|
||||
[node name="LevelSelectButton" type="Button" parent="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer" index="2" unique_id=78300098]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Level Select"
|
||||
|
||||
[node name="VersionContainer" parent="VersionMargin" parent_id_path=PackedInt32Array(1732528471) index="0" unique_id=1603969262]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="NewGameConfirmation" parent="." index="7" unique_id=1747133399 instance=ExtResource("5_6xh1d")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(420, 200)
|
||||
layout_mode = 1
|
||||
offset_left = -210.0
|
||||
offset_top = -100.0
|
||||
offset_right = 210.0
|
||||
offset_bottom = 100.0
|
||||
text = "Are you sure you want to start a new game?
|
||||
|
||||
All progress in the current game will be lost."
|
||||
title = "New Game"
|
||||
|
||||
[node name="MouseFilter" type="Control" parent="." index="8" unique_id=33285267]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[connection signal="pressed" from="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer/ContinueGameButton" to="." method="_on_continue_game_button_pressed"]
|
||||
[connection signal="pressed" from="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer/LevelSelectButton" to="." method="_on_level_select_button_pressed"]
|
||||
[connection signal="confirmed" from="NewGameConfirmation" to="." method="_on_new_game_confirmation_confirmed"]
|
||||
Reference in New Issue
Block a user