PirateTreasureHunt/scenes/Game.tscn

485 lines
14 KiB
Plaintext
Raw Normal View History

2021-08-01 17:24:42 +02:00
[gd_scene load_steps=29 format=2]
[ext_resource path="res://scenes/World.gd" type="Script" id=1]
2021-06-28 21:51:09 +02:00
[ext_resource path="res://scenes/Grid.gd" type="Script" id=2]
2021-06-17 23:03:45 +02:00
[ext_resource path="res://assets/pirate.svg" type="Texture" id=3]
2021-06-17 23:04:13 +02:00
[ext_resource path="res://scenes/FPSValue.gd" type="Script" id=4]
2021-06-17 23:25:01 +02:00
[ext_resource path="res://scenes/pirate.gd" type="Script" id=5]
2021-06-19 23:14:01 +02:00
[ext_resource path="res://fonts/Roboto/Roboto-Regular.ttf" type="DynamicFontData" id=6]
2021-06-27 12:26:44 +02:00
[ext_resource path="res://scenes/Editor.gd" type="Script" id=7]
2021-06-28 21:51:09 +02:00
[ext_resource path="res://scenes/GridHighlight.gd" type="Script" id=8]
2021-07-09 14:17:25 +02:00
[ext_resource path="res://assets/boat.svg" type="Texture" id=9]
2021-07-16 12:07:11 +02:00
[ext_resource path="res://assets/shovel.svg" type="Texture" id=10]
[ext_resource path="res://assets/Yeah.png" type="Texture" id=11]
2021-07-21 22:46:26 +02:00
[ext_resource path="res://assets/shovel_button.svg" type="Texture" id=12]
2021-07-20 22:44:13 +02:00
[ext_resource path="res://scenes/SoundEffectsPlayer.gd" type="Script" id=13]
2021-07-21 22:08:42 +02:00
[ext_resource path="res://scenes/MusicPlayer.gd" type="Script" id=14]
2021-07-21 22:46:26 +02:00
[ext_resource path="res://assets/map.svg" type="Texture" id=15]
[ext_resource path="res://assets/parrot.svg" type="Texture" id=16]
2021-08-01 17:24:42 +02:00
[ext_resource path="res://assets/arrowback.svg" type="Texture" id=17]
[ext_resource path="res://assets/arrowrepeat.svg" type="Texture" id=18]
2021-06-19 23:14:01 +02:00
[sub_resource type="DynamicFont" id=1]
size = 27
font_data = ExtResource( 6 )
[sub_resource type="Theme" id=2]
default_font = SubResource( 1 )
[sub_resource type="ButtonGroup" id=3]
resource_name = "TileTypeGroup"
2021-08-01 16:31:54 +02:00
[sub_resource type="Curve" id=4]
2021-07-21 23:06:23 +02:00
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.0511364 ), 0.0, 0.0, 0, 0 ]
2021-08-01 16:31:54 +02:00
[sub_resource type="CurveTexture" id=5]
curve = SubResource( 4 )
2021-07-21 23:06:23 +02:00
[sub_resource type="ParticlesMaterial" id=6]
emission_shape = 1
emission_sphere_radius = 3.0
flag_disable_z = true
spread = 4.82
gravity = Vector3( 0, 0, 0 )
initial_velocity = 20.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
scale = 10.0
2021-08-01 16:31:54 +02:00
scale_random = 0.27
scale_curve = SubResource( 5 )
2021-07-21 23:06:23 +02:00
[sub_resource type="Curve" id=7]
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.956097, 0 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=8]
curve = SubResource( 7 )
2021-08-01 16:31:54 +02:00
[sub_resource type="ParticlesMaterial" id=9]
2021-07-21 23:06:23 +02:00
emission_shape = 1
emission_sphere_radius = 3.0
flag_disable_z = true
direction = Vector3( -1, 0, 0 )
spread = 4.82
gravity = Vector3( 0, 0, 0 )
initial_velocity = 20.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
scale = 10.0
scale_curve = SubResource( 8 )
2021-08-01 16:31:54 +02:00
[sub_resource type="World" id=10]
2021-07-14 21:38:35 +02:00
[node name="GameRoot" type="Node"]
2021-07-21 22:08:42 +02:00
[node name="MusicPlayer" type="AudioStreamPlayer" parent="."]
volume_db = -16.124
autoplay = true
script = ExtResource( 14 )
[node name="SoundEffectsPlayer" type="AudioStreamPlayer" parent="."]
script = ExtResource( 13 )
2021-07-14 20:11:20 +02:00
[node name="Editor" type="Node2D" parent="."]
script = ExtResource( 7 )
[node name="UI" type="CanvasLayer" parent="Editor"]
[node name="Editor" type="VBoxContainer" parent="Editor/UI"]
visible = false
margin_left = 12.0
margin_top = 53.0
margin_right = 94.0
margin_bottom = 600.0
theme = SubResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Island" type="Label" parent="Editor/UI/Editor"]
margin_right = 110.0
margin_bottom = 33.0
text = "Island"
[node name="IslandIndex" type="SpinBox" parent="Editor/UI/Editor"]
margin_top = 37.0
margin_right = 110.0
margin_bottom = 80.0
max_value = 9.0
[node name="ClearWorldButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 84.0
margin_right = 110.0
margin_bottom = 123.0
text = "Clear"
[node name="LoadWorldButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 127.0
margin_right = 110.0
margin_bottom = 166.0
text = "Load"
[node name="SaveWorldButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 170.0
margin_right = 110.0
margin_bottom = 209.0
text = "Save"
[node name="Label" type="Label" parent="Editor/UI/Editor"]
margin_top = 213.0
margin_right = 110.0
margin_bottom = 246.0
text = "Tiles"
[node name="NoneButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 250.0
margin_right = 110.0
margin_bottom = 289.0
rect_pivot_offset = Vector2( -1239.87, 282.07 )
toggle_mode = true
group = SubResource( 3 )
text = "None"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="SandButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 293.0
margin_right = 110.0
margin_bottom = 332.0
rect_pivot_offset = Vector2( -1239.87, 282.07 )
toggle_mode = true
group = SubResource( 3 )
text = "Sand"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GrassButton" type="Button" parent="Editor/UI/Editor"]
margin_top = 336.0
margin_right = 110.0
margin_bottom = 375.0
rect_pivot_offset = Vector2( -1239.87, 282.07 )
toggle_mode = true
group = SubResource( 3 )
text = "Grass"
[node name="World" type="Node2D" parent="."]
script = ExtResource( 1 )
2021-06-28 21:51:09 +02:00
[node name="Grid" type="Node2D" parent="World"]
script = ExtResource( 2 )
[node name="Islands" type="Node2D" parent="World"]
2021-07-10 14:57:18 +02:00
z_index = -1
2021-06-19 23:14:01 +02:00
[node name="GridHighlight" type="Node2D" parent="World"]
2021-06-28 21:51:09 +02:00
script = ExtResource( 8 )
2021-06-19 23:14:01 +02:00
[node name="UI" type="CanvasLayer" parent="World"]
2021-08-01 17:24:42 +02:00
[node name="HBoxContainer" type="HBoxContainer" parent="World/UI"]
2021-07-18 16:56:18 +02:00
margin_left = 10.0
margin_top = 10.0
margin_right = -10.0
2021-08-01 17:24:42 +02:00
margin_bottom = 10.0
rect_scale = Vector2( 0.25, 0.25 )
__meta__ = {
"_edit_use_anchors_": false
}
2021-08-01 17:24:42 +02:00
[node name="BackButton" type="Button" parent="World/UI/HBoxContainer"]
margin_right = 268.0
margin_bottom = 262.0
icon = ExtResource( 17 )
flat = true
[node name="RepeatButton" type="Button" parent="World/UI/HBoxContainer"]
margin_left = 272.0
margin_right = 540.0
margin_bottom = 262.0
rect_min_size = Vector2( 256, 64 )
disabled = true
action_mode = 0
icon = ExtResource( 18 )
flat = true
2021-07-18 16:56:18 +02:00
2021-07-14 21:38:35 +02:00
[node name="IslandMap" type="TextureRect" parent="World/UI"]
2021-07-14 22:03:02 +02:00
visible = false
2021-07-14 21:38:35 +02:00
anchor_right = 1.0
anchor_bottom = 1.0
expand = true
stretch_mode = 7
__meta__ = {
"_edit_use_anchors_": false
}
2021-07-21 22:46:26 +02:00
[node name="Timer" type="Timer" parent="World/UI/IslandMap"]
2021-07-14 21:38:35 +02:00
[node name="VBoxContainer" type="VBoxContainer" parent="World/UI"]
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
2021-07-21 22:46:26 +02:00
margin_left = -128.0
rect_scale = Vector2( 0.5, 0.5 )
2021-07-14 21:38:35 +02:00
custom_constants/separation = 21
2021-07-21 22:46:26 +02:00
alignment = 1
2021-07-14 21:38:35 +02:00
__meta__ = {
"_edit_use_anchors_": false
}
[node name="MapButton" type="Button" parent="World/UI/VBoxContainer"]
2021-07-21 22:46:26 +02:00
margin_right = 291.0
margin_bottom = 262.0
2021-07-14 21:38:35 +02:00
rect_min_size = Vector2( 100, 100 )
2021-07-21 22:46:26 +02:00
icon = ExtResource( 15 )
flat = true
2021-07-14 21:38:35 +02:00
[node name="BirdyButton" type="Button" parent="World/UI/VBoxContainer"]
2021-07-21 22:46:26 +02:00
margin_top = 283.0
margin_right = 291.0
margin_bottom = 545.0
2021-07-14 21:38:35 +02:00
rect_min_size = Vector2( 100, 100 )
2021-07-21 22:46:26 +02:00
icon = ExtResource( 16 )
flat = true
2021-07-14 21:38:35 +02:00
2021-07-16 12:07:11 +02:00
[node name="DigButton" type="Button" parent="World/UI/VBoxContainer"]
2021-07-21 22:46:26 +02:00
margin_top = 566.0
margin_right = 291.0
margin_bottom = 828.0
2021-07-16 12:07:11 +02:00
rect_min_size = Vector2( 100, 100 )
text = "Dig"
2021-07-21 22:46:26 +02:00
icon = ExtResource( 12 )
flat = true
2021-07-16 12:07:11 +02:00
[node name="SuccessMessage" type="Control" parent="World/UI"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -20.0
margin_top = -20.0
margin_right = 20.0
margin_bottom = 20.0
rect_scale = Vector2( 0.5, 0.5 )
2021-07-20 22:51:38 +02:00
mouse_filter = 2
2021-07-16 12:07:11 +02:00
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="World/UI/SuccessMessage"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
2021-07-21 22:46:26 +02:00
margin_left = -700.96
2021-07-16 12:07:11 +02:00
margin_top = -264.0
2021-07-21 22:46:26 +02:00
margin_right = 711.04
2021-07-16 12:07:11 +02:00
margin_bottom = 264.0
2021-07-20 22:51:38 +02:00
mouse_filter = 2
2021-07-16 12:07:11 +02:00
texture = ExtResource( 11 )
stretch_mode = 4
__meta__ = {
"_edit_use_anchors_": false
}
2021-08-01 16:31:54 +02:00
[node name="DebugContainer" type="HBoxContainer" parent="World/UI"]
visible = false
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = -40.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="EditIslandButton" type="CheckButton" parent="World/UI/DebugContainer"]
margin_right = 117.0
margin_bottom = 40.0
text = "Editor"
[node name="Offset" type="Label" parent="World/UI/DebugContainer"]
margin_left = 121.0
margin_top = 13.0
margin_right = 168.0
margin_bottom = 27.0
text = "Offset: "
[node name="OffsetValue" type="Label" parent="World/UI/DebugContainer"]
margin_left = 172.0
margin_top = 13.0
margin_right = 192.0
margin_bottom = 27.0
text = "0,0"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Zoom" type="Label" parent="World/UI/DebugContainer"]
margin_left = 196.0
margin_top = 13.0
margin_right = 245.0
margin_bottom = 27.0
text = " Zoom: "
[node name="ZoomValue" type="Label" parent="World/UI/DebugContainer"]
margin_left = 249.0
margin_top = 13.0
margin_right = 269.0
margin_bottom = 27.0
text = "0.0"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HexCoord" type="Label" parent="World/UI/DebugContainer"]
margin_left = 273.0
margin_top = 13.0
margin_right = 347.0
margin_bottom = 27.0
text = " HexCoord: "
[node name="HexCoordValue" type="Label" parent="World/UI/DebugContainer"]
margin_left = 351.0
margin_top = 13.0
margin_right = 379.0
margin_bottom = 27.0
text = "(0,0)"
[node name="WorldCoord" type="Label" parent="World/UI/DebugContainer"]
margin_left = 383.0
margin_top = 13.0
margin_right = 466.0
margin_bottom = 27.0
text = "WorldCoord: "
[node name="WorldCoordValue" type="Label" parent="World/UI/DebugContainer"]
margin_left = 470.0
margin_top = 13.0
margin_right = 498.0
margin_bottom = 27.0
text = "(0,0)"
[node name="TileType" type="Label" parent="World/UI/DebugContainer"]
margin_left = 502.0
margin_top = 13.0
margin_right = 525.0
margin_bottom = 27.0
text = "Tile"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TileTypeValue" type="Label" parent="World/UI/DebugContainer"]
margin_left = 529.0
margin_top = 13.0
margin_right = 563.0
margin_bottom = 27.0
text = "None"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VSeparator" type="VSeparator" parent="World/UI/DebugContainer"]
margin_left = 567.0
margin_right = 770.0
margin_bottom = 40.0
size_flags_horizontal = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label2" type="Label" parent="World/UI/DebugContainer"]
margin_left = 774.0
margin_top = 13.0
margin_right = 978.0
margin_bottom = 27.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="World/UI/DebugContainer"]
margin_left = 982.0
margin_top = 13.0
margin_right = 1012.0
margin_bottom = 27.0
text = "FPS: "
[node name="FPSValue" type="Label" parent="World/UI/DebugContainer"]
margin_left = 1016.0
margin_top = 13.0
margin_right = 1024.0
margin_bottom = 27.0
text = "0"
align = 2
script = ExtResource( 4 )
2021-07-16 12:07:11 +02:00
[node name="DigSites" type="Node2D" parent="World"]
2021-07-20 22:44:13 +02:00
[node name="PlayerChar" type="Node2D" parent="World"]
2021-06-27 12:26:44 +02:00
script = ExtResource( 5 )
2021-07-16 12:07:11 +02:00
[node name="Pirate" type="Sprite" parent="World/PlayerChar"]
2021-06-27 12:26:44 +02:00
scale = Vector2( 0.45498, 0.45498 )
texture = ExtResource( 3 )
2021-07-16 12:07:11 +02:00
[node name="Shovel" type="Sprite" parent="World/PlayerChar"]
visible = false
scale = Vector2( 0.455, 0.455 )
texture = ExtResource( 10 )
[node name="DigTimer" type="Timer" parent="World/PlayerChar"]
one_shot = true
2021-07-09 14:17:25 +02:00
[node name="Camera" type="Camera2D" parent="World"]
current = true
[node name="PlayerBoat" type="Node2D" parent="World"]
[node name="boat" type="Sprite" parent="World/PlayerBoat"]
2021-07-21 23:06:23 +02:00
position = Vector2( 0, -0.264862 )
2021-07-09 14:17:25 +02:00
scale = Vector2( 0.455, 0.455 )
texture = ExtResource( 9 )
2021-07-21 23:06:23 +02:00
[node name="ParticlesRight" type="Particles2D" parent="World/PlayerBoat"]
position = Vector2( 30, 57.858 )
z_index = -1
local_coords = false
process_material = SubResource( 6 )
[node name="ParticlesLeft" type="Particles2D" parent="World/PlayerBoat"]
position = Vector2( -30, 57.858 )
z_index = -1
local_coords = false
2021-08-01 16:31:54 +02:00
process_material = SubResource( 9 )
2021-07-21 23:06:23 +02:00
2021-07-14 21:58:07 +02:00
[node name="Birdy" type="Node2D" parent="World"]
[node name="Timer" type="Timer" parent="World/Birdy"]
2021-07-14 21:38:35 +02:00
[node name="IslandMapRenderer" type="Viewport" parent="."]
size = Vector2( 300, 300 )
own_world = true
2021-08-01 16:31:54 +02:00
world = SubResource( 10 )
2021-07-14 21:38:35 +02:00
render_target_v_flip = true
render_target_clear_mode = 2
render_target_update_mode = 1
[node name="Camera2D" type="Camera2D" parent="IslandMapRenderer"]
[connection signal="value_changed" from="Editor/UI/Editor/IslandIndex" to="Editor" method="_on_IslandIndex_value_changed"]
2021-06-27 12:26:44 +02:00
[connection signal="pressed" from="Editor/UI/Editor/ClearWorldButton" to="Editor" method="_on_ClearWorldButton_pressed"]
[connection signal="pressed" from="Editor/UI/Editor/LoadWorldButton" to="Editor" method="_on_LoadWorldButton_pressed"]
[connection signal="pressed" from="Editor/UI/Editor/SaveWorldButton" to="Editor" method="_on_SaveWorldButton_pressed"]
2021-07-20 22:44:13 +02:00
[connection signal="bird_flight_start" from="World" to="SoundEffectsPlayer" method="_on_World_bird_flight_start"]
2021-07-20 22:51:38 +02:00
[connection signal="digging_started" from="World" to="SoundEffectsPlayer" method="_on_World_digging_started"]
2021-07-21 22:08:42 +02:00
[connection signal="level_started" from="World" to="MusicPlayer" method="_on_World_level_started"]
2021-07-20 22:44:13 +02:00
[connection signal="map_opened" from="World" to="SoundEffectsPlayer" method="_on_World_map_opened"]
[connection signal="treasure_found" from="World" to="SoundEffectsPlayer" method="_on_World_treasure_found"]
[connection signal="world_generation_triggered" from="World" to="SoundEffectsPlayer" method="_on_World_world_generation_triggered"]
[connection signal="wrong_digsite" from="World" to="SoundEffectsPlayer" method="_on_World_wrong_digsite"]
2021-08-01 17:24:42 +02:00
[connection signal="pressed" from="World/UI/HBoxContainer/BackButton" to="World" method="_on_BackButton_pressed"]
[connection signal="pressed" from="World/UI/HBoxContainer/RepeatButton" to="World" method="_on_GenerateButton_pressed"]
2021-07-20 22:44:13 +02:00
[connection signal="visibility_changed" from="World/UI/IslandMap" to="World" method="_on_IslandMap_visibility_changed"]
2021-07-14 21:38:35 +02:00
[connection signal="pressed" from="World/UI/VBoxContainer/MapButton" to="World" method="_on_MapButton_pressed"]
2021-07-14 21:58:07 +02:00
[connection signal="pressed" from="World/UI/VBoxContainer/BirdyButton" to="World" method="_on_BirdyButton_pressed"]
2021-07-16 12:07:11 +02:00
[connection signal="pressed" from="World/UI/VBoxContainer/DigButton" to="World" method="_on_DigButton_pressed"]
2021-08-01 16:31:54 +02:00
[connection signal="toggled" from="World/UI/DebugContainer/EditIslandButton" to="Editor" method="_on_EditIslandButton_toggled"]