Global.tscn 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. [gd_scene load_steps=56 format=3 uid="uid://c3h2iqkvitqd2"]
  2. [ext_resource type="PackedScene" uid="uid://bod0jkf7jc5pm" path="res://Scenes/Prefabs/GameHud.tscn" id="1_ctvpw"]
  3. [ext_resource type="Script" uid="uid://bbxqn16ekbpcl" path="res://Scripts/Classes/Singletons/Global.gd" id="1_t23sr"]
  4. [ext_resource type="AudioStream" uid="uid://dhc2t3wbtsoss" path="res://Assets/Audio/SFX/ScoreLoop.wav" id="3_vjpdy"]
  5. [ext_resource type="Script" uid="uid://cq6f682453q6o" path="res://Scripts/Classes/Components/ResourceSetter.gd" id="4_7puui"]
  6. [ext_resource type="Script" uid="uid://26yissv8bnqw" path="res://Scripts/UI/WindowChanger.gd" id="4_nxm2a"]
  7. [ext_resource type="Script" uid="uid://cmvlgsjmsk0v5" path="res://Scripts/Classes/Resources/ThemedResource.gd" id="5_eyjoc"]
  8. [ext_resource type="Script" uid="uid://bdgvsycico544" path="res://Scripts/UI/AudioAdjuster.gd" id="5_l70br"]
  9. [ext_resource type="AudioStream" uid="uid://dsc21eiypsqnd" path="res://Assets/Audio/SFX/Score.wav" id="6_30rl1"]
  10. [ext_resource type="Script" uid="uid://hb401vacltfw" path="res://Scripts/Parts/VisualsSetter.gd" id="6_pamiy"]
  11. [ext_resource type="Script" uid="uid://cxkumlifwb0s6" path="res://Scripts/Parts/DifficultySetter.gd" id="7_3324c"]
  12. [ext_resource type="Script" uid="uid://cqif1li7otvpl" path="res://Scripts/Parts/SpriteFramesToJsonConverter.gd" id="10_nptu4"]
  13. [ext_resource type="Script" uid="uid://cixtosud3mfaq" path="res://Scripts/Classes/Resources/CampaignResource.gd" id="13_30rl1"]
  14. [ext_resource type="PackedScene" uid="uid://btiev75x1wtvk" path="res://Scenes/Prefabs/Entities/PlayerGhost.tscn" id="14_6o310"]
  15. [ext_resource type="StyleBox" uid="uid://comkghpj0djcl" path="res://Resources/UI/Panel.tres" id="16_l7dvb"]
  16. [ext_resource type="Texture2D" uid="uid://bnv2ocqgws3p7" path="res://Assets/Sprites/UI/Panel.png" id="16_qalov"]
  17. [ext_resource type="Script" uid="uid://ctsjagoa5t33f" path="res://Scripts/Parts/FontUpdater.gd" id="18_1la0o"]
  18. [ext_resource type="Texture2D" uid="uid://dktb2ljmou31p" path="res://Resources/UI/Cursor.tres" id="18_xcxrh"]
  19. [ext_resource type="StyleBox" uid="uid://dlbdmqmnl30sq" path="res://Resources/UI/PanelSelected.tres" id="18_yyu8s"]
  20. [ext_resource type="Texture2D" uid="uid://3p2l7rec0gh5" path="res://Assets/Sprites/UI/Cursor.png" id="19_3l3ph"]
  21. [ext_resource type="Script" uid="uid://dt2p68xl462v2" path="res://Scripts/Parts/TextShadowColourChanger.gd" id="19_l7dvb"]
  22. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="19_okfpr"]
  23. [ext_resource type="Texture2D" uid="uid://bhgjvnslkt143" path="res://Assets/Sprites/UI/PanelSelected.png" id="19_xspbb"]
  24. [ext_resource type="JSON" path="res://Assets/Sprites/UI/Cursor.json" id="20_3l3ph"]
  25. [sub_resource type="Animation" id="Animation_6jmk5"]
  26. resource_name = "FadeIn"
  27. length = 0.2
  28. step = 0.01
  29. tracks/0/type = "value"
  30. tracks/0/imported = false
  31. tracks/0/enabled = true
  32. tracks/0/path = NodePath("TransitionBlock:visible")
  33. tracks/0/interp = 1
  34. tracks/0/loop_wrap = true
  35. tracks/0/keys = {
  36. "times": PackedFloat32Array(0, 0.19999999),
  37. "transitions": PackedFloat32Array(1, 1),
  38. "update": 1,
  39. "values": [true, true]
  40. }
  41. tracks/1/type = "value"
  42. tracks/1/imported = false
  43. tracks/1/enabled = true
  44. tracks/1/path = NodePath("TransitionBlock:modulate")
  45. tracks/1/interp = 0
  46. tracks/1/loop_wrap = true
  47. tracks/1/keys = {
  48. "times": PackedFloat32Array(0, 0.02, 0.04, 0.06, 0.08, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2),
  49. "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
  50. "update": 1,
  51. "values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0.023736842), Color(1, 1, 1, 0.08222634), Color(1, 1, 1, 0.17074619), Color(1, 1, 1, 0.28393906), Color(1, 1, 1, 0.41561413), Color(1, 1, 1, 0.5584373), Color(1, 1, 1, 0.7034065), Color(1, 1, 1, 0.8388471), Color(1, 1, 1, 0.94804496), Color(1, 1, 1, 1)]
  52. }
  53. tracks/2/type = "value"
  54. tracks/2/imported = false
  55. tracks/2/enabled = true
  56. tracks/2/path = NodePath(".:visible")
  57. tracks/2/interp = 1
  58. tracks/2/loop_wrap = true
  59. tracks/2/keys = {
  60. "times": PackedFloat32Array(0, 0.2),
  61. "transitions": PackedFloat32Array(1, 1),
  62. "update": 1,
  63. "values": [true, true]
  64. }
  65. [sub_resource type="Animation" id="Animation_1la0o"]
  66. length = 0.001
  67. tracks/0/type = "value"
  68. tracks/0/imported = false
  69. tracks/0/enabled = true
  70. tracks/0/path = NodePath("TransitionBlock:visible")
  71. tracks/0/interp = 1
  72. tracks/0/loop_wrap = true
  73. tracks/0/keys = {
  74. "times": PackedFloat32Array(0),
  75. "transitions": PackedFloat32Array(1),
  76. "update": 1,
  77. "values": [true]
  78. }
  79. tracks/1/type = "value"
  80. tracks/1/imported = false
  81. tracks/1/enabled = true
  82. tracks/1/path = NodePath("TransitionBlock:modulate")
  83. tracks/1/interp = 1
  84. tracks/1/loop_wrap = true
  85. tracks/1/keys = {
  86. "times": PackedFloat32Array(0),
  87. "transitions": PackedFloat32Array(1),
  88. "update": 0,
  89. "values": [Color(1, 1, 1, 1)]
  90. }
  91. tracks/2/type = "value"
  92. tracks/2/imported = false
  93. tracks/2/enabled = true
  94. tracks/2/path = NodePath(".:visible")
  95. tracks/2/interp = 1
  96. tracks/2/loop_wrap = true
  97. tracks/2/keys = {
  98. "times": PackedFloat32Array(0),
  99. "transitions": PackedFloat32Array(1),
  100. "update": 1,
  101. "values": [false]
  102. }
  103. [sub_resource type="AnimationLibrary" id="AnimationLibrary_l7dvb"]
  104. _data = {
  105. &"FadeIn": SubResource("Animation_6jmk5"),
  106. &"RESET": SubResource("Animation_1la0o")
  107. }
  108. [sub_resource type="Resource" id="Resource_6jmk5"]
  109. script = ExtResource("5_eyjoc")
  110. Overworld = ExtResource("3_vjpdy")
  111. metadata/_custom_type_script = "uid://cmvlgsjmsk0v5"
  112. [sub_resource type="Resource" id="Resource_l7dvb"]
  113. script = ExtResource("5_eyjoc")
  114. Overworld = ExtResource("6_30rl1")
  115. metadata/_custom_type_script = "uid://cmvlgsjmsk0v5"
  116. [sub_resource type="AtlasTexture" id="AtlasTexture_vq00s"]
  117. region = Rect2(0, 16, 8, 8)
  118. filter_clip = true
  119. [sub_resource type="AtlasTexture" id="AtlasTexture_8lkjq"]
  120. region = Rect2(0, 16, 8, 8)
  121. filter_clip = true
  122. [sub_resource type="Resource" id="Resource_0vgiw"]
  123. script = ExtResource("13_30rl1")
  124. SMB1 = SubResource("AtlasTexture_vq00s")
  125. SMBLL = SubResource("AtlasTexture_8lkjq")
  126. metadata/_custom_type_script = ExtResource("13_30rl1")
  127. [sub_resource type="AtlasTexture" id="AtlasTexture_a21y1"]
  128. region = Rect2(8, 8, 8, 8)
  129. filter_clip = true
  130. [sub_resource type="AtlasTexture" id="AtlasTexture_6fvob"]
  131. region = Rect2(8, 16, 8, 8)
  132. filter_clip = true
  133. [sub_resource type="Resource" id="Resource_0jga0"]
  134. script = ExtResource("13_30rl1")
  135. SMB1 = SubResource("AtlasTexture_a21y1")
  136. SMBLL = SubResource("AtlasTexture_6fvob")
  137. metadata/_custom_type_script = ExtResource("13_30rl1")
  138. [sub_resource type="AtlasTexture" id="AtlasTexture_1damu"]
  139. region = Rect2(0, 0, 8, 8)
  140. [sub_resource type="AtlasTexture" id="AtlasTexture_d26fn"]
  141. region = Rect2(8, 0, 8, 8)
  142. [sub_resource type="Resource" id="Resource_6b01v"]
  143. script = ExtResource("13_30rl1")
  144. SMB1 = SubResource("AtlasTexture_1damu")
  145. SMBLL = SubResource("AtlasTexture_d26fn")
  146. metadata/_custom_type_script = ExtResource("13_30rl1")
  147. [sub_resource type="AtlasTexture" id="AtlasTexture_0vgiw"]
  148. region = Rect2(8, 16, 8, 8)
  149. filter_clip = true
  150. [sub_resource type="AtlasTexture" id="AtlasTexture_00v33"]
  151. region = Rect2(0, 0, 8, 8)
  152. filter_clip = true
  153. [sub_resource type="AtlasTexture" id="AtlasTexture_3xvoi"]
  154. region = Rect2(0, 0, 8, 8)
  155. filter_clip = true
  156. [sub_resource type="Resource" id="Resource_vq00s"]
  157. script = ExtResource("13_30rl1")
  158. SMB1 = SubResource("AtlasTexture_00v33")
  159. SMBLL = SubResource("AtlasTexture_3xvoi")
  160. metadata/_custom_type_script = ExtResource("13_30rl1")
  161. [sub_resource type="AtlasTexture" id="AtlasTexture_ljj1p"]
  162. region = Rect2(8, 0, 8, 8)
  163. filter_clip = true
  164. [sub_resource type="AtlasTexture" id="AtlasTexture_thm6r"]
  165. region = Rect2(8, 8, 8, 8)
  166. filter_clip = true
  167. [sub_resource type="Resource" id="Resource_ur71s"]
  168. script = ExtResource("13_30rl1")
  169. SMB1 = SubResource("AtlasTexture_ljj1p")
  170. SMBLL = SubResource("AtlasTexture_thm6r")
  171. metadata/_custom_type_script = ExtResource("13_30rl1")
  172. [sub_resource type="AtlasTexture" id="AtlasTexture_rakp1"]
  173. region = Rect2(0, 8, 8, 8)
  174. filter_clip = true
  175. [sub_resource type="AtlasTexture" id="AtlasTexture_yds5h"]
  176. region = Rect2(0, 8, 8, 8)
  177. filter_clip = true
  178. [sub_resource type="Resource" id="Resource_pkswe"]
  179. script = ExtResource("13_30rl1")
  180. SMB1 = SubResource("AtlasTexture_rakp1")
  181. SMBLL = SubResource("AtlasTexture_yds5h")
  182. metadata/_custom_type_script = ExtResource("13_30rl1")
  183. [sub_resource type="AtlasTexture" id="AtlasTexture_vdt1c"]
  184. region = Rect2(0, 24, 8, 8)
  185. filter_clip = true
  186. [sub_resource type="AtlasTexture" id="AtlasTexture_nrq0t"]
  187. region = Rect2(0, 24, 8, 8)
  188. filter_clip = true
  189. [sub_resource type="Resource" id="Resource_dvjn7"]
  190. script = ExtResource("13_30rl1")
  191. SMB1 = SubResource("AtlasTexture_vdt1c")
  192. SMBLL = SubResource("AtlasTexture_nrq0t")
  193. metadata/_custom_type_script = ExtResource("13_30rl1")
  194. [sub_resource type="AtlasTexture" id="AtlasTexture_0jga0"]
  195. region = Rect2(8, 24, 8, 8)
  196. [sub_resource type="Resource" id="Resource_qalov"]
  197. script = ExtResource("5_eyjoc")
  198. Overworld = SubResource("Resource_vq00s")
  199. Underground = SubResource("Resource_pkswe")
  200. Desert = SubResource("Resource_0jga0")
  201. Snow = SubResource("Resource_ur71s")
  202. Jungle = SubResource("Resource_6b01v")
  203. Underwater = SubResource("Resource_dvjn7")
  204. Mountain = SubResource("AtlasTexture_0vgiw")
  205. Volcano = SubResource("AtlasTexture_0jga0")
  206. Castle = SubResource("Resource_0vgiw")
  207. metadata/_custom_type_script = ExtResource("5_eyjoc")
  208. [sub_resource type="GDScript" id="GDScript_30rl1"]
  209. script/source = "extends Node
  210. @export var panel: StyleBoxTexture = null
  211. @onready var resource_getter := ResourceGetter.new()
  212. @export var texture: Texture = null
  213. func _ready() -> void:
  214. update_texture()
  215. Global.level_theme_changed.connect(update_texture)
  216. func update_texture() -> void:
  217. print(name)
  218. panel.texture = resource_getter.get_resource(texture)
  219. "
  220. [sub_resource type="GDScript" id="GDScript_l7dvb"]
  221. script/source = "extends Node
  222. @export var cursor: AtlasTexture = null
  223. @export var texture: Texture = null:
  224. set(value):
  225. texture = value
  226. update_texture()
  227. func _ready() -> void:
  228. update_texture()
  229. func update_texture() -> void:
  230. cursor.atlas = texture
  231. "
  232. [sub_resource type="AtlasTexture" id="AtlasTexture_m6bur"]
  233. atlas = ExtResource("19_3l3ph")
  234. region = Rect2(0, 0, 8, 8)
  235. [node name="Global" type="Node"]
  236. process_mode = 3
  237. script = ExtResource("1_t23sr")
  238. [node name="Transition" type="CanvasLayer" parent="."]
  239. layer = 128
  240. visible = false
  241. [node name="TransitionBlock" type="ColorRect" parent="Transition"]
  242. unique_name_in_owner = true
  243. anchors_preset = 15
  244. anchor_right = 1.0
  245. anchor_bottom = 1.0
  246. grow_horizontal = 2
  247. grow_vertical = 2
  248. mouse_filter = 2
  249. color = Color(0, 0, 0, 1)
  250. [node name="Freeze" type="TextureRect" parent="Transition"]
  251. anchors_preset = 15
  252. anchor_right = 1.0
  253. anchor_bottom = 1.0
  254. grow_horizontal = 2
  255. grow_vertical = 2
  256. mouse_filter = 2
  257. [node name="AnimationPlayer" type="AnimationPlayer" parent="Transition"]
  258. libraries = {
  259. &"": SubResource("AnimationLibrary_l7dvb")
  260. }
  261. [node name="GameHUD" parent="." instance=ExtResource("1_ctvpw")]
  262. layer = 1
  263. [node name="ScoreTally" type="AudioStreamPlayer" parent="."]
  264. stream = ExtResource("3_vjpdy")
  265. bus = &"SFX"
  266. [node name="ResourceSetter" type="Node" parent="ScoreTally" node_paths=PackedStringArray("node_to_affect")]
  267. script = ExtResource("4_7puui")
  268. node_to_affect = NodePath("..")
  269. property_name = "stream"
  270. themed_resource = SubResource("Resource_6jmk5")
  271. metadata/_custom_type_script = "uid://cq6f682453q6o"
  272. [node name="ScoreTallyEnd" type="AudioStreamPlayer" parent="."]
  273. stream = ExtResource("6_30rl1")
  274. bus = &"SFX"
  275. [node name="ResourceSetter" type="Node" parent="ScoreTallyEnd" node_paths=PackedStringArray("node_to_affect")]
  276. script = ExtResource("4_7puui")
  277. node_to_affect = NodePath("..")
  278. property_name = "stream"
  279. themed_resource = SubResource("Resource_l7dvb")
  280. metadata/_custom_type_script = "uid://cq6f682453q6o"
  281. [node name="SettingsApply" type="Node" parent="."]
  282. [node name="Video" type="Node" parent="SettingsApply"]
  283. script = ExtResource("4_nxm2a")
  284. [node name="Audio" type="Node" parent="SettingsApply"]
  285. script = ExtResource("5_l70br")
  286. [node name="Visuals" type="Node" parent="SettingsApply"]
  287. script = ExtResource("6_pamiy")
  288. [node name="Difficulty" type="Node" parent="SettingsApply"]
  289. script = ExtResource("7_3324c")
  290. [node name="Timer" type="Timer" parent="."]
  291. autostart = true
  292. [node name="Framerule" type="Timer" parent="."]
  293. wait_time = 0.351
  294. autostart = true
  295. [node name="SpriteFramesToJSONConverter" type="Node" parent="."]
  296. script = ExtResource("10_nptu4")
  297. resource = SubResource("Resource_qalov")
  298. json_file_path = "res://Assets/Sprites/Blocks/BrickDestructionParticles.json"
  299. metadata/_custom_type_script = "uid://cqif1li7otvpl"
  300. [node name="PlayerGhost" parent="." instance=ExtResource("14_6o310")]
  301. process_mode = 1
  302. visible = false
  303. z_index = 50
  304. z_as_relative = false
  305. [node name="CanvasLayer" type="CanvasLayer" parent="."]
  306. [node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer"]
  307. anchors_preset = 15
  308. anchor_right = 1.0
  309. anchor_bottom = 1.0
  310. grow_horizontal = 2
  311. grow_vertical = 2
  312. mouse_filter = 2
  313. [node name="ErrorMessage" type="Label" parent="CanvasLayer/VBoxContainer"]
  314. visible = false
  315. modulate = Color(1, 0, 0, 1)
  316. layout_mode = 2
  317. theme_override_colors/font_shadow_color = Color(0.121569, 0.121569, 0.121569, 1)
  318. text = "ERROR! PLEASE REPORT!"
  319. autowrap_mode = 2
  320. uppercase = true
  321. [node name="Warning" type="Label" parent="CanvasLayer/VBoxContainer"]
  322. visible = false
  323. modulate = Color(1, 1, 0, 1)
  324. layout_mode = 2
  325. theme_override_colors/font_shadow_color = Color(0.121569, 0.121569, 0.121569, 1)
  326. text = "Warning!"
  327. autowrap_mode = 2
  328. uppercase = true
  329. [node name="Comment" type="Label" parent="CanvasLayer/VBoxContainer"]
  330. visible = false
  331. layout_mode = 2
  332. theme_override_colors/font_shadow_color = Color(0.121569, 0.121569, 0.121569, 1)
  333. text = "Comment"
  334. autowrap_mode = 2
  335. uppercase = true
  336. [node name="PanelSetter" type="Node" parent="."]
  337. script = SubResource("GDScript_30rl1")
  338. panel = ExtResource("16_l7dvb")
  339. texture = ExtResource("16_qalov")
  340. [node name="PanelSetter2" type="Node" parent="."]
  341. script = SubResource("GDScript_30rl1")
  342. panel = ExtResource("18_yyu8s")
  343. texture = ExtResource("19_xspbb")
  344. [node name="CursorSetter" type="Node" parent="."]
  345. script = SubResource("GDScript_l7dvb")
  346. cursor = ExtResource("18_xcxrh")
  347. texture = SubResource("AtlasTexture_m6bur")
  348. [node name="ResourceSetterNew" type="Node" parent="CursorSetter" node_paths=PackedStringArray("node_to_affect")]
  349. script = ExtResource("19_okfpr")
  350. node_to_affect = NodePath("..")
  351. property_name = "texture"
  352. mode = 1
  353. resource_json = ExtResource("20_3l3ph")
  354. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  355. [node name="FontUpdater" type="Node" parent="."]
  356. script = ExtResource("18_1la0o")
  357. metadata/_custom_type_script = "uid://ctsjagoa5t33f"
  358. [node name="TextShadowColourChanger" type="Node" parent="." node_paths=PackedStringArray("labels")]
  359. script = ExtResource("19_l7dvb")
  360. labels = [NodePath("../CanvasLayer/VBoxContainer/ErrorMessage"), NodePath("../CanvasLayer/VBoxContainer/Comment"), NodePath("../CanvasLayer/VBoxContainer/Warning")]
  361. metadata/_custom_type_script = "uid://dt2p68xl462v2"
  362. [connection signal="finished" from="ScoreTally" to="." method="on_score_sfx_finished"]
  363. [connection signal="finished" from="ScoreTallyEnd" to="." method="on_score_sfx_finished"]
  364. [connection signal="timeout" from="Timer" to="." method="refresh_discord_rpc"]
  365. [connection signal="timeout" from="Framerule" to="." method="emit_signal" binds= ["frame_rule"]]