279 lines
8.4 KiB
Plaintext
279 lines
8.4 KiB
Plaintext
[gd_scene format=3 uid="uid://dlbuo46n6q238"]
|
|
|
|
[ext_resource type="Theme" uid="uid://dx26d6py3n8xi" path="res://resources/main_ui_theme.tres" id="1_ekxnf"]
|
|
[ext_resource type="AudioStream" uid="uid://b7dgmblbcm0cj" path="res://assets/music/menu_theme.OGG" id="1_yqeox"]
|
|
[ext_resource type="Texture2D" uid="uid://b47b6tt142b25" path="res://assets/sprites/main_menu.BMP" id="3_bqqt6"]
|
|
[ext_resource type="AudioStream" uid="uid://5ndo4w06umsa" path="res://assets/sounds/SE020.WAV" id="4_wu84c"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_wu84c"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(0, 0, 800, 400)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_8ln24"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(0, 600, 800, 348)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_a8gd2"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(800, 0, 745, 745)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bqqt6"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(-1, 995, 800, 43)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_rtw2f"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(0, 950, 800, 45)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_oa1go"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(800, 744, 515, 210)
|
|
|
|
[sub_resource type="GDScript" id="GDScript_hover"]
|
|
resource_name = "ButtonHoverSFX"
|
|
script/source = "extends VBoxContainer
|
|
|
|
@onready var hover_sfx: AudioStreamPlayer = $HoverSFX
|
|
|
|
func _ready() -> void:
|
|
for child in get_children():
|
|
if child is TextureButton:
|
|
child.mouse_entered.connect(_on_button_hovered)
|
|
|
|
func _on_button_hovered() -> void:
|
|
hover_sfx.play()
|
|
"
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tbmy8"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 0, 330, 50)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_jk1qb"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 300, 330, 50)
|
|
|
|
[sub_resource type="GDScript" id="GDScript_bqqt6"]
|
|
resource_name = "StartButton"
|
|
script/source = "extends TextureButton
|
|
|
|
const COMBAT_SCENE = preload(\"res://scenes/strategy_phase.tscn\")
|
|
const UNIT_SCENE = preload(\"res://prefabs/unit.tscn\")
|
|
const PLAYER_ALLEGIANCE = preload(\"res://resources/allegiance_types/player_allegiance.tres\")
|
|
const ENEMY_ALLEGIANCE = preload(\"res://resources/allegiance_types/enemy_allegiance.tres\")
|
|
|
|
const MAP_LAYOUT := \"\"\"\\
|
|
#####
|
|
#...#
|
|
#...#
|
|
#...#
|
|
#####\"\"\"
|
|
|
|
func _pressed() -> void:
|
|
var combat_instance := COMBAT_SCENE.instantiate()
|
|
var combat_map: CombatMap = combat_instance.find_child(\"CombatMap\")
|
|
|
|
combat_map.load_map(MAP_LAYOUT)
|
|
|
|
var player_unit: Unit = UNIT_SCENE.instantiate()
|
|
player_unit.stat_template = UnitStats.new(50)
|
|
player_unit.info_template = UnitInfo.new()
|
|
player_unit.info_template.name = \"Putit\"
|
|
player_unit.allegiance_template = PLAYER_ALLEGIANCE
|
|
combat_map.deploy_unit(player_unit, Vector2i(2, 2))
|
|
|
|
var enemy_unit: Unit = UNIT_SCENE.instantiate()
|
|
enemy_unit.stat_template = UnitStats.new(50)
|
|
enemy_unit.info_template = UnitInfo.new()
|
|
enemy_unit.info_template.name = \"Putit\"
|
|
enemy_unit.allegiance_template = ENEMY_ALLEGIANCE
|
|
combat_map.deploy_unit(enemy_unit, Vector2i(2, 1))
|
|
|
|
var tree := get_tree()
|
|
var root := tree.root
|
|
var current_scene := tree.current_scene
|
|
root.remove_child(current_scene)
|
|
current_scene.queue_free()
|
|
root.add_child(combat_instance)
|
|
tree.current_scene = combat_instance
|
|
"
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_5dd4i"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 60, 330, 50)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_lgwnu"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 360, 330, 50)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_flqon"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 120, 330, 50)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_rcqid"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 420, 330, 50)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_1ajci"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 180, 330, 50)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_7b55j"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 480, 330, 50)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_5pajh"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 240, 330, 50)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_j7ex8"]
|
|
atlas = ExtResource("3_bqqt6")
|
|
region = Rect2(1550, 540, 330, 50)
|
|
|
|
[sub_resource type="GDScript" id="GDScript_wu84c"]
|
|
resource_name = "ExitButton"
|
|
script/source = "extends TextureButton
|
|
|
|
func _pressed():
|
|
get_tree().quit(0)
|
|
"
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_hstxw"]
|
|
|
|
[node name="Menu" type="Control" unique_id=528000941]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
theme = ExtResource("1_ekxnf")
|
|
|
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1976575731]
|
|
stream = ExtResource("1_yqeox")
|
|
autoplay = true
|
|
parameters/looping = true
|
|
|
|
[node name="Background" type="Control" parent="." unique_id=801579001]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
|
|
[node name="Top" type="TextureRect" parent="Background" unique_id=2030397311]
|
|
layout_mode = 1
|
|
anchors_preset = 10
|
|
anchor_right = 1.0
|
|
offset_bottom = 400.0
|
|
grow_horizontal = 2
|
|
texture = SubResource("AtlasTexture_wu84c")
|
|
|
|
[node name="Bottom" type="TextureRect" parent="Background" unique_id=736979824]
|
|
layout_mode = 1
|
|
anchors_preset = 12
|
|
anchor_top = 1.0
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_top = -348.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 0
|
|
texture = SubResource("AtlasTexture_8ln24")
|
|
|
|
[node name="MagicCircle" type="TextureRect" parent="Background" unique_id=1610277203]
|
|
self_modulate = Color(1, 1, 1, 0.6156863)
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_top = -72.5
|
|
offset_bottom = 72.5
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
texture = SubResource("AtlasTexture_a8gd2")
|
|
|
|
[node name="BottomBorder" type="TextureRect" parent="Background" unique_id=2048064934]
|
|
layout_mode = 1
|
|
anchors_preset = 12
|
|
anchor_top = 1.0
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_top = -45.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 0
|
|
texture = SubResource("AtlasTexture_bqqt6")
|
|
|
|
[node name="TopBorder" type="TextureRect" parent="Background" unique_id=812827884]
|
|
layout_mode = 0
|
|
offset_right = 800.0
|
|
offset_bottom = 45.0
|
|
texture = SubResource("AtlasTexture_rtw2f")
|
|
|
|
[node name="Logo" type="TextureRect" parent="Background" unique_id=815631332]
|
|
layout_mode = 1
|
|
anchors_preset = -1
|
|
anchor_left = 0.5
|
|
anchor_right = 0.5
|
|
offset_left = -257.5
|
|
offset_top = 50.0
|
|
offset_right = 257.5
|
|
offset_bottom = 210.0
|
|
grow_horizontal = 2
|
|
texture = SubResource("AtlasTexture_oa1go")
|
|
|
|
[node name="Buttons" type="VBoxContainer" parent="." unique_id=1869378860]
|
|
layout_mode = 1
|
|
anchors_preset = -1
|
|
anchor_left = 0.29375
|
|
anchor_top = 0.5566667
|
|
anchor_right = 0.70625
|
|
anchor_bottom = 1.0
|
|
offset_left = 1.5258789e-05
|
|
offset_bottom = -55.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 0
|
|
alignment = 1
|
|
script = SubResource("GDScript_hover")
|
|
metadata/_edit_use_anchors_ = true
|
|
|
|
[node name="HoverSFX" type="AudioStreamPlayer" parent="Buttons" unique_id=256435189]
|
|
stream = ExtResource("4_wu84c")
|
|
|
|
[node name="StartButton" type="TextureButton" parent="Buttons" unique_id=973041905]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
texture_normal = SubResource("AtlasTexture_tbmy8")
|
|
texture_hover = SubResource("AtlasTexture_jk1qb")
|
|
script = SubResource("GDScript_bqqt6")
|
|
|
|
[node name="LoadButton" type="TextureButton" parent="Buttons" unique_id=2075751086]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
texture_normal = SubResource("AtlasTexture_5dd4i")
|
|
texture_hover = SubResource("AtlasTexture_lgwnu")
|
|
|
|
[node name="EushullyButton" type="TextureButton" parent="Buttons" unique_id=412756984]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
texture_normal = SubResource("AtlasTexture_flqon")
|
|
texture_hover = SubResource("AtlasTexture_rcqid")
|
|
|
|
[node name="OptionsButton" type="TextureButton" parent="Buttons" unique_id=1002907774]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
texture_normal = SubResource("AtlasTexture_1ajci")
|
|
texture_hover = SubResource("AtlasTexture_7b55j")
|
|
|
|
[node name="ExitButton" type="TextureButton" parent="Buttons" unique_id=286651369]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
texture_normal = SubResource("AtlasTexture_5pajh")
|
|
texture_hover = SubResource("AtlasTexture_j7ex8")
|
|
script = SubResource("GDScript_wu84c")
|
|
|
|
[node name="TextureRect" type="TextureRect" parent="." unique_id=968381019]
|
|
layout_mode = 0
|
|
offset_right = 40.0
|
|
offset_bottom = 40.0
|
|
texture = SubResource("AtlasTexture_hstxw")
|