From ca0d21e40a7490894beef2e37f557dea70447a23 Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Tue, 26 Aug 2025 16:20:01 +0200 Subject: [PATCH] Refactor UI components to inherit from Control and update node paths for consistency --- Autoloads/GameManager.cs | 6 +- Mr. Brick Adventures.sln.DotSettings.user | 1 + objects/camera_manager.tscn | 5 - objects/entities/big_coin.tscn | 4 +- objects/entities/big_treasure.tscn | 4 +- objects/entities/brick.tscn | 4 +- objects/entities/brick_player.tscn | 37 +++---- objects/entities/bullet.tscn | 59 +++++----- objects/entities/cage.tscn | 9 +- objects/entities/cannon.tscn | 15 ++- objects/entities/cannon_ray_down.tscn | 21 ++-- objects/entities/cannon_ray_left.tscn | 22 ++-- objects/entities/chaser.tscn | 2 +- objects/entities/child.tscn | 14 +-- objects/entities/coin.tscn | 29 +++-- objects/entities/collapsing_block.tscn | 21 ++-- objects/entities/collapsing_bridge.tscn | 22 ++-- objects/entities/enemy.tscn | 119 ++++++++++----------- objects/entities/exit_level.tscn | 28 ++--- objects/entities/exploding_brick.tscn | 62 +++++------ objects/entities/fire_brick.tscn | 65 ++++++----- objects/entities/flying_enemy.tscn | 98 ++++++++--------- objects/entities/green_laser.tscn | 67 ++++++------ objects/entities/homing_bullet.tscn | 63 +++++------ objects/entities/ice_brick.tscn | 66 ++++++------ objects/entities/jump_pad.tscn | 14 +-- objects/entities/killzone.tscn | 10 +- objects/entities/laser_beam.tscn | 21 ++-- objects/entities/lever.tscn | 14 +-- objects/entities/red_laser.tscn | 52 ++++----- objects/entities/small_heal_potion.tscn | 20 ++-- objects/entities/spaceship_enter.tscn | 6 +- objects/entities/spaceship_exit.tscn | 6 +- objects/entities/spike_wheel.tscn | 17 ++- objects/entities/treasure.tscn | 16 +-- objects/game_manager.tscn | 19 ++-- objects/level/base_level.tscn | 25 +---- objects/level/ui_layer.tscn | 23 +--- objects/tooltip.tscn | 12 +-- objects/ui/audio_settings.tscn | 12 +-- objects/ui/charging_bar_layer.tscn | 6 +- objects/ui/credits.tscn | 2 +- objects/ui/death_screen.tscn | 9 +- objects/ui/game_over_screen.tscn | 16 +-- objects/ui/hud.tscn | 12 +-- objects/ui/input_settings.tscn | 8 +- objects/ui/main_menu.tscn | 22 ++-- objects/ui/marketplace.tscn | 26 ++--- objects/ui/marketplace_button.tscn | 14 +-- objects/ui/pause_menu.tscn | 18 ++-- objects/ui/settings_menu.tscn | 16 +-- objects/ui/skill_button.tscn | 2 +- objects/ui_manager.tscn | 2 +- project.godot | 7 +- resources/levels/forest/forest_1.tres | 6 +- resources/levels/village/village_1.tres | 8 +- resources/levels/village/village_2.tres | 8 +- resources/levels/village/village_3.tres | 8 +- resources/levels/village/village_4.tres | 8 +- resources/levels/village/village_5.tres | 9 -- scenes/level_village_1.tscn | 41 ++++--- scenes/level_village_2.tscn | 25 +---- scenes/level_village_3.tscn | 26 +---- scenes/level_village_4.tscn | 52 +-------- scenes/main_menu.tscn | 28 +++-- scripts/Resources/LevelResource.cs | 13 +++ scripts/UI/AudioSettings.cs | 2 +- scripts/UI/ChargeProgressBar.cs | 7 +- scripts/UI/DeathScreen.cs | 72 +++++++++++++ scripts/UI/GameOverScreen.cs | 2 +- scripts/UI/Hud.cs | 2 +- scripts/UI/MainMenu.cs | 2 +- scripts/UI/Marketplace.cs | 4 +- scripts/UI/PauseMenu.cs | 2 +- scripts/UI/SettingsMenu.cs | 2 +- scripts/components/DamageComponent.cs | 11 +- scripts/components/ExitDoorComponent.cs | 9 +- scripts/components/PlayerController.cs | 2 +- scripts/components/PlayerDeathComponent.cs | 2 +- scripts/components/ScoreComponent.cs | 15 ++- scripts/components/TooltipComponent.cs | 7 +- scripts/resources/level_resource.gd | 5 - scripts/resources/level_resource.gd.uid | 1 - scripts/ui/hud.gd | 2 +- 84 files changed, 767 insertions(+), 884 deletions(-) delete mode 100644 objects/camera_manager.tscn delete mode 100644 resources/levels/village/village_5.tres create mode 100644 scripts/Resources/LevelResource.cs create mode 100644 scripts/UI/DeathScreen.cs delete mode 100644 scripts/resources/level_resource.gd delete mode 100644 scripts/resources/level_resource.gd.uid diff --git a/Autoloads/GameManager.cs b/Autoloads/GameManager.cs index ae81968..373da7c 100644 --- a/Autoloads/GameManager.cs +++ b/Autoloads/GameManager.cs @@ -14,7 +14,8 @@ public partial class GameManager : Node public PlayerController Player { get; set; } private List _sceneNodes = new(); - + + [Export] public Dictionary PlayerState { get; set; } = new() { { "coins", 0 }, @@ -24,7 +25,8 @@ public partial class GameManager : Node { "unlocked_levels", new Array() {0}}, { "unlocked_skills", new Array() } }; - + + [Export] public Dictionary CurrentSessionState { get; private set; } = new() { { "coins_collected", 0 }, diff --git a/Mr. Brick Adventures.sln.DotSettings.user b/Mr. Brick Adventures.sln.DotSettings.user index 38db013..fcca6bf 100644 --- a/Mr. Brick Adventures.sln.DotSettings.user +++ b/Mr. Brick Adventures.sln.DotSettings.user @@ -1,6 +1,7 @@  ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded \ No newline at end of file diff --git a/objects/camera_manager.tscn b/objects/camera_manager.tscn deleted file mode 100644 index cf4019d..0000000 --- a/objects/camera_manager.tscn +++ /dev/null @@ -1,5 +0,0 @@ -[gd_scene format=3 uid="uid://qq5g75cinhap"] - -[node name="Camera Manager" type="Node"] - -[node name="Camera Nodes" type="StaticBody2D" parent="."] diff --git a/objects/entities/big_coin.tscn b/objects/entities/big_coin.tscn index 1105fb7..0fd6bec 100644 --- a/objects/entities/big_coin.tscn +++ b/objects/entities/big_coin.tscn @@ -9,7 +9,7 @@ [sub_resource type="CircleShape2D" id="CircleShape2D_3ask2"] radius = 9.0 -[node name="Big Coin" type="Area2D"] +[node name="Big Coin" type="Area2D" groups=["coins"]] scale = Vector2(2, 2) collision_layer = 2 collision_mask = 4 @@ -23,7 +23,7 @@ hframes = 12 vframes = 12 frame = 51 -[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("Area2D", "CollisionShape", "Sfx") groups=["coins"]] +[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("Area2D", "CollisionShape", "Sfx")] script = ExtResource("2_htmrw") Area2D = NodePath("..") CollisionShape = NodePath("../CollisionShape2D") diff --git a/objects/entities/big_treasure.tscn b/objects/entities/big_treasure.tscn index 4103283..69175a4 100644 --- a/objects/entities/big_treasure.tscn +++ b/objects/entities/big_treasure.tscn @@ -9,7 +9,7 @@ [sub_resource type="CircleShape2D" id="CircleShape2D_3ask2"] radius = 9.0 -[node name="Big Treasure" type="Area2D"] +[node name="Big Treasure" type="Area2D" groups=["coins"]] collision_layer = 2 collision_mask = 4 @@ -22,7 +22,7 @@ hframes = 12 vframes = 12 frame = 64 -[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("Area2D", "CollisionShape", "Sfx") groups=["coins"]] +[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("Area2D", "CollisionShape", "Sfx")] script = ExtResource("2_lthbn") Area2D = NodePath("..") CollisionShape = NodePath("../CollisionShape2D") diff --git a/objects/entities/brick.tscn b/objects/entities/brick.tscn index 420af4d..b981802 100644 --- a/objects/entities/brick.tscn +++ b/objects/entities/brick.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 format=3 uid="uid://bymro4t7angv5"] +[gd_scene load_steps=10 format=3 uid="uid://bymro4t7angv5"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_1c3jb"] [ext_resource type="Script" uid="uid://cfw8nbrarex0i" path="res://scripts/components/BulletComponent.cs" id="2_r41xl"] @@ -8,7 +8,6 @@ [ext_resource type="Script" uid="uid://cbexrnnj47f87" path="res://scripts/components/LaunchComponent.cs" id="6_t4c40"] [ext_resource type="Script" uid="uid://c7p06t0eax8am" path="res://scripts/components/StraightMotionComponent.cs" id="7_y10b5"] [ext_resource type="PackedScene" uid="uid://c1iorglk708g0" path="res://objects/fxs/terrain_hit_fx.tscn" id="8_d0tcd"] -[ext_resource type="Script" uid="uid://cypxrqoeiihbf" path="res://scripts/components/TerrainHitFx.cs" id="9_y1xkr"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ar0xf"] size = Vector2(16, 10) @@ -62,4 +61,3 @@ LaunchComponent = NodePath("../LaunchComponent") metadata/_custom_type_script = "uid://cvcnfrr1udco5" [node name="TerrainHitFX" parent="." instance=ExtResource("8_d0tcd")] -script = ExtResource("9_y1xkr") diff --git a/objects/entities/brick_player.tscn b/objects/entities/brick_player.tscn index 8b12c99..956fe7c 100644 --- a/objects/entities/brick_player.tscn +++ b/objects/entities/brick_player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=49 format=3 uid="uid://bqi5s710xb1ju"] +[gd_scene load_steps=42 format=3 uid="uid://bqi5s710xb1ju"] [ext_resource type="Script" uid="uid://csel4s0e4g5uf" path="res://scripts/components/PlayerController.cs" id="1_yysbb"] [ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="2_lgb3u"] @@ -15,27 +15,20 @@ [ext_resource type="Script" uid="uid://byw1legrv1ep2" path="res://scripts/components/PlayerDeathComponent.cs" id="13_7til7"] [ext_resource type="Script" uid="uid://cgfynrn68lp12" path="res://scripts/components/KnockbackComponent.cs" id="14_e5pae"] [ext_resource type="Script" uid="uid://cecelixl41t3j" path="res://scripts/components/InvulnerabilityComponent.cs" id="15_xuhvf"] -[ext_resource type="Resource" uid="uid://dw5ee2lpeypnb" path="res://resources/skills/brick_throw.tres" id="16_smbir"] [ext_resource type="Script" uid="uid://dvyd26ricriql" path="res://scripts/components/FlashingComponent.cs" id="16_uno3u"] -[ext_resource type="Resource" uid="uid://2glvryih82t1" path="res://resources/skills/fire_brick.tres" id="17_6y5qu"] [ext_resource type="Script" uid="uid://dtg6115je7b5s" path="res://scripts/components/StompDamageComponent.cs" id="17_bl1gx"] +[ext_resource type="Script" uid="uid://di572axt0c3s8" path="res://scripts/SkillManager.cs" id="18_6lsog"] [ext_resource type="AudioStream" uid="uid://duj2q0rqytaxg" path="res://sfx/jump.wav" id="18_pysae"] -[ext_resource type="Resource" uid="uid://cx5fsbexblp60" path="res://resources/skills/ice_brick.tres" id="18_umfbf"] -[ext_resource type="Resource" uid="uid://cdp8sex36vdq2" path="res://resources/skills/explosive_brick.tres" id="19_5wjb7"] [ext_resource type="AudioStream" uid="uid://bmfn6p88gy575" path="res://sfx/player_hurt.wav" id="19_7anly"] +[ext_resource type="Script" uid="uid://dlh5xcv2sy82s" path="res://scripts/components/SkillUnlockedComponent.cs" id="19_gwc8i"] [ext_resource type="AudioStream" uid="uid://ycgtf6wj7mto" path="res://sfx/heal.wav" id="20_bptj5"] -[ext_resource type="Script" uid="uid://cjqe428jwip6b" path="res://scripts/skill_manager.gd" id="20_ppfy7"] -[ext_resource type="Script" uid="uid://bya240e627ti6" path="res://scripts/resources/skill_data.gd" id="21_d0oiv"] -[ext_resource type="Resource" uid="uid://d3bjre2etov1n" path="res://resources/skills/magnetic.tres" id="22_vnsgd"] -[ext_resource type="Script" uid="uid://bjsyeo1n7bsri" path="res://scripts/components/skill_unlocker_component.gd" id="23_qsv2c"] [ext_resource type="Script" uid="uid://bo506l4x0808e" path="res://scripts/components/HitComponent.cs" id="26_6n1ss"] [ext_resource type="Script" uid="uid://cjcc7fia15wu3" path="res://scripts/components/CanBeLaunchedComponent.cs" id="27_oefns"] [ext_resource type="PackedScene" uid="uid://bg76mtpcmfm2j" path="res://objects/ui/charging_bar_layer.tscn" id="28_3f5nm"] [ext_resource type="Script" uid="uid://cqau0810tjk4d" path="res://scripts/components/TriggerLeverComponent.cs" id="28_bnap0"] [ext_resource type="PackedScene" uid="uid://b12tppjkkqpt4" path="res://objects/fxs/hit_particles.tscn" id="28_jh5m0"] +[ext_resource type="Script" uid="uid://dr3uv0j7n75s" path="res://scripts/components/ShipShooterComponent.cs" id="30_usc1p"] [ext_resource type="AudioStream" uid="uid://dyev46uqusimi" path="res://sfx/shoot.wav" id="32_x2b7c"] -[ext_resource type="Script" uid="uid://d1ctdx52gskv1" path="res://scripts/components/ship_shooter.gd" id="34_gwc8i"] -[ext_resource type="Script" uid="uid://dev2q1228otm2" path="res://scripts/UI/ChargeProgressBar.cs" id="34_o1ihh"] [ext_resource type="PackedScene" uid="uid://dtem8jgcyoqar" path="res://objects/entities/green_laser.tscn" id="36_oxudy"] [ext_resource type="Script" uid="uid://diw6opv6yutgi" path="res://scripts/components/KillPlayerOutOfScreenComponent.cs" id="37_qec3q"] [ext_resource type="Script" uid="uid://3qy7rm28q66a" path="res://scripts/components/ProgressiveDamageComponent.cs" id="38_dhjci"] @@ -206,12 +199,10 @@ Area = NodePath("../StompDamageArea") Root = NodePath("..") [node name="SkillManager" type="Node" parent="."] -script = ExtResource("20_ppfy7") -available_skills = Array[ExtResource("21_d0oiv")]([ExtResource("22_vnsgd"), ExtResource("17_6y5qu"), ExtResource("16_smbir"), ExtResource("18_umfbf"), ExtResource("19_5wjb7")]) +script = ExtResource("18_6lsog") -[node name="SkillUnlockerComponent" type="Node" parent="." node_paths=PackedStringArray("skill_manager")] -script = ExtResource("23_qsv2c") -skill_manager = NodePath("../SkillManager") +[node name="SkillUnlockerComponent" type="Node" parent="."] +script = ExtResource("19_gwc8i") [node name="HitComponent" type="Node" parent="." node_paths=PackedStringArray("Sprite", "Health", "HitFx")] script = ExtResource("26_6n1ss") @@ -250,22 +241,20 @@ bus = &"sfx" stream = ExtResource("32_x2b7c") bus = &"sfx" -[node name="ChargingBarLayer" parent="." node_paths=PackedStringArray("ProgressBar") instance=ExtResource("28_3f5nm")] +[node name="ChargingBarLayer" parent="." instance=ExtResource("28_3f5nm")] offset_left = -17.0 offset_top = -30.0 offset_right = 23.0 offset_bottom = -20.0 -script = ExtResource("34_o1ihh") -ProgressBar = NodePath(".") [node name="HitParticles" parent="." instance=ExtResource("28_jh5m0")] process_material = SubResource("ParticleProcessMaterial_lgb3u") -[node name="ShipShooter" type="Node" parent="." node_paths=PackedStringArray("bullet_spawn", "shoot_sfx")] -script = ExtResource("34_gwc8i") -bullet_scene = ExtResource("36_oxudy") -bullet_spawn = NodePath("../Ship shoot spawn") -shoot_sfx = NodePath("../sfx_shoot") +[node name="ShipShooter" type="Node" parent="." node_paths=PackedStringArray("BulletSpawn", "ShootSfx")] +script = ExtResource("30_usc1p") +BulletScene = ExtResource("36_oxudy") +BulletSpawn = NodePath("../Ship shoot spawn") +ShootSfx = NodePath("../sfx_shoot") metadata/_custom_type_script = "uid://d1ctdx52gskv1" [node name="Ship shoot spawn" type="Marker2D" parent="."] diff --git a/objects/entities/bullet.tscn b/objects/entities/bullet.tscn index d786c6f..e5f87ce 100644 --- a/objects/entities/bullet.tscn +++ b/objects/entities/bullet.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=10 format=3 uid="uid://bhc7y4xugu4q7"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_w543f"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="2_ll0xw"] -[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="3_keogl"] -[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="4_lqg4f"] -[ext_resource type="Script" uid="uid://bvsgg8lu0a8m6" path="res://scripts/components/lifetime_component.gd" id="5_qsc5m"] -[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="6_6th6w"] -[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="7_e0mqp"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="2_6th6w"] +[ext_resource type="Script" uid="uid://cs6u3sh68f43j" path="res://scripts/components/OutOfScreenComponent.cs" id="3_e0mqp"] +[ext_resource type="Script" uid="uid://oyf25mpc5etr" path="res://scripts/components/LifetimeComponent.cs" id="4_r4wv6"] +[ext_resource type="Script" uid="uid://cbexrnnj47f87" path="res://scripts/components/LaunchComponent.cs" id="5_7bijt"] +[ext_resource type="Script" uid="uid://c7p06t0eax8am" path="res://scripts/components/StraightMotionComponent.cs" id="6_lycw2"] +[ext_resource type="Script" uid="uid://cfw8nbrarex0i" path="res://scripts/components/BulletComponent.cs" id="7_2aweg"] [ext_resource type="PackedScene" uid="uid://c1iorglk708g0" path="res://objects/fxs/terrain_hit_fx.tscn" id="8_6th6w"] [sub_resource type="CircleShape2D" id="CircleShape2D_txsw8"] @@ -30,42 +30,37 @@ frame = 79 position = Vector2(2.38419e-07, 2.38419e-07) scale = Vector2(0.4, 0.4) -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("2_ll0xw") -area2d = NodePath("..") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area", "DamageTimer")] +script = ExtResource("2_6th6w") +Area = NodePath("..") +DamageTimer = NodePath("../Timer") [node name="Timer" type="Timer" parent="."] wait_time = 5.0 autostart = true -[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("visibility_notifier", "root")] -script = ExtResource("4_lqg4f") -visibility_notifier = NodePath("../VisibleOnScreenNotifier2D") -root = NodePath("..") +[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("VisibilityNotifier")] +script = ExtResource("3_e0mqp") +VisibilityNotifier = NodePath("../VisibleOnScreenNotifier2D") -[node name="LifetimeComponent" type="Node" parent="." node_paths=PackedStringArray("root", "timer")] -script = ExtResource("5_qsc5m") -root = NodePath("..") -life_time = 10.0 -timer = NodePath("../Timer") +[node name="LifetimeComponent" type="Node" parent="."] +script = ExtResource("4_r4wv6") +LifeTime = 10.0 -[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")] -script = ExtResource("6_6th6w") -root = NodePath("..") -speed = 120.0 +[node name="LaunchComponent" type="Node2D" parent="."] +script = ExtResource("5_7bijt") +Speed = 120.0 metadata/_custom_type_script = "uid://873un8agkyja" -[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")] -script = ExtResource("7_e0mqp") -root = NodePath("..") -launch_component = NodePath("../LaunchComponent") +[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("LaunchComponent")] +script = ExtResource("6_lycw2") +LaunchComponent = NodePath("../LaunchComponent") -[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d", "hit_terrain_fx", "bullet_sprite")] -script = ExtResource("3_keogl") -root = NodePath("..") -area2d = NodePath("..") -hit_terrain_fx = NodePath("../TerrainHitFX") -bullet_sprite = NodePath("../Sprite2D") +[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("Area", "TerrainHitFx", "BulletSprite")] +script = ExtResource("7_2aweg") +Area = NodePath("..") +TerrainHitFx = NodePath("../TerrainHitFX") +BulletSprite = NodePath("../Sprite2D") metadata/_custom_type_script = "uid://cdnwrn8v05qhi" [node name="TerrainHitFX" parent="." instance=ExtResource("8_6th6w")] diff --git a/objects/entities/cage.tscn b/objects/entities/cage.tscn index df08133..ff6dbab 100644 --- a/objects/entities/cage.tscn +++ b/objects/entities/cage.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=5 format=3 uid="uid://to2xnqev0pu1"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_5poh3"] -[ext_resource type="Script" uid="uid://ddplvyjqguxtl" path="res://scripts/components/cage_component.gd" id="2_unomj"] +[ext_resource type="Script" uid="uid://dojn0gw8hsv02" path="res://scripts/components/CageComponent.cs" id="2_in1f7"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_aivtb"] texture = ExtResource("1_5poh3") @@ -23,7 +23,6 @@ position = Vector2(20, 4) tile_map_data = PackedByteArray(0, 0, 255, 255, 255, 255, 0, 0, 2, 0, 9, 0, 0, 0) tile_set = SubResource("TileSet_67qt2") -[node name="CageComponent" type="Node" parent="." node_paths=PackedStringArray("root")] -script = ExtResource("2_unomj") -root = NodePath("..") -should_free = false +[node name="CageComponent" type="Node" parent="."] +script = ExtResource("2_in1f7") +ShouldFree = false diff --git a/objects/entities/cannon.tscn b/objects/entities/cannon.tscn index 1dbda6f..80129e6 100644 --- a/objects/entities/cannon.tscn +++ b/objects/entities/cannon.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=5 format=3 uid="uid://dstko446qydsc"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_6gptm"] -[ext_resource type="Script" uid="uid://d01dmoafptl2p" path="res://scripts/components/destroyable_component.gd" id="2_2tib2"] -[ext_resource type="Script" uid="uid://btfsq0bvtrx3t" path="res://scripts/components/health.gd" id="3_vevhj"] +[ext_resource type="Script" uid="uid://ctfrbj52ejay4" path="res://scripts/components/DestroyableComponent.cs" id="2_q37h7"] +[ext_resource type="Script" uid="uid://dgb8bqcri7nsj" path="res://scripts/components/HealthComponent.cs" id="3_bhwy3"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_j5sus"] size = Vector2(16, 16) @@ -15,13 +15,12 @@ hframes = 12 vframes = 12 frame = 42 -[node name="DestroyableComponent" type="Node" parent="." node_paths=PackedStringArray("root", "health_component")] -script = ExtResource("2_2tib2") -root = NodePath("..") -health_component = NodePath("../HealthComponent") +[node name="DestroyableComponent" type="Node" parent="." node_paths=PackedStringArray("Health")] +script = ExtResource("2_q37h7") +Health = NodePath("../HealthComponent") -[node name="HealthComponent" type="Node" parent="."] -script = ExtResource("3_vevhj") +[node name="HealthComponent" type="Node2D" parent="."] +script = ExtResource("3_bhwy3") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_j5sus") diff --git a/objects/entities/cannon_ray_down.tscn b/objects/entities/cannon_ray_down.tscn index 0055434..11e11cb 100644 --- a/objects/entities/cannon_ray_down.tscn +++ b/objects/entities/cannon_ray_down.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=5 format=3 uid="uid://dfwpha0d18dmn"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_rwgpm"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="2_cprue"] -[ext_resource type="Script" uid="uid://bejv75mi8npj0" path="res://scripts/components/beam_component.gd" id="3_jlh0s"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="2_hrj61"] +[ext_resource type="Script" uid="uid://df1llrbm80e02" path="res://scripts/components/BeamComponent.cs" id="3_hrj61"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ptfn7"] size = Vector2(8, 16) @@ -20,13 +20,14 @@ region_rect = Rect2(176, 64, 16, 16) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_ptfn7") -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("2_cprue") -area2d = NodePath("..") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("2_hrj61") +Area = NodePath("..") -[node name="BeamComponent" type="Node2D" parent="." node_paths=PackedStringArray("root", "sprite2d", "collision_shape")] +[node name="BeamComponent" type="Node2D" parent="." node_paths=PackedStringArray("Root", "Sprite", "CollisionShape")] position = Vector2(0, -8) -script = ExtResource("3_jlh0s") -root = NodePath("..") -sprite2d = NodePath("../Sprite2D") -collision_shape = NodePath("../CollisionShape2D") +script = ExtResource("3_hrj61") +ExpansionSpeed = 16.0 +Root = NodePath(".") +Sprite = NodePath("../Sprite2D") +CollisionShape = NodePath("../CollisionShape2D") diff --git a/objects/entities/cannon_ray_left.tscn b/objects/entities/cannon_ray_left.tscn index 3ab4acb..bd059cd 100644 --- a/objects/entities/cannon_ray_left.tscn +++ b/objects/entities/cannon_ray_left.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=5 format=3 uid="uid://d3lt4rhxduv44"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_l5x2w"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="2_mxy0q"] -[ext_resource type="Script" uid="uid://bejv75mi8npj0" path="res://scripts/components/beam_component.gd" id="3_mcbof"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="2_0kbpg"] +[ext_resource type="Script" uid="uid://df1llrbm80e02" path="res://scripts/components/BeamComponent.cs" id="3_0kbpg"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ptfn7"] size = Vector2(16, 8) @@ -22,14 +22,14 @@ region_filter_clip_enabled = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_ptfn7") -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("2_mxy0q") -area2d = NodePath("..") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("2_0kbpg") +Area = NodePath("..") -[node name="BeamComponent" type="Node2D" parent="." node_paths=PackedStringArray("root", "sprite2d", "collision_shape")] +[node name="BeamComponent" type="Node2D" parent="." node_paths=PackedStringArray("Root", "Sprite", "CollisionShape")] position = Vector2(8, 0) -script = ExtResource("3_mcbof") -direction = Vector2(-1, 0) -root = NodePath("..") -sprite2d = NodePath("../Sprite2D") -collision_shape = NodePath("../CollisionShape2D") +script = ExtResource("3_0kbpg") +ExpansionSpeed = 16.0 +Root = NodePath("..") +Sprite = NodePath("../Sprite2D") +CollisionShape = NodePath("../CollisionShape2D") diff --git a/objects/entities/chaser.tscn b/objects/entities/chaser.tscn index 05f7b90..ec21bf7 100644 --- a/objects/entities/chaser.tscn +++ b/objects/entities/chaser.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://bon6raeddf3tu"] -[ext_resource type="Script" uid="uid://cf4li7whw5old" path="res://scripts/components/chase_level_component.gd" id="1_ico16"] +[ext_resource type="Script" uid="uid://dnpj72mfi1ywl" path="res://scripts/components/ChaseLevelComponent.cs" id="1_ico16"] [node name="Chaser" type="Node2D"] diff --git a/objects/entities/child.tscn b/objects/entities/child.tscn index f1c81ef..10b5d2c 100644 --- a/objects/entities/child.tscn +++ b/objects/entities/child.tscn @@ -5,7 +5,7 @@ [ext_resource type="Texture2D" uid="uid://iiawtnwmeny3" path="res://sprites/right_eye.png" id="3_k41y7"] [ext_resource type="Texture2D" uid="uid://8h05rd26t66q" path="res://sprites/lollipop.png" id="4_vq1oq"] [ext_resource type="Texture2D" uid="uid://dpbpjffbdbovp" path="res://sprites/cap.png" id="5_m7x6t"] -[ext_resource type="Script" uid="uid://pa1bwc4no08q" path="res://scripts/components/collectable.gd" id="5_wc3ym"] +[ext_resource type="Script" uid="uid://r4jybneigfcn" path="res://scripts/components/CollectableComponent.cs" id="6_rgif4"] [ext_resource type="Resource" uid="uid://b6apusc0jmi3x" path="res://resources/collectables/child.tres" id="6_vmvuo"] [ext_resource type="AudioStream" uid="uid://drfr0wlgkhkdq" path="res://sfx/child_pickup.wav" id="7_j8eyh"] @@ -45,12 +45,12 @@ texture = ExtResource("4_vq1oq") position = Vector2(4, -18) texture = ExtResource("5_m7x6t") -[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d", "collision_shape", "sfx")] -script = ExtResource("5_wc3ym") -area2d = NodePath("..") -collision_shape = NodePath("../CollisionShape2D") -collectable_data = ExtResource("6_vmvuo") -sfx = NodePath("../sfx_pickup") +[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("Area2D", "CollisionShape", "Sfx")] +script = ExtResource("6_rgif4") +Area2D = NodePath("..") +CollisionShape = NodePath("../CollisionShape2D") +Data = ExtResource("6_vmvuo") +Sfx = NodePath("../sfx_pickup") [node name="sfx_pickup" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("7_j8eyh") diff --git a/objects/entities/coin.tscn b/objects/entities/coin.tscn index 1dc80b1..3cc7a98 100644 --- a/objects/entities/coin.tscn +++ b/objects/entities/coin.tscn @@ -1,15 +1,15 @@ [gd_scene load_steps=7 format=3 uid="uid://54w4wisfj8v8"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_epuj5"] -[ext_resource type="Script" uid="uid://pa1bwc4no08q" path="res://scripts/components/collectable.gd" id="2_y0k47"] +[ext_resource type="Script" uid="uid://r4jybneigfcn" path="res://scripts/components/CollectableComponent.cs" id="2_gxix7"] [ext_resource type="Resource" uid="uid://vql535ckoeqm" path="res://resources/collectables/coin.tres" id="3_fm2fq"] -[ext_resource type="Script" uid="uid://bg75hnr3q6grk" path="res://scripts/components/fade_away.gd" id="4_fx1h2"] +[ext_resource type="Script" uid="uid://bjln6jb1sigx2" path="res://scripts/components/FadeAwayComponent.cs" id="4_gxix7"] [ext_resource type="AudioStream" uid="uid://dpyr80hk4kebc" path="res://sfx/pickup_coin_1.wav" id="5_4jc2c"] [sub_resource type="CircleShape2D" id="CircleShape2D_3ask2"] radius = 9.0 -[node name="Coin" type="Area2D"] +[node name="Coin" type="Area2D" groups=["coins"]] collision_layer = 2 collision_mask = 4 @@ -22,19 +22,18 @@ hframes = 12 vframes = 12 frame = 51 -[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d", "collision_shape", "sfx") groups=["coins"]] -script = ExtResource("2_y0k47") -area2d = NodePath("..") -collision_shape = NodePath("../CollisionShape2D") -collectable_data = ExtResource("3_fm2fq") -sfx = NodePath("../sfx") +[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("Area2D", "CollisionShape", "Sfx")] +script = ExtResource("2_gxix7") +Area2D = NodePath("..") +CollisionShape = NodePath("../CollisionShape2D") +Data = ExtResource("3_fm2fq") +Sfx = NodePath("../sfx") -[node name="FadeAwayComponent" type="Node" parent="." node_paths=PackedStringArray("sprite2d", "root", "area2d")] -script = ExtResource("4_fx1h2") -sprite2d = NodePath("../Sprite2D") -fade_duration = 0.4 -root = NodePath("..") -area2d = NodePath("..") +[node name="FadeAwayComponent" type="Node" parent="." node_paths=PackedStringArray("Sprite", "Area")] +script = ExtResource("4_gxix7") +Sprite = NodePath("../Sprite2D") +FadeDuration = 0.4 +Area = NodePath("..") [node name="sfx" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("5_4jc2c") diff --git a/objects/entities/collapsing_block.tscn b/objects/entities/collapsing_block.tscn index 6e8b5d6..86b1ee5 100644 --- a/objects/entities/collapsing_block.tscn +++ b/objects/entities/collapsing_block.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=5 format=3 uid="uid://c40r76qqacqie"] [ext_resource type="Texture2D" uid="uid://cw42lvnqxubq2" path="res://sprites/PS_Tileset_10_nes.png" id="1_jmsgb"] -[ext_resource type="Script" uid="uid://r0a6xjicrh74" path="res://scripts/components/collapsable.gd" id="2_cs5vh"] +[ext_resource type="Script" uid="uid://xqhrb1c7f6y4" path="res://scripts/components/CollapsableComponent.cs" id="2_jmsgb"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_l44jt"] size = Vector2(16, 16) @@ -32,16 +32,15 @@ wait_time = 0.5 [node name="ResetTimer" type="Timer" parent="."] -[node name="CollapsableComponent" type="Node" parent="." node_paths=PackedStringArray("to_collapse_timer", "reset_timer", "sprite2d", "collision_shape")] -script = ExtResource("2_cs5vh") -to_collapse_timer = NodePath("../ToCollapseTimer") -reset_timer = NodePath("../ResetTimer") -sprite2d = NodePath("../Sprite2D") -collision_shape = NodePath("../StaticCollisionShape2D") -collapse_time = 0.75 -reset_time = 3.0 +[node name="CollapsableComponent" type="Node" parent="." node_paths=PackedStringArray("ToCollapseTimer", "ResetTimer", "Sprite2D", "CollisionShape")] +script = ExtResource("2_jmsgb") +ToCollapseTimer = NodePath("../ToCollapseTimer") +ResetTimer = NodePath("../ResetTimer") +Sprite2D = NodePath("../Sprite2D") +CollisionShape = NodePath("../Collapsable detector/AreaCollisionShape2D") +ResetTime = 1.0 -[connection signal="body_entered" from="Collapsable detector" to="CollapsableComponent" method="_on_collapsable_detector_body_entered"] -[connection signal="body_exited" from="Collapsable detector" to="CollapsableComponent" method="_on_collapsable_detector_body_exited"] +[connection signal="body_entered" from="Collapsable detector" to="CollapsableComponent" method="OnCollapsableDetectorBodyEntered"] +[connection signal="body_exited" from="Collapsable detector" to="CollapsableComponent" method="OnCollapsableDetectorBodyExited"] [connection signal="timeout" from="ToCollapseTimer" to="CollapsableComponent" method="_on_to_collapse_timer_timeout"] [connection signal="timeout" from="ResetTimer" to="CollapsableComponent" method="_on_reset_timer_timeout"] diff --git a/objects/entities/collapsing_bridge.tscn b/objects/entities/collapsing_bridge.tscn index 28e99b8..5e80bdf 100644 --- a/objects/entities/collapsing_bridge.tscn +++ b/objects/entities/collapsing_bridge.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=5 format=3 uid="uid://ct8fim6mduyl3"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_rka1x"] -[ext_resource type="Script" uid="uid://r0a6xjicrh74" path="res://scripts/components/collapsable.gd" id="2_3vvum"] +[ext_resource type="Script" uid="uid://xqhrb1c7f6y4" path="res://scripts/components/CollapsableComponent.cs" id="2_w33sr"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_l44jt"] size = Vector2(16, 4) @@ -34,16 +34,16 @@ wait_time = 0.5 [node name="ResetTimer" type="Timer" parent="."] -[node name="CollapsableComponent" type="Node" parent="." node_paths=PackedStringArray("to_collapse_timer", "reset_timer", "sprite2d", "collision_shape")] -script = ExtResource("2_3vvum") -to_collapse_timer = NodePath("../ToCollapseTimer") -reset_timer = NodePath("../ResetTimer") -sprite2d = NodePath("../Sprite2D") -collision_shape = NodePath("../StaticCollisionShape2D") -collapse_time = 0.75 -reset_time = 3.0 +[node name="CollapsableComponent" type="Node" parent="." node_paths=PackedStringArray("ToCollapseTimer", "ResetTimer", "Sprite2D", "CollisionShape")] +script = ExtResource("2_w33sr") +ToCollapseTimer = NodePath("../ToCollapseTimer") +ResetTimer = NodePath("../ResetTimer") +Sprite2D = NodePath("../Sprite2D") +CollisionShape = NodePath("../Collapsable detector/AreaCollisionShape2D") +CollapseTime = 0.75 +ResetTime = 3.0 -[connection signal="body_entered" from="Collapsable detector" to="CollapsableComponent" method="_on_collapsable_detector_body_entered"] -[connection signal="body_exited" from="Collapsable detector" to="CollapsableComponent" method="_on_collapsable_detector_body_exited"] +[connection signal="body_entered" from="Collapsable detector" to="CollapsableComponent" method="OnCollapsableDetectorBodyEntered"] +[connection signal="body_exited" from="Collapsable detector" to="CollapsableComponent" method="OnCollapsableDetectorBodyExited"] [connection signal="timeout" from="ToCollapseTimer" to="CollapsableComponent" method="_on_to_collapse_timer_timeout"] [connection signal="timeout" from="ResetTimer" to="CollapsableComponent" method="_on_reset_timer_timeout"] diff --git a/objects/entities/enemy.tscn b/objects/entities/enemy.tscn index d679692..8be4216 100644 --- a/objects/entities/enemy.tscn +++ b/objects/entities/enemy.tscn @@ -1,18 +1,19 @@ -[gd_scene load_steps=26 format=3 uid="uid://bwdlmualj6xbw"] +[gd_scene load_steps=27 format=3 uid="uid://bwdlmualj6xbw"] [ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="1_ep4yr"] [ext_resource type="Texture2D" uid="uid://cu72810eyk4dx" path="res://sprites/enemy-robot.png" id="2_hjtwe"] -[ext_resource type="Script" uid="uid://btfsq0bvtrx3t" path="res://scripts/components/health.gd" id="2_o170m"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="4_4eajk"] -[ext_resource type="Script" uid="uid://dmqpif5qhvri3" path="res://scripts/components/side_to_side_movement.gd" id="4_gbsq8"] -[ext_resource type="Script" uid="uid://b37gqnycj6rtk" path="res://scripts/components/periodic_shooting.gd" id="5_m03v0"] -[ext_resource type="Script" uid="uid://dqm371fysuk7i" path="res://scripts/components/enemy_death.gd" id="6_6p3gr"] -[ext_resource type="Script" uid="uid://dqmbvuutd5c3c" path="res://scripts/components/flashing_component.gd" id="7_xsaiy"] -[ext_resource type="Script" uid="uid://ceq8n7yw7qxpi" path="res://scripts/components/hit_component.gd" id="9_0qjr4"] -[ext_resource type="Script" uid="uid://c07d50s20rl8s" path="res://scripts/components/status_effect_component.gd" id="10_5i27q"] -[ext_resource type="Script" uid="uid://qi2irprbqru2" path="res://scripts/components/fire_effect_component.gd" id="10_ej8vg"] -[ext_resource type="Script" uid="uid://dhj4qtwcqmqkj" path="res://scripts/components/ice_effect_component.gd" id="11_pq0k7"] +[ext_resource type="Script" uid="uid://dgb8bqcri7nsj" path="res://scripts/components/HealthComponent.cs" id="3_pxaaa"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="4_xku20"] +[ext_resource type="Script" uid="uid://d2hrr8fruho1d" path="res://scripts/components/SideToSideMovementComponent.cs" id="5_5lji2"] +[ext_resource type="Script" uid="uid://bnaxy8cw3wrko" path="res://scripts/components/PeriodicShootingComponent.cs" id="6_lgbyy"] +[ext_resource type="PackedScene" uid="uid://bhc7y4xugu4q7" path="res://objects/entities/bullet.tscn" id="7_r48kf"] +[ext_resource type="Script" uid="uid://cfdugoeduudar" path="res://scripts/components/EnemyDeathComponent.cs" id="8_pxaaa"] +[ext_resource type="Script" uid="uid://dvyd26ricriql" path="res://scripts/components/FlashingComponent.cs" id="9_xku20"] +[ext_resource type="Script" uid="uid://bo506l4x0808e" path="res://scripts/components/HitComponent.cs" id="10_5lji2"] +[ext_resource type="Script" uid="uid://t8rsvwdwt8ea" path="res://scripts/components/StatusEffectComponent.cs" id="11_lgbyy"] +[ext_resource type="Script" uid="uid://cxuig4xh8nfov" path="res://scripts/components/FireEffectComponent.cs" id="12_pxaaa"] [ext_resource type="AudioStream" uid="uid://b3tsqhr06pbrs" path="res://sfx/enemy_hurt.wav" id="13_u4k3d"] +[ext_resource type="Script" uid="uid://d1388lhp2gpgr" path="res://scripts/components/IceEffectComponent.cs" id="13_xku20"] [ext_resource type="AudioStream" uid="uid://dyev46uqusimi" path="res://sfx/shoot.wav" id="14_tdjks"] [ext_resource type="PackedScene" uid="uid://dx80ivlvuuew4" path="res://objects/fxs/fire_fx.tscn" id="15_mc6rj"] [ext_resource type="PackedScene" uid="uid://ck6nml06tm6ue" path="res://objects/fxs/ice_fx.tscn" id="16_68hnm"] @@ -77,38 +78,37 @@ position = Vector2(16, 7) [node name="left bullet spawn" type="Node2D" parent="Sprite2D"] position = Vector2(-17, 7) -[node name="HealthComponent" type="Node" parent="." node_paths=PackedStringArray("hurt_fx")] -script = ExtResource("2_o170m") -hurt_fx = NodePath("../sfx_hurt") +[node name="HealthComponent" type="Node2D" parent="." node_paths=PackedStringArray("HurtSfx")] +script = ExtResource("3_pxaaa") +HurtSfx = NodePath("../sfx_hurt") -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("4_4eajk") -area2d = NodePath("../Hitbox") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("4_xku20") +Area = NodePath("../Hitbox") -[node name="SideToSideMovement" type="Node" parent="." node_paths=PackedStringArray("root", "sprite2d", "left_ray", "right_ray", "left_wall_ray", "right_wall_ray")] -script = ExtResource("4_gbsq8") -root = NodePath("..") -sprite2d = NodePath("../Sprite2D") -speed = 60.0 -wait_time = 0.5 -left_ray = NodePath("../Left Ray") -right_ray = NodePath("../Right Ray") -left_wall_ray = NodePath("../Left Wall Ray") -right_wall_ray = NodePath("../Right Wall Ray") +[node name="SideToSideMovement" type="Node" parent="." node_paths=PackedStringArray("Sprite", "LeftRay", "RightRay", "LeftWallRay", "RightWallRay")] +script = ExtResource("5_5lji2") +Sprite = NodePath("../Sprite2D") +Speed = 60.0 +WaitTime = 0.5 +LeftRay = NodePath("../Left Ray") +RightRay = NodePath("../Right Ray") +LeftWallRay = NodePath("../Left Wall Ray") +RightWallRay = NodePath("../Right Wall Ray") -[node name="PeriodicShootingComponent" type="Node" parent="." node_paths=PackedStringArray("side_to_side_movement", "root", "bullet_spawn_right", "bullet_spawn_left")] -script = ExtResource("5_m03v0") -side_to_side_movement = NodePath("../SideToSideMovement") -root = NodePath("..") -bullet_spawn_right = NodePath("../Sprite2D/right bullet spawn") -bullet_spawn_left = NodePath("../Sprite2D/left bullet spawn") +[node name="PeriodicShootingComponent" type="Node" parent="." node_paths=PackedStringArray("SideToSideMovement", "BulletSpawnRight", "BulletSpawnLeft")] +script = ExtResource("6_lgbyy") +BulletScene = ExtResource("7_r48kf") +SideToSideMovement = NodePath("../SideToSideMovement") +BulletSpawnRight = NodePath("../Sprite2D/right bullet spawn") +BulletSpawnLeft = NodePath("../Sprite2D/left bullet spawn") +ShootingIntervalVariation = 0.1 -[node name="EnemyDeathComponent" type="Node" parent="." node_paths=PackedStringArray("root", "collision_shape_2d", "health_component")] -script = ExtResource("6_6p3gr") -root = NodePath("..") -tween_duration = 0.1 -collision_shape_2d = NodePath("../Hitbox/CollisionShape2D") -health_component = NodePath("../HealthComponent") +[node name="EnemyDeathComponent" type="Node" parent="." node_paths=PackedStringArray("CollisionShape", "Health")] +script = ExtResource("8_pxaaa") +TweenDuration = 0.1 +CollisionShape = NodePath("../Hitbox/CollisionShape2D") +Health = NodePath("../HealthComponent") [node name="Hitbox" type="Area2D" parent="."] collision_layer = 8 @@ -136,33 +136,32 @@ target_position = Vector2(0, 8) position = Vector2(16, 0) target_position = Vector2(8, 0) -[node name="FlashingComponent" type="Node" parent="." node_paths=PackedStringArray("sprite", "health_component")] +[node name="FlashingComponent" type="Node" parent="." node_paths=PackedStringArray("Sprite", "HealthComponent")] process_mode = 3 -script = ExtResource("7_xsaiy") -sprite = NodePath("../Sprite2D") -health_component = NodePath("../HealthComponent") +script = ExtResource("9_xku20") +Sprite = NodePath("../Sprite2D") +HealthComponent = NodePath("../HealthComponent") -[node name="HitComponent" type="Node" parent="." node_paths=PackedStringArray("sprite", "health_component", "hit_fx")] -script = ExtResource("9_0qjr4") -sprite = NodePath("../Sprite2D") -health_component = NodePath("../HealthComponent") -hit_fx = NodePath("../HitParticles") +[node name="HitComponent" type="Node" parent="." node_paths=PackedStringArray("Sprite", "Health", "HitFx")] +script = ExtResource("10_5lji2") +Sprite = NodePath("../Sprite2D") +Health = NodePath("../HealthComponent") +HitFx = NodePath("../HitParticles") [node name="StatusEffectComponent" type="Node" parent="."] -script = ExtResource("10_5i27q") +script = ExtResource("11_lgbyy") -[node name="FireEffectComponent" type="Node" parent="." node_paths=PackedStringArray("health_component", "status_effect_component", "root", "fire_fx")] -script = ExtResource("10_ej8vg") -health_component = NodePath("../HealthComponent") -status_effect_component = NodePath("../StatusEffectComponent") -root = NodePath("..") -fire_fx = NodePath("../FireFX") +[node name="FireEffectComponent" type="Node" parent="." node_paths=PackedStringArray("Health", "StatusEffectComponent", "FireFX")] +script = ExtResource("12_pxaaa") +Health = NodePath("../HealthComponent") +StatusEffectComponent = NodePath("../StatusEffectComponent") +FireFX = NodePath("../FireFX") -[node name="IceEffectComponent" type="Node" parent="." node_paths=PackedStringArray("status_effect_component", "ice_fx")] -script = ExtResource("11_pq0k7") -components_to_disable = [NodePath("../SideToSideMovement"), NodePath("../PeriodicShootingComponent"), NodePath("../DamageComponent")] -status_effect_component = NodePath("../StatusEffectComponent") -ice_fx = NodePath("../Ice FX") +[node name="IceEffectComponent" type="Node" parent="." node_paths=PackedStringArray("ComponentsToDisable", "StatusEffectComponent", "IceFx")] +script = ExtResource("13_xku20") +ComponentsToDisable = [NodePath("../SideToSideMovement"), NodePath("../PeriodicShootingComponent"), NodePath("../DamageComponent")] +StatusEffectComponent = NodePath("../StatusEffectComponent") +IceFx = NodePath("../Ice FX") [node name="sfx_hurt" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("13_u4k3d") diff --git a/objects/entities/exit_level.tscn b/objects/entities/exit_level.tscn index 08448b6..45d3f3d 100644 --- a/objects/entities/exit_level.tscn +++ b/objects/entities/exit_level.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=6 format=3 uid="uid://12jnkdygpxwc"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_agxwm"] -[ext_resource type="Script" uid="uid://cmh8k0rdsyh7j" path="res://scripts/components/requirement_component.gd" id="2_iysc1"] -[ext_resource type="Script" uid="uid://c8xhgkg8gcqu6" path="res://scripts/components/unlock_on_requirement_component.gd" id="3_5ktpq"] -[ext_resource type="Script" uid="uid://bwamqffvpa452" path="res://scripts/components/exit_door_component.gd" id="4_4jgt0"] +[ext_resource type="Script" uid="uid://dnh0mekg2vqxi" path="res://scripts/components/RequirementComponent.cs" id="2_ed7mh"] +[ext_resource type="Script" uid="uid://gwr4eajx8j50" path="res://scripts/components/UnlockOnRequirementComponent.cs" id="3_ed7mh"] +[ext_resource type="Script" uid="uid://c5mhwlyvfuaip" path="res://scripts/components/ExitDoorComponent.cs" id="4_06sog"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_yfu6m"] size = Vector2(28, 32) @@ -25,19 +25,19 @@ position = Vector2(0, -8) shape = SubResource("RectangleShape2D_yfu6m") [node name="RequirementComponent" type="Node" parent="."] -script = ExtResource("2_iysc1") -requirement_type = 1 +script = ExtResource("2_ed7mh") +RequirementType = 1 metadata/_custom_type_script = "uid://cmh8k0rdsyh7j" -[node name="UnlockOnRequirementComponent" type="Node" parent="." node_paths=PackedStringArray("requirement_component", "unlock_target")] -script = ExtResource("3_5ktpq") -requirement_component = NodePath("../RequirementComponent") -unlock_target = NodePath("../ExitDoorComponent") +[node name="UnlockOnRequirementComponent" type="Node" parent="." node_paths=PackedStringArray("RequirementComponent", "UnlockTarget")] +script = ExtResource("3_ed7mh") +RequirementComponent = NodePath("../RequirementComponent") +UnlockTarget = NodePath("../ExitDoorComponent") metadata/_custom_type_script = "uid://c8xhgkg8gcqu6" -[node name="ExitDoorComponent" type="Node" parent="." node_paths=PackedStringArray("exit_area", "door_sprite")] -script = ExtResource("4_4jgt0") -exit_area = NodePath("..") -door_sprite = NodePath("../Sprite2D") -opened_door_frame = 88 +[node name="ExitDoorComponent" type="Node" parent="." node_paths=PackedStringArray("ExitArea", "DoorSprite")] +script = ExtResource("4_06sog") +ExitArea = NodePath("..") +DoorSprite = NodePath("../Sprite2D") +OpenedDoorFrame = 1 metadata/_custom_type_script = "uid://bwamqffvpa452" diff --git a/objects/entities/exploding_brick.tscn b/objects/entities/exploding_brick.tscn index 3e7ee06..a471f00 100644 --- a/objects/entities/exploding_brick.tscn +++ b/objects/entities/exploding_brick.tscn @@ -1,13 +1,13 @@ [gd_scene load_steps=12 format=3 uid="uid://5surx230gfw3"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_rcgxf"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="3_y0uai"] -[ext_resource type="Script" uid="uid://beg4dk7d5pvhp" path="res://scripts/components/explosive_component.gd" id="4_8lw0n"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="2_nqeob"] +[ext_resource type="Script" uid="uid://7uttgdr6cr5y" path="res://scripts/components/ExplosiveComponent.cs" id="3_a2b5x"] [ext_resource type="PackedScene" uid="uid://dyp4i4ru2j2jh" path="res://objects/fxs/explosion_fx.tscn" id="5_6oopj"] -[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="7_a2b5x"] -[ext_resource type="Script" uid="uid://bvsgg8lu0a8m6" path="res://scripts/components/lifetime_component.gd" id="7_nqeob"] -[ext_resource type="Script" uid="uid://c2gbumw4x4t1v" path="res://scripts/components/gravity_motion_component.gd" id="8_4ly8b"] -[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="8_nqeob"] +[ext_resource type="Script" uid="uid://oyf25mpc5etr" path="res://scripts/components/LifetimeComponent.cs" id="5_nqeob"] +[ext_resource type="Script" uid="uid://cbexrnnj47f87" path="res://scripts/components/LaunchComponent.cs" id="6_a2b5x"] +[ext_resource type="Script" uid="uid://cwi5qashdag1g" path="res://scripts/components/GravityMotionComponent.cs" id="7_4ly8b"] +[ext_resource type="Script" uid="uid://c7n6ecsobohjn" path="res://scripts/components/ProjectileInitComponent.cs" id="8_nqeob"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ar0xf"] size = Vector2(16, 10) @@ -37,19 +37,17 @@ scale = Vector2(0.8, 0.5) [node name="Timer" type="Timer" parent="."] -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d", "damage_timer")] -script = ExtResource("3_y0uai") -damage = 5.0 -area2d = NodePath("../Explosion area") -damage_timer = NodePath("../Timer") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("DamageTimer")] +script = ExtResource("2_nqeob") +Damage = 5.0 +DamageTimer = NodePath("../Timer") -[node name="ExplosiveComponent" type="Node" parent="." node_paths=PackedStringArray("root", "damage", "area2d", "explosion_area2d")] -script = ExtResource("4_8lw0n") -root = NodePath("..") -damage = NodePath("../DamageComponent") -area2d = NodePath("../BulletArea") -explosion_area2d = NodePath("../Explosion area") -explosion_effect = ExtResource("5_6oopj") +[node name="ExplosiveComponent" type="Node" parent="." node_paths=PackedStringArray("Damage", "Area", "ExplodeArea")] +script = ExtResource("3_a2b5x") +Damage = NodePath("../DamageComponent") +Area = NodePath("../BulletArea") +ExplodeArea = NodePath("../Explosion area") +ExplosionEffect = ExtResource("5_6oopj") [node name="Explosion area" type="Area2D" parent="."] collision_layer = 0 @@ -62,22 +60,20 @@ debug_color = Color(0.919034, 6.36289e-05, 0.69998, 0.42) [node name="ExplosionFX" parent="." instance=ExtResource("5_6oopj")] randomness = 0.24 -[node name="LifetimeComponent" type="Node" parent="." node_paths=PackedStringArray("root", "timer")] -script = ExtResource("7_nqeob") -root = NodePath("..") -life_time = 30.0 -timer = NodePath("../Timer") +[node name="LifetimeComponent" type="Node" parent="."] +script = ExtResource("5_nqeob") +LifeTime = 30.0 -[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")] -script = ExtResource("7_a2b5x") -root = NodePath("..") -speed = 240.0 +[node name="LaunchComponent" type="Node2D" parent="."] +script = ExtResource("6_a2b5x") +Speed = 240.0 metadata/_custom_type_script = "uid://873un8agkyja" -[node name="GravityMotionComponent" type="Node2D" parent="." node_paths=PackedStringArray("character_body", "launch_component")] -script = ExtResource("8_4ly8b") -character_body = NodePath("..") -launch_component = NodePath("../LaunchComponent") +[node name="GravityMotionComponent" type="Node2D" parent="." node_paths=PackedStringArray("Body", "LaunchComponent")] +script = ExtResource("7_4ly8b") +Body = NodePath("..") +LaunchComponent = NodePath("../LaunchComponent") +Gravity = Vector2(0, 980) [node name="BulletArea" type="Area2D" parent="."] collision_layer = 16 @@ -85,7 +81,7 @@ collision_layer = 16 [node name="CollisionShape2D" type="CollisionShape2D" parent="BulletArea"] shape = SubResource("RectangleShape2D_nqeob") -[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("launch_component")] +[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("LaunchComponent")] script = ExtResource("8_nqeob") -launch_component = NodePath("../LaunchComponent") +LaunchComponent = NodePath("../LaunchComponent") metadata/_custom_type_script = "uid://bgty7040ams6s" diff --git a/objects/entities/fire_brick.tscn b/objects/entities/fire_brick.tscn index 74fb710..2e18bd8 100644 --- a/objects/entities/fire_brick.tscn +++ b/objects/entities/fire_brick.tscn @@ -1,14 +1,14 @@ [gd_scene load_steps=11 format=3 uid="uid://daau4j5hbklk0"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_52l28"] -[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="2_hjcob"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="3_sog2h"] +[ext_resource type="Script" uid="uid://cfw8nbrarex0i" path="res://scripts/components/BulletComponent.cs" id="2_5ybdf"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="3_b1kpf"] [ext_resource type="Resource" uid="uid://obodgnkhxuhe" path="res://resources/status_effect/fire.tres" id="4_xx5l4"] -[ext_resource type="Script" uid="uid://d3brcje121krs" path="res://scripts/components/effect_inflictor_component.gd" id="5_ofrqk"] -[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="6_64yur"] -[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="7_hulun"] -[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="8_kift8"] -[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="9_5ybdf"] +[ext_resource type="Script" uid="uid://xjq33vj0rol0" path="res://scripts/components/EffectInflictorComponent.cs" id="5_wfje1"] +[ext_resource type="Script" uid="uid://cs6u3sh68f43j" path="res://scripts/components/OutOfScreenComponent.cs" id="6_666k7"] +[ext_resource type="Script" uid="uid://cbexrnnj47f87" path="res://scripts/components/LaunchComponent.cs" id="7_67bn4"] +[ext_resource type="Script" uid="uid://c7p06t0eax8am" path="res://scripts/components/StraightMotionComponent.cs" id="8_5ybdf"] +[ext_resource type="Script" uid="uid://c7n6ecsobohjn" path="res://scripts/components/ProjectileInitComponent.cs" id="9_b1kpf"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ar0xf"] size = Vector2(16, 10) @@ -26,10 +26,10 @@ hframes = 12 vframes = 12 frame = 80 -[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")] -script = ExtResource("2_hjcob") -root = NodePath("..") -area2d = NodePath("..") +[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("Area", "BulletSprite")] +script = ExtResource("2_5ybdf") +Area = NodePath("..") +BulletSprite = NodePath("../Sprite2D") [node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] position = Vector2(0, 2.38419e-07) @@ -37,34 +37,31 @@ scale = Vector2(0.8, 0.5) [node name="Timer" type="Timer" parent="."] -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("3_sog2h") -damage = 0.1 -area2d = NodePath("..") -status_effect_data = ExtResource("4_xx5l4") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area", "DamageTimer")] +script = ExtResource("3_b1kpf") +Area = NodePath("..") +StatusEffectData = ExtResource("4_xx5l4") +DamageTimer = NodePath("../Timer") -[node name="EffectInflictorComponent" type="Node" parent="." node_paths=PackedStringArray("damage")] -script = ExtResource("5_ofrqk") -damage = NodePath("../DamageComponent") +[node name="EffectInflictorComponent" type="Node" parent="." node_paths=PackedStringArray("Damage")] +script = ExtResource("5_wfje1") +Damage = NodePath("../DamageComponent") -[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("visibility_notifier", "root")] -script = ExtResource("6_64yur") -visibility_notifier = NodePath("../VisibleOnScreenNotifier2D") -root = NodePath("..") +[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("VisibilityNotifier")] +script = ExtResource("6_666k7") +VisibilityNotifier = NodePath("../VisibleOnScreenNotifier2D") -[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")] -script = ExtResource("7_hulun") -root = NodePath("..") -speed = 200.0 +[node name="LaunchComponent" type="Node2D" parent="."] +script = ExtResource("7_67bn4") +Speed = 200.0 metadata/_custom_type_script = "uid://873un8agkyja" -[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")] -script = ExtResource("8_kift8") -root = NodePath("..") -launch_component = NodePath("../LaunchComponent") +[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("LaunchComponent")] +script = ExtResource("8_5ybdf") +LaunchComponent = NodePath("../LaunchComponent") metadata/_custom_type_script = "uid://cvcnfrr1udco5" -[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("launch_component")] -script = ExtResource("9_5ybdf") -launch_component = NodePath("../LaunchComponent") +[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("LaunchComponent")] +script = ExtResource("9_b1kpf") +LaunchComponent = NodePath("../LaunchComponent") metadata/_custom_type_script = "uid://bgty7040ams6s" diff --git a/objects/entities/flying_enemy.tscn b/objects/entities/flying_enemy.tscn index 318014b..773d1d8 100644 --- a/objects/entities/flying_enemy.tscn +++ b/objects/entities/flying_enemy.tscn @@ -2,20 +2,20 @@ [ext_resource type="Texture2D" uid="uid://22k1u37j6k8y" path="res://sprites/flying_enemy.png" id="1_30hhw"] [ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="1_uyhuj"] -[ext_resource type="Script" uid="uid://btfsq0bvtrx3t" path="res://scripts/components/health.gd" id="2_ivniq"] [ext_resource type="AudioStream" uid="uid://b3tsqhr06pbrs" path="res://sfx/enemy_hurt.wav" id="3_fd2du"] +[ext_resource type="Script" uid="uid://dgb8bqcri7nsj" path="res://scripts/components/HealthComponent.cs" id="3_uyhuj"] [ext_resource type="AudioStream" uid="uid://dyev46uqusimi" path="res://sfx/shoot.wav" id="4_rhq76"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="5_cmp1h"] -[ext_resource type="Script" uid="uid://b37gqnycj6rtk" path="res://scripts/components/periodic_shooting.gd" id="6_4ajjm"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="6_q78ru"] [ext_resource type="PackedScene" uid="uid://t422jkov2t1b" path="res://objects/entities/red_laser.tscn" id="7_4ajjm"] -[ext_resource type="Script" uid="uid://dqm371fysuk7i" path="res://scripts/components/enemy_death.gd" id="7_uyhuj"] -[ext_resource type="Script" uid="uid://dqmbvuutd5c3c" path="res://scripts/components/flashing_component.gd" id="8_q78ru"] -[ext_resource type="Script" uid="uid://ceq8n7yw7qxpi" path="res://scripts/components/hit_component.gd" id="9_weo6b"] -[ext_resource type="Script" uid="uid://c07d50s20rl8s" path="res://scripts/components/status_effect_component.gd" id="10_6p4k7"] -[ext_resource type="Script" uid="uid://qi2irprbqru2" path="res://scripts/components/fire_effect_component.gd" id="11_jmybk"] -[ext_resource type="Script" uid="uid://dhj4qtwcqmqkj" path="res://scripts/components/ice_effect_component.gd" id="12_2yvae"] +[ext_resource type="Script" uid="uid://bnaxy8cw3wrko" path="res://scripts/components/PeriodicShootingComponent.cs" id="7_weo6b"] +[ext_resource type="Script" uid="uid://cfdugoeduudar" path="res://scripts/components/EnemyDeathComponent.cs" id="9_6p4k7"] +[ext_resource type="Script" uid="uid://dvyd26ricriql" path="res://scripts/components/FlashingComponent.cs" id="10_jmybk"] +[ext_resource type="Script" uid="uid://bo506l4x0808e" path="res://scripts/components/HitComponent.cs" id="11_2yvae"] +[ext_resource type="Script" uid="uid://t8rsvwdwt8ea" path="res://scripts/components/StatusEffectComponent.cs" id="12_xlup2"] +[ext_resource type="Script" uid="uid://cxuig4xh8nfov" path="res://scripts/components/FireEffectComponent.cs" id="13_mrjm6"] [ext_resource type="PackedScene" uid="uid://b12tppjkkqpt4" path="res://objects/fxs/hit_particles.tscn" id="13_xlup2"] [ext_resource type="PackedScene" uid="uid://dx80ivlvuuew4" path="res://objects/fxs/fire_fx.tscn" id="14_mrjm6"] +[ext_resource type="Script" uid="uid://d1388lhp2gpgr" path="res://scripts/components/IceEffectComponent.cs" id="14_pkino"] [ext_resource type="PackedScene" uid="uid://ck6nml06tm6ue" path="res://objects/fxs/ice_fx.tscn" id="15_pkino"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_hil2i"] @@ -106,10 +106,9 @@ explosiveness = 0.5 fixed_fps = 24 process_material = SubResource("ParticleProcessMaterial_fd2du") -[node name="HealthComponent" type="Node" parent="." node_paths=PackedStringArray("hurt_fx")] -script = ExtResource("2_ivniq") -hurt_fx = NodePath("../sfx_hurt") -metadata/_custom_type_script = "uid://btfsq0bvtrx3t" +[node name="HealthComponent" type="Node2D" parent="." node_paths=PackedStringArray("HurtSfx")] +script = ExtResource("3_uyhuj") +HurtSfx = NodePath("../sfx_hurt") [node name="sfx_hurt" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("3_fd2du") @@ -119,53 +118,50 @@ bus = &"sfx" stream = ExtResource("4_rhq76") bus = &"sfx" -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("5_cmp1h") -area2d = NodePath("../Hitbox") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("6_q78ru") +Area = NodePath("../Hitbox") -[node name="PeriodicShootingComponent" type="Node" parent="." node_paths=PackedStringArray("root", "bullet_spawn_right", "bullet_spawn_left")] -script = ExtResource("6_4ajjm") -bullet_scene = ExtResource("7_4ajjm") -shoot_interval = 2.0 -root = NodePath("..") -bullet_spawn_right = NodePath("../laser spawn point right") -bullet_spawn_left = NodePath("../laser spawn point left") -shooting_interval_variation = 0.5 +[node name="PeriodicShootingComponent" type="Node" parent="." node_paths=PackedStringArray("BulletSpawnRight", "BulletSpawnLeft")] +script = ExtResource("7_weo6b") +BulletScene = ExtResource("7_4ajjm") +ShootInterval = 2.0 +BulletSpawnRight = NodePath("../laser spawn point right") +BulletSpawnLeft = NodePath("../laser spawn point left") +ShootingIntervalVariation = 0.5 -[node name="EnemyDeathComponent" type="Node" parent="." node_paths=PackedStringArray("root", "collision_shape_2d", "health_component")] -script = ExtResource("7_uyhuj") -root = NodePath("..") -tween_duration = 0.1 -collision_shape_2d = NodePath("../CollisionShape2D") -health_component = NodePath("../HealthComponent") +[node name="EnemyDeathComponent" type="Node" parent="." node_paths=PackedStringArray("CollisionShape", "Health")] +script = ExtResource("9_6p4k7") +TweenDuration = 0.1 +CollisionShape = NodePath("../CollisionShape2D") +Health = NodePath("../HealthComponent") -[node name="FlashingComponent" type="Node" parent="." node_paths=PackedStringArray("sprite", "health_component")] +[node name="FlashingComponent" type="Node" parent="." node_paths=PackedStringArray("Sprite", "HealthComponent")] process_mode = 3 -script = ExtResource("8_q78ru") -sprite = NodePath("../Sprite2D") -health_component = NodePath("../HealthComponent") +script = ExtResource("10_jmybk") +Sprite = NodePath("../Sprite2D") +HealthComponent = NodePath("../HealthComponent") -[node name="HitComponent" type="Node" parent="." node_paths=PackedStringArray("sprite", "health_component", "hit_fx")] -script = ExtResource("9_weo6b") -sprite = NodePath("../Sprite2D") -health_component = NodePath("../HealthComponent") -hit_fx = NodePath("../HitParticles") +[node name="HitComponent" type="Node" parent="." node_paths=PackedStringArray("Sprite", "Health", "HitFx")] +script = ExtResource("11_2yvae") +Sprite = NodePath("../Sprite2D") +Health = NodePath("../HealthComponent") +HitFx = NodePath("../HitParticles") [node name="StatusEffectComponent" type="Node" parent="."] -script = ExtResource("10_6p4k7") +script = ExtResource("12_xlup2") -[node name="FireEffectComponent" type="Node" parent="." node_paths=PackedStringArray("health_component", "status_effect_component", "root", "fire_fx")] -script = ExtResource("11_jmybk") -health_component = NodePath("../HealthComponent") -status_effect_component = NodePath("../StatusEffectComponent") -root = NodePath("..") -fire_fx = NodePath("../FireFX") +[node name="FireEffectComponent" type="Node" parent="." node_paths=PackedStringArray("Health", "StatusEffectComponent", "FireFX")] +script = ExtResource("13_mrjm6") +Health = NodePath("../HealthComponent") +StatusEffectComponent = NodePath("../StatusEffectComponent") +FireFX = NodePath("../FireFX") -[node name="IceEffectComponent" type="Node" parent="." node_paths=PackedStringArray("status_effect_component", "ice_fx")] -script = ExtResource("12_2yvae") -components_to_disable = [NodePath("../PeriodicShootingComponent"), NodePath("../DamageComponent")] -status_effect_component = NodePath("../StatusEffectComponent") -ice_fx = NodePath("../Ice FX") +[node name="IceEffectComponent" type="Node" parent="." node_paths=PackedStringArray("ComponentsToDisable", "StatusEffectComponent", "IceFx")] +script = ExtResource("14_pkino") +ComponentsToDisable = [NodePath("../PeriodicShootingComponent"), NodePath("../DamageComponent")] +StatusEffectComponent = NodePath("../StatusEffectComponent") +IceFx = NodePath("../Ice FX") [node name="HitParticles" parent="." instance=ExtResource("13_xlup2")] position = Vector2(0, 1) diff --git a/objects/entities/green_laser.tscn b/objects/entities/green_laser.tscn index d6eeeb1..ed02b47 100644 --- a/objects/entities/green_laser.tscn +++ b/objects/entities/green_laser.tscn @@ -1,13 +1,13 @@ [gd_scene load_steps=10 format=3 uid="uid://dtem8jgcyoqar"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="1_nuljg"] -[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="2_1gu8o"] -[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="3_2vcrp"] -[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="4_2bmqm"] -[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="5_772bd"] -[ext_resource type="Script" uid="uid://bvsgg8lu0a8m6" path="res://scripts/components/lifetime_component.gd" id="6_vd16u"] -[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="7_1gu8o"] -[ext_resource type="Script" uid="uid://bpy6xtfm8l3hy" path="res://scripts/components/trigger_lever_component.gd" id="8_2vcrp"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="1_2vcrp"] +[ext_resource type="Script" uid="uid://cfw8nbrarex0i" path="res://scripts/components/BulletComponent.cs" id="2_2bmqm"] +[ext_resource type="Script" uid="uid://cs6u3sh68f43j" path="res://scripts/components/OutOfScreenComponent.cs" id="3_772bd"] +[ext_resource type="Script" uid="uid://c7p06t0eax8am" path="res://scripts/components/StraightMotionComponent.cs" id="4_vd16u"] +[ext_resource type="Script" uid="uid://cbexrnnj47f87" path="res://scripts/components/LaunchComponent.cs" id="5_8s1u3"] +[ext_resource type="Script" uid="uid://oyf25mpc5etr" path="res://scripts/components/LifetimeComponent.cs" id="6_vuegc"] +[ext_resource type="Script" uid="uid://c7n6ecsobohjn" path="res://scripts/components/ProjectileInitComponent.cs" id="7_kkqle"] +[ext_resource type="Script" uid="uid://cqau0810tjk4d" path="res://scripts/components/TriggerLeverComponent.cs" id="8_g8he0"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_n4uav"] size = Vector2(16, 2) @@ -16,10 +16,9 @@ size = Vector2(16, 2) collision_layer = 16 collision_mask = 9 -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("1_nuljg") -damage = 1.0 -area2d = NodePath("..") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("1_2vcrp") +Area = NodePath("..") metadata/_custom_type_script = "uid://dkmxhjtmu5xlb" [node name="CollisionShape2D" type="CollisionShape2D" parent="."] @@ -31,50 +30,44 @@ points = PackedVector2Array(0, 0, 16, 0) width = 2.0 default_color = Color(0, 94.012, 1, 1) -[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")] -script = ExtResource("2_1gu8o") -root = NodePath("..") -area2d = NodePath("..") +[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("2_2bmqm") +Area = NodePath("..") metadata/_custom_type_script = "uid://cdnwrn8v05qhi" -[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("visibility_notifier", "root")] -script = ExtResource("3_2vcrp") -visibility_notifier = NodePath("../VisibleOnScreenNotifier2D") -root = NodePath("..") +[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("VisibilityNotifier")] +script = ExtResource("3_772bd") +VisibilityNotifier = NodePath("../VisibleOnScreenNotifier2D") metadata/_custom_type_script = "uid://1tnr46o1ib4u" [node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] position = Vector2(8, 0) scale = Vector2(0.8, 0.1) -[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")] -script = ExtResource("4_2bmqm") -root = NodePath("..") -launch_component = NodePath("../LaunchComponent") +[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("LaunchComponent")] +script = ExtResource("4_vd16u") +LaunchComponent = NodePath("../LaunchComponent") metadata/_custom_type_script = "uid://cvcnfrr1udco5" -[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")] -script = ExtResource("5_772bd") -root = NodePath("..") -speed = 320.0 +[node name="LaunchComponent" type="Node2D" parent="."] +script = ExtResource("5_8s1u3") +Speed = 320.0 metadata/_custom_type_script = "uid://873un8agkyja" -[node name="LifetimeComponent" type="Node" parent="." node_paths=PackedStringArray("root", "timer")] -script = ExtResource("6_vd16u") -root = NodePath("..") -life_time = 10.0 -timer = NodePath("../Timer") +[node name="LifetimeComponent" type="Node" parent="."] +script = ExtResource("6_vuegc") +LifeTime = 10.0 metadata/_custom_type_script = "uid://bvsgg8lu0a8m6" [node name="Timer" type="Timer" parent="."] wait_time = 5.0 autostart = true -[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("launch_component")] -script = ExtResource("7_1gu8o") -launch_component = NodePath("../LaunchComponent") +[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("LaunchComponent")] +script = ExtResource("7_kkqle") +LaunchComponent = NodePath("../LaunchComponent") metadata/_custom_type_script = "uid://bgty7040ams6s" [node name="TriggerLeverComponent" type="Node" parent="."] -script = ExtResource("8_2vcrp") +script = ExtResource("8_g8he0") metadata/_custom_type_script = "uid://bpy6xtfm8l3hy" diff --git a/objects/entities/homing_bullet.tscn b/objects/entities/homing_bullet.tscn index cbc1491..3e7feb7 100644 --- a/objects/entities/homing_bullet.tscn +++ b/objects/entities/homing_bullet.tscn @@ -1,13 +1,13 @@ [gd_scene load_steps=13 format=3 uid="uid://jiv4e82ycwmq"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_bmfqy"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="2_id4r8"] -[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="3_2uduj"] -[ext_resource type="Script" uid="uid://bvsgg8lu0a8m6" path="res://scripts/components/lifetime_component.gd" id="4_x32ji"] -[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="5_r3id6"] -[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="7_8gqaa"] -[ext_resource type="Script" uid="uid://be8jhvb8t3kif" path="res://scripts/components/homing_missile_motion.gd" id="7_bmfqy"] -[ext_resource type="Script" uid="uid://c0bvan0swashx" path="res://scripts/components/trail_component.gd" id="8_id4r8"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="2_id4r8"] +[ext_resource type="Script" uid="uid://cs6u3sh68f43j" path="res://scripts/components/OutOfScreenComponent.cs" id="3_2uduj"] +[ext_resource type="Script" uid="uid://oyf25mpc5etr" path="res://scripts/components/LifetimeComponent.cs" id="4_x32ji"] +[ext_resource type="Script" uid="uid://cbexrnnj47f87" path="res://scripts/components/LaunchComponent.cs" id="5_id4r8"] +[ext_resource type="Script" uid="uid://cfw8nbrarex0i" path="res://scripts/components/BulletComponent.cs" id="6_2uduj"] +[ext_resource type="Script" uid="uid://c2hplha6af74q" path="res://scripts/components/HomingMissileMotionComponent.cs" id="7_x32ji"] +[ext_resource type="Script" uid="uid://cqkh5e36p5fj0" path="res://scripts/components/TrailComponent.cs" id="8_id4r8"] [sub_resource type="CircleShape2D" id="CircleShape2D_txsw8"] radius = 4.0 @@ -41,47 +41,42 @@ frame = 79 position = Vector2(2.38419e-07, 2.38419e-07) scale = Vector2(0.4, 0.4) -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] script = ExtResource("2_id4r8") -area2d = NodePath("..") +Area = NodePath("..") [node name="Timer" type="Timer" parent="."] wait_time = 5.0 autostart = true -[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("visibility_notifier", "root")] +[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("VisibilityNotifier")] script = ExtResource("3_2uduj") -visibility_notifier = NodePath("../VisibleOnScreenNotifier2D") -root = NodePath("..") +VisibilityNotifier = NodePath("../VisibleOnScreenNotifier2D") -[node name="LifetimeComponent" type="Node" parent="." node_paths=PackedStringArray("root", "timer")] +[node name="LifetimeComponent" type="Node" parent="."] script = ExtResource("4_x32ji") -root = NodePath("..") -life_time = 10.0 -timer = NodePath("../Timer") +LifeTime = 10.0 -[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")] -script = ExtResource("5_r3id6") -root = NodePath("..") -speed = 120.0 +[node name="LaunchComponent" type="Node2D" parent="."] +script = ExtResource("5_id4r8") +Speed = 120.0 metadata/_custom_type_script = "uid://873un8agkyja" -[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")] -script = ExtResource("7_8gqaa") -root = NodePath("..") -area2d = NodePath("..") +[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("Area", "BulletSprite")] +script = ExtResource("6_2uduj") +Area = NodePath("..") +BulletSprite = NodePath("../Sprite2D") metadata/_custom_type_script = "uid://cdnwrn8v05qhi" -[node name="HomingMissileMotion" type="Node" parent="." node_paths=PackedStringArray("launch_component", "root", "detection_area")] -script = ExtResource("7_bmfqy") -launch_component = NodePath("../LaunchComponent") -root = NodePath("..") -max_speed = 122.0 -acceleration = 4.0 -detection_area = NodePath("../DetectionArea") -wobble_strength = 10.0 -drag = 1.0 -steering_lerp = 0.01 +[node name="HomingMissileMotion" type="Node" parent="." node_paths=PackedStringArray("Launch", "DetectionArea")] +script = ExtResource("7_x32ji") +Launch = NodePath("../LaunchComponent") +MaxSpeed = 122.0 +Acceleration = 4.0 +WobbleStrength = 10.0 +Drag = 1.0 +SteeringLerp = 0.01 +DetectionArea = NodePath("../DetectionArea") [node name="DetectionArea" type="Area2D" parent="."] collision_layer = 0 diff --git a/objects/entities/ice_brick.tscn b/objects/entities/ice_brick.tscn index a4695ec..788e85d 100644 --- a/objects/entities/ice_brick.tscn +++ b/objects/entities/ice_brick.tscn @@ -1,14 +1,13 @@ -[gd_scene load_steps=11 format=3 uid="uid://bcmx07k12gcsc"] +[gd_scene load_steps=10 format=3 uid="uid://bcmx07k12gcsc"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_xusxl"] -[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="2_ilnf5"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="3_3yf4g"] -[ext_resource type="Resource" uid="uid://02l4nbnf2aft" path="res://resources/status_effect/ice.tres" id="4_da7hn"] -[ext_resource type="Script" uid="uid://d3brcje121krs" path="res://scripts/components/effect_inflictor_component.gd" id="5_x7vqb"] -[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="6_7tdxt"] -[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="7_22hnt"] -[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="8_xvjl0"] -[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="9_xvjl0"] +[ext_resource type="Script" uid="uid://cfw8nbrarex0i" path="res://scripts/components/BulletComponent.cs" id="2_xvjl0"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="3_22hnt"] +[ext_resource type="Script" uid="uid://xjq33vj0rol0" path="res://scripts/components/EffectInflictorComponent.cs" id="4_22hnt"] +[ext_resource type="Script" uid="uid://cs6u3sh68f43j" path="res://scripts/components/OutOfScreenComponent.cs" id="5_xvjl0"] +[ext_resource type="Script" uid="uid://c7p06t0eax8am" path="res://scripts/components/StraightMotionComponent.cs" id="6_6nrp8"] +[ext_resource type="Script" uid="uid://cbexrnnj47f87" path="res://scripts/components/LaunchComponent.cs" id="7_oml3k"] +[ext_resource type="Script" uid="uid://c7n6ecsobohjn" path="res://scripts/components/ProjectileInitComponent.cs" id="8_22hnt"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ar0xf"] size = Vector2(16, 10) @@ -26,10 +25,10 @@ hframes = 12 vframes = 12 frame = 80 -[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")] -script = ExtResource("2_ilnf5") -root = NodePath("..") -area2d = NodePath("..") +[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("Area", "BulletSprite")] +script = ExtResource("2_xvjl0") +Area = NodePath("..") +BulletSprite = NodePath("../Sprite2D") [node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] position = Vector2(0, 2.38419e-07) @@ -37,34 +36,29 @@ scale = Vector2(0.8, 0.5) [node name="Timer" type="Timer" parent="."] -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("3_3yf4g") -damage = 0.05 -area2d = NodePath("..") -status_effect_data = ExtResource("4_da7hn") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("3_22hnt") +Area = NodePath("..") -[node name="EffectInflictorComponent" type="Node" parent="." node_paths=PackedStringArray("damage")] -script = ExtResource("5_x7vqb") -damage = NodePath("../DamageComponent") +[node name="EffectInflictorComponent" type="Node" parent="." node_paths=PackedStringArray("Damage")] +script = ExtResource("4_22hnt") +Damage = NodePath("../DamageComponent") -[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("visibility_notifier", "root")] -script = ExtResource("6_7tdxt") -visibility_notifier = NodePath("../VisibleOnScreenNotifier2D") -root = NodePath("..") +[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("VisibilityNotifier")] +script = ExtResource("5_xvjl0") +VisibilityNotifier = NodePath("../VisibleOnScreenNotifier2D") -[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")] -script = ExtResource("7_22hnt") -root = NodePath("..") -launch_component = NodePath("../LaunchComponent") +[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("LaunchComponent")] +script = ExtResource("6_6nrp8") +LaunchComponent = NodePath("../LaunchComponent") metadata/_custom_type_script = "uid://cvcnfrr1udco5" -[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")] -script = ExtResource("8_xvjl0") -root = NodePath("..") -speed = 170.0 +[node name="LaunchComponent" type="Node2D" parent="."] +script = ExtResource("7_oml3k") +Speed = 170.0 metadata/_custom_type_script = "uid://873un8agkyja" -[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("launch_component")] -script = ExtResource("9_xvjl0") -launch_component = NodePath("../LaunchComponent") +[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("LaunchComponent")] +script = ExtResource("8_22hnt") +LaunchComponent = NodePath("../LaunchComponent") metadata/_custom_type_script = "uid://bgty7040ams6s" diff --git a/objects/entities/jump_pad.tscn b/objects/entities/jump_pad.tscn index c458bad..a346395 100644 --- a/objects/entities/jump_pad.tscn +++ b/objects/entities/jump_pad.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://cm3rixnnev1pg"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_ctugi"] -[ext_resource type="Script" uid="uid://dwok2qx4wpkey" path="res://scripts/components/jump_pad_component.gd" id="2_2ypfs"] +[ext_resource type="Script" uid="uid://bgbnof7aeydmq" path="res://scripts/components/JumpPadComponent.cs" id="2_huktk"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ci3ij"] size = Vector2(16, 6) @@ -20,9 +20,9 @@ hframes = 12 vframes = 12 frame = 120 -[node name="JumpPadComponent" type="Node" parent="." node_paths=PackedStringArray("area2d", "sprite2d")] -script = ExtResource("2_2ypfs") -jump_force = 1110.0 -area2d = NodePath("..") -sprite2d = NodePath("../Sprite2D") -start_animation_index = 120 +[node name="JumpPadComponent" type="Node" parent="." node_paths=PackedStringArray("Area", "Sprite")] +script = ExtResource("2_huktk") +JumpForce = 1110.0 +Area = NodePath("..") +Sprite = NodePath("../Sprite2D") +StartAnimationIndex = 120 diff --git a/objects/entities/killzone.tscn b/objects/entities/killzone.tscn index 1f7b37c..58f2cc2 100644 --- a/objects/entities/killzone.tscn +++ b/objects/entities/killzone.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3 uid="uid://bqom4cm7r18db"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="1_un3fl"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="1_ggub0"] [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_cr00c"] @@ -11,7 +11,7 @@ collision_mask = 4 [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("WorldBoundaryShape2D_cr00c") -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("1_un3fl") -damage = 999999.0 -area2d = NodePath("..") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("1_ggub0") +Damage = 400000.0 +Area = NodePath("..") diff --git a/objects/entities/laser_beam.tscn b/objects/entities/laser_beam.tscn index 7287291..4a636b5 100644 --- a/objects/entities/laser_beam.tscn +++ b/objects/entities/laser_beam.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=5 format=3 uid="uid://c7ku0k8n55hjv"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_brnkm"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="2_x12f0"] -[ext_resource type="Script" uid="uid://bejv75mi8npj0" path="res://scripts/components/beam_component.gd" id="3_6pj0h"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="2_l5xec"] +[ext_resource type="Script" uid="uid://df1llrbm80e02" path="res://scripts/components/BeamComponent.cs" id="3_l5xec"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ptfn7"] size = Vector2(8, 16) @@ -20,13 +20,14 @@ region_rect = Rect2(176, 64, 16, 16) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_ptfn7") -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("2_x12f0") -area2d = NodePath("..") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("2_l5xec") +Area = NodePath("..") -[node name="BeamComponent" type="Node2D" parent="." node_paths=PackedStringArray("root", "sprite2d", "collision_shape")] +[node name="BeamComponent" type="Node2D" parent="." node_paths=PackedStringArray("Root", "Sprite", "CollisionShape")] position = Vector2(0, -8) -script = ExtResource("3_6pj0h") -root = NodePath("..") -sprite2d = NodePath("../Sprite2D") -collision_shape = NodePath("../CollisionShape2D") +script = ExtResource("3_l5xec") +ExpansionSpeed = 16.0 +Root = NodePath("..") +Sprite = NodePath("../Sprite2D") +CollisionShape = NodePath("../CollisionShape2D") diff --git a/objects/entities/lever.tscn b/objects/entities/lever.tscn index 6a5b499..36990b2 100644 --- a/objects/entities/lever.tscn +++ b/objects/entities/lever.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=5 format=3 uid="uid://bd51frym6mm7v"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_psg62"] -[ext_resource type="Script" uid="uid://hyuwsp1b336a" path="res://scripts/components/lever_component.gd" id="2_0p0wb"] +[ext_resource type="Script" uid="uid://1oo22ieply7n" path="res://scripts/components/LeverComponent.cs" id="2_a6tw0"] [ext_resource type="AudioStream" uid="uid://beq14we7v3iw4" path="res://sfx/activate_lever.wav" id="3_gipby"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ke5tv"] @@ -21,12 +21,12 @@ hframes = 12 vframes = 12 frame = 75 -[node name="LeverComponent" type="Node" parent="." node_paths=PackedStringArray("area2d", "sprite2d", "sfx")] -script = ExtResource("2_0p0wb") -area2d = NodePath("..") -sprite2d = NodePath("../Sprite2D") -start_animation_index = 75 -sfx = NodePath("../sfx") +[node name="LeverComponent" type="Node" parent="." node_paths=PackedStringArray("Area", "Sprite", "Sfx")] +script = ExtResource("2_a6tw0") +Area = NodePath("..") +Sprite = NodePath("../Sprite2D") +StartAnimationIndex = 75 +Sfx = NodePath("../sfx") [node name="sfx" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("3_gipby") diff --git a/objects/entities/red_laser.tscn b/objects/entities/red_laser.tscn index f413beb..699c657 100644 --- a/objects/entities/red_laser.tscn +++ b/objects/entities/red_laser.tscn @@ -1,11 +1,11 @@ [gd_scene load_steps=8 format=3 uid="uid://t422jkov2t1b"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="1_koyoa"] -[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="2_eru3x"] -[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="3_m14o3"] -[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="4_dolct"] -[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="5_eafpt"] -[ext_resource type="Script" uid="uid://bvsgg8lu0a8m6" path="res://scripts/components/lifetime_component.gd" id="6_m14o3"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="1_m14o3"] +[ext_resource type="Script" uid="uid://cfw8nbrarex0i" path="res://scripts/components/BulletComponent.cs" id="2_m14o3"] +[ext_resource type="Script" uid="uid://cs6u3sh68f43j" path="res://scripts/components/OutOfScreenComponent.cs" id="3_m14o3"] +[ext_resource type="Script" uid="uid://c7p06t0eax8am" path="res://scripts/components/StraightMotionComponent.cs" id="4_dolct"] +[ext_resource type="Script" uid="uid://cbexrnnj47f87" path="res://scripts/components/LaunchComponent.cs" id="5_eafpt"] +[ext_resource type="Script" uid="uid://oyf25mpc5etr" path="res://scripts/components/LifetimeComponent.cs" id="6_0c45k"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_n4uav"] size = Vector2(16, 2) @@ -14,9 +14,9 @@ size = Vector2(16, 2) collision_layer = 8 collision_mask = 21 -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] -script = ExtResource("1_koyoa") -area2d = NodePath("..") +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("1_m14o3") +Area = NodePath("..") metadata/_custom_type_script = "uid://dkmxhjtmu5xlb" [node name="CollisionShape2D" type="CollisionShape2D" parent="."] @@ -28,41 +28,31 @@ points = PackedVector2Array(0, 0, 16, 0) width = 2.0 default_color = Color(90, 1, 1, 1) -[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")] -script = ExtResource("2_eru3x") -root = NodePath("..") -area2d = NodePath("..") +[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] +script = ExtResource("2_m14o3") +Area = NodePath("..") metadata/_custom_type_script = "uid://cdnwrn8v05qhi" -[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("visibility_notifier", "root")] +[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("VisibilityNotifier")] script = ExtResource("3_m14o3") -visibility_notifier = NodePath("../VisibleOnScreenNotifier2D") -root = NodePath("..") +VisibilityNotifier = NodePath("../VisibleOnScreenNotifier2D") metadata/_custom_type_script = "uid://1tnr46o1ib4u" [node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] position = Vector2(8, 0) scale = Vector2(0.8, 0.1) -[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")] +[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("LaunchComponent")] script = ExtResource("4_dolct") -root = NodePath("..") -launch_component = NodePath("../LaunchComponent") +LaunchComponent = NodePath("../LaunchComponent") metadata/_custom_type_script = "uid://cvcnfrr1udco5" -[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")] +[node name="LaunchComponent" type="Node2D" parent="."] script = ExtResource("5_eafpt") -root = NodePath("..") -speed = 64.0 +Speed = 64.0 metadata/_custom_type_script = "uid://873un8agkyja" -[node name="LifetimeComponent" type="Node" parent="." node_paths=PackedStringArray("root", "timer")] -script = ExtResource("6_m14o3") -root = NodePath("..") -life_time = 10.0 -timer = NodePath("../Timer") +[node name="LifetimeComponent" type="Node" parent="."] +script = ExtResource("6_0c45k") +LifeTime = 10.0 metadata/_custom_type_script = "uid://bvsgg8lu0a8m6" - -[node name="Timer" type="Timer" parent="."] -wait_time = 5.0 -autostart = true diff --git a/objects/entities/small_heal_potion.tscn b/objects/entities/small_heal_potion.tscn index 6ebd4fb..46ca40d 100644 --- a/objects/entities/small_heal_potion.tscn +++ b/objects/entities/small_heal_potion.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=6 format=3 uid="uid://t6h2ra7kjyq"] [ext_resource type="Texture2D" uid="uid://1x4iq56rhc18" path="res://sprites/health_potions.png" id="1_p0sdo"] -[ext_resource type="Script" uid="uid://cegdd1sravi5m" path="res://scripts/components/heal_component.gd" id="2_piwlp"] -[ext_resource type="Script" uid="uid://pa1bwc4no08q" path="res://scripts/components/collectable.gd" id="3_k2tv6"] +[ext_resource type="Script" uid="uid://bmx6rk281yim2" path="res://scripts/components/HealComponent.cs" id="2_p0sdo"] +[ext_resource type="Script" uid="uid://r4jybneigfcn" path="res://scripts/components/CollectableComponent.cs" id="3_p0sdo"] [ext_resource type="Resource" uid="uid://2tl3yoh202no" path="res://resources/collectables/small_health_potion.tres" id="4_p0sdo"] [sub_resource type="CircleShape2D" id="CircleShape2D_uj2v5"] @@ -20,13 +20,13 @@ texture = ExtResource("1_p0sdo") hframes = 4 frame = 1 -[node name="HealComponent" type="Node" parent="." node_paths=PackedStringArray("collectable")] -script = ExtResource("2_piwlp") -collectable = NodePath("../CollectableComponent") +[node name="HealComponent" type="Node" parent="." node_paths=PackedStringArray("Collectable")] +script = ExtResource("2_p0sdo") +Collectable = NodePath("../CollectableComponent") -[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("area2d", "collision_shape")] -script = ExtResource("3_k2tv6") -area2d = NodePath("..") -collision_shape = NodePath("../CollisionShape2D") -collectable_data = ExtResource("4_p0sdo") +[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("Area2D", "CollisionShape")] +script = ExtResource("3_p0sdo") +Area2D = NodePath("..") +CollisionShape = NodePath("../CollisionShape2D") +Data = ExtResource("4_p0sdo") metadata/_custom_type_script = "uid://pa1bwc4no08q" diff --git a/objects/entities/spaceship_enter.tscn b/objects/entities/spaceship_enter.tscn index bd4e417..6d70cb0 100644 --- a/objects/entities/spaceship_enter.tscn +++ b/objects/entities/spaceship_enter.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://lpovacvt3yyj"] [ext_resource type="Texture2D" uid="uid://dhkwyv6ayb5qb" path="res://sprites/flying_ship.png" id="1_r82pf"] -[ext_resource type="Script" uid="uid://ghb614g22ph7" path="res://scripts/components/spaceship_enter_component.gd" id="2_wanmd"] +[ext_resource type="Script" uid="uid://dtv2r7q4elgre" path="res://scripts/components/SpaceshipEnterComponent.cs" id="2_wanmd"] [sub_resource type="CircleShape2D" id="CircleShape2D_wanmd"] radius = 16.1245 @@ -16,6 +16,6 @@ texture = ExtResource("1_r82pf") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_wanmd") -[node name="SpaceshipEnterComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] +[node name="SpaceshipEnterComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] script = ExtResource("2_wanmd") -area2d = NodePath("..") +Area = NodePath("..") diff --git a/objects/entities/spaceship_exit.tscn b/objects/entities/spaceship_exit.tscn index d6426e5..2dff521 100644 --- a/objects/entities/spaceship_exit.tscn +++ b/objects/entities/spaceship_exit.tscn @@ -1,14 +1,14 @@ [gd_scene load_steps=3 format=3 uid="uid://dkqa3q6j2gof4"] -[ext_resource type="Script" uid="uid://ybmwls7hv8j3" path="res://scripts/components/spaceship_exit_component.gd" id="1_1cmfv"] +[ext_resource type="Script" uid="uid://d3gfg05ll8uw3" path="res://scripts/components/SpaceshipExitComponent.cs" id="1_1cmfv"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_njt46"] -[node name="Spaceship exit" type="Area2D" node_paths=PackedStringArray("area2d")] +[node name="Spaceship exit" type="Area2D" node_paths=PackedStringArray("Area")] collision_layer = 0 collision_mask = 4 script = ExtResource("1_1cmfv") -area2d = NodePath(".") +Area = NodePath(".") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_njt46") diff --git a/objects/entities/spike_wheel.tscn b/objects/entities/spike_wheel.tscn index 5b4ca9a..4b2fa98 100644 --- a/objects/entities/spike_wheel.tscn +++ b/objects/entities/spike_wheel.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=5 format=3 uid="uid://buff711j0f2ph"] [ext_resource type="Texture2D" uid="uid://ddlwjg81ro1kl" path="res://sprites/spike_trap.png" id="1_xg6e1"] -[ext_resource type="Script" uid="uid://cq26pfxn17s7s" path="res://scripts/components/spin_component.gd" id="2_3d4lc"] -[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="3_ytlu4"] +[ext_resource type="Script" uid="uid://cqw134ewht3hc" path="res://scripts/components/SpinComponent.cs" id="2_ytlu4"] +[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="3_ytlu4"] [sub_resource type="CircleShape2D" id="CircleShape2D_xg6e1"] radius = 8.0 @@ -17,14 +17,13 @@ texture = ExtResource("1_xg6e1") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_xg6e1") -[node name="SpinComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")] -script = ExtResource("2_3d4lc") -root = NodePath("../Sprite2D") -speed = 1.0 +[node name="SpinComponent" type="Node2D" parent="."] +script = ExtResource("2_ytlu4") +SpinSpeed = 1.0 metadata/_custom_type_script = "uid://cq26pfxn17s7s" -[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] +[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")] script = ExtResource("3_ytlu4") -damage = 1.0 -area2d = NodePath("..") +Damage = 1.0 +Area = NodePath("..") metadata/_custom_type_script = "uid://dkmxhjtmu5xlb" diff --git a/objects/entities/treasure.tscn b/objects/entities/treasure.tscn index db3528d..2a2225d 100644 --- a/objects/entities/treasure.tscn +++ b/objects/entities/treasure.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=7 format=3 uid="uid://073ts5cxtwbl"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_uh3ex"] -[ext_resource type="Script" uid="uid://pa1bwc4no08q" path="res://scripts/components/collectable.gd" id="2_i1ssp"] +[ext_resource type="Script" uid="uid://r4jybneigfcn" path="res://scripts/components/CollectableComponent.cs" id="2_n5rum"] [ext_resource type="Resource" uid="uid://bws2xldndlre1" path="res://resources/collectables/treasure.tres" id="3_uknsr"] [ext_resource type="Script" uid="uid://bg75hnr3q6grk" path="res://scripts/components/fade_away.gd" id="4_ccbcr"] [ext_resource type="AudioStream" uid="uid://d2rj7uy5f0kwm" path="res://sfx/pickup_coin_3.wav" id="5_xt2rk"] @@ -9,7 +9,7 @@ [sub_resource type="CircleShape2D" id="CircleShape2D_3ask2"] radius = 9.0 -[node name="Treasure" type="Area2D"] +[node name="Treasure" type="Area2D" groups=["coins"]] collision_layer = 2 collision_mask = 4 @@ -22,12 +22,12 @@ hframes = 12 vframes = 12 frame = 66 -[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d", "collision_shape", "sfx") groups=["coins"]] -script = ExtResource("2_i1ssp") -area2d = NodePath("..") -collision_shape = NodePath("../CollisionShape2D") -collectable_data = ExtResource("3_uknsr") -sfx = NodePath("../sfx") +[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("Area2D", "CollisionShape", "Sfx")] +script = ExtResource("2_n5rum") +Area2D = NodePath("..") +CollisionShape = NodePath("../CollisionShape2D") +Data = ExtResource("3_uknsr") +Sfx = NodePath("../sfx") [node name="FadeAwayComponent" type="Node" parent="." node_paths=PackedStringArray("sprite2d", "root", "area2d")] script = ExtResource("4_ccbcr") diff --git a/objects/game_manager.tscn b/objects/game_manager.tscn index a37909c..6003a22 100644 --- a/objects/game_manager.tscn +++ b/objects/game_manager.tscn @@ -1,22 +1,15 @@ [gd_scene load_steps=7 format=3 uid="uid://b4eifkc31jsun"] -[ext_resource type="Script" uid="uid://dd30bgqiagi25" path="res://scripts/game_manager.gd" id="1_58t7u"] +[ext_resource type="Script" uid="uid://c6eoi3ymefc0x" path="res://Autoloads/GameManager.cs" id="1_t2tr6"] [ext_resource type="PackedScene" uid="uid://bol7g83v2accs" path="res://scenes/level_village_1.tscn" id="2_bentb"] [ext_resource type="PackedScene" uid="uid://chqb11pfoqmeb" path="res://scenes/level_village_2.tscn" id="3_ajlkg"] [ext_resource type="PackedScene" uid="uid://h60obxmju6mo" path="res://scenes/level_village_3.tscn" id="4_se5tb"] [ext_resource type="PackedScene" uid="uid://bhad760x3vvco" path="res://scenes/level_village_4.tscn" id="5_mnosh"] -[ext_resource type="Script" uid="uid://bydv4g1n5s3nf" path="res://scripts/screenshot.gd" id="6_t2tr6"] +[ext_resource type="Script" uid="uid://chrhjch4ymfvr" path="res://scripts/Screenshot.cs" id="6_bbtu1"] [node name="GameManager" type="Node"] -script = ExtResource("1_58t7u") -level_scenes = Array[PackedScene]([ExtResource("2_bentb"), ExtResource("3_ajlkg"), ExtResource("4_se5tb"), ExtResource("5_mnosh")]) -player_state = { -"coins": 0, -"current_level": 0, -"lives": 3, -"unlocked_levels": [ExtResource("4_se5tb")], -"unlocked_skills": [] -} +script = ExtResource("1_t2tr6") +LevelScenes = Array[PackedScene]([ExtResource("2_bentb"), ExtResource("3_ajlkg"), ExtResource("4_se5tb"), ExtResource("5_mnosh")]) -[node name="Node" type="Node" parent="."] -script = ExtResource("6_t2tr6") +[node name="Screenshot" type="Node" parent="."] +script = ExtResource("6_bbtu1") diff --git a/objects/level/base_level.tscn b/objects/level/base_level.tscn index 9dfeca6..ee9bdd1 100644 --- a/objects/level/base_level.tscn +++ b/objects/level/base_level.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=21 format=4 uid="uid://fw5fbdy5gcmx"] +[gd_scene load_steps=19 format=4 uid="uid://fw5fbdy5gcmx"] [ext_resource type="PackedScene" uid="uid://cawlpch2lk3a2" path="res://objects/level/world_environment.tscn" id="1_hb5r3"] [ext_resource type="PackedScene" uid="uid://bqi5s710xb1ju" path="res://objects/entities/brick_player.tscn" id="1_lbnsn"] [ext_resource type="PackedScene" uid="uid://6foggu31cu14" path="res://objects/level/ui_layer.tscn" id="2_lbnsn"] [ext_resource type="PackedScene" uid="uid://cywsu7yrtjdog" path="res://objects/level/global_light.tscn" id="3_3732a"] -[ext_resource type="Resource" uid="uid://cqtalsov2bkpo" path="res://resources/levels/village/village_1.tres" id="4_c2yv5"] [ext_resource type="PackedScene" uid="uid://cb0mnye1ki5a6" path="res://objects/level/camera_2d.tscn" id="5_517ha"] [ext_resource type="Script" uid="uid://d23haq52m7ulv" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="6_6imqp"] [ext_resource type="Script" uid="uid://ccfft4b8rwgbo" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="7_kl81p"] @@ -12,7 +11,6 @@ [ext_resource type="TileSet" uid="uid://cu2sx7qigrqnv" path="res://resources/tilesets/village/terain.tres" id="9_etwin"] [ext_resource type="TileSet" uid="uid://bc5a20s6kuy8e" path="res://resources/tilesets/village/entities.tres" id="10_8xrv5"] [ext_resource type="TileSet" uid="uid://bbppo0irxdmqy" path="res://resources/tilesets/village/foreground.tres" id="11_0vx27"] -[ext_resource type="Script" uid="uid://8r1y8elyw7kt" path="res://scripts/console_management.gd" id="12_8xrv5"] [ext_resource type="PackedScene" uid="uid://bqom4cm7r18db" path="res://objects/entities/killzone.tscn" id="13_0vx27"] [sub_resource type="Gradient" id="Gradient_qb72p"] @@ -62,17 +60,6 @@ process_material = SubResource("ParticleProcessMaterial_lgb3u") [node name="UI Layer" parent="." instance=ExtResource("2_lbnsn")] -[node name="HUD" parent="UI Layer" index="0" node_paths=PackedStringArray("player_health")] -player_health = NodePath("../../Brick Player/HealthComponent") - -[node name="DeathScreen" parent="UI Layer" index="1" node_paths=PackedStringArray("nodes_to_disable")] -current_level = ExtResource("4_c2yv5") -nodes_to_disable = [NodePath("../../Brick Player")] - -[node name="Marketplace" parent="UI Layer" index="3" node_paths=PackedStringArray("skill_unlocker", "components_to_disable")] -skill_unlocker = NodePath("../../Brick Player/SkillUnlockerComponent") -components_to_disable = [NodePath("../../Brick Player")] - [node name="Global Light" parent="." instance=ExtResource("3_3732a")] [node name="Camera2D" parent="." instance=ExtResource("5_517ha")] @@ -106,18 +93,10 @@ tile_set = ExtResource("10_8xrv5") [node name="Foreground layer" type="TileMapLayer" parent="."] tile_set = ExtResource("11_0vx27") -[node name="ConsoleManagement" type="Node" parent="." node_paths=PackedStringArray("player_health", "skill_unlocker", "skill_manager")] -script = ExtResource("12_8xrv5") -player_health = NodePath("../Brick Player/HealthComponent") -skill_unlocker = NodePath("../Brick Player/SkillUnlockerComponent") -skill_manager = NodePath("../Brick Player/SkillManager") -metadata/_custom_type_script = "uid://8r1y8elyw7kt" - [node name="Killzone" parent="." instance=ExtResource("13_0vx27")] position = Vector2(215, 324) -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/DeathScreen" method="on_player_death"] -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/GameOverScreen" method="on_player_death"] +[connection signal="Death" from="Brick Player/HealthComponent" to="UI Layer/DeathScreen" method="OnPlayerDeath"] [editable path="Brick Player"] [editable path="UI Layer"] diff --git a/objects/level/ui_layer.tscn b/objects/level/ui_layer.tscn index 64549a3..38e0d84 100644 --- a/objects/level/ui_layer.tscn +++ b/objects/level/ui_layer.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=11 format=3 uid="uid://6foggu31cu14"] +[gd_scene load_steps=9 format=3 uid="uid://6foggu31cu14"] [ext_resource type="PackedScene" uid="uid://byxf45ukq82pe" path="res://objects/ui/hud.tscn" id="1_tgtfe"] [ext_resource type="PackedScene" uid="uid://dulkm3ah4tm0u" path="res://objects/ui/death_screen.tscn" id="2_ln68j"] -[ext_resource type="Script" uid="uid://cp68km8bykymb" path="res://scripts/resources/level_resource.gd" id="3_5kt5k"] [ext_resource type="PackedScene" uid="uid://wmw6gaisyrvx" path="res://objects/ui/game_over_screen.tscn" id="4_11xmk"] [ext_resource type="PackedScene" uid="uid://dlm2ri562fynd" path="res://objects/ui/marketplace.tscn" id="5_8e0cs"] [ext_resource type="PackedScene" uid="uid://i6mnjbjcoqe5" path="res://objects/ui/pause_menu.tscn" id="6_1q4vn"] @@ -10,38 +9,26 @@ [ext_resource type="PackedScene" uid="uid://cvfsbiy5ggrpg" path="res://objects/ui/input_settings.tscn" id="8_6pnu3"] [ext_resource type="PackedScene" uid="uid://b5fx1vdfky307" path="res://objects/ui/audio_settings.tscn" id="9_ln68j"] -[sub_resource type="Resource" id="Resource_75pfo"] -script = ExtResource("3_5kt5k") -level_name = "Village - 1" -scene_path = "" -metadata/_custom_type_script = "uid://cp68km8bykymb" - [node name="UI Layer" type="CanvasLayer"] [node name="HUD" parent="." instance=ExtResource("1_tgtfe")] -[node name="DeathScreen" parent="." node_paths=PackedStringArray("nodes_to_disable") instance=ExtResource("2_ln68j")] +[node name="DeathScreen" parent="." instance=ExtResource("2_ln68j")] visible = false offset_top = 32.0 -current_level = SubResource("Resource_75pfo") -nodes_to_disable = [null] [node name="GameOverScreen" parent="." instance=ExtResource("4_11xmk")] visible = false -[node name="Marketplace" parent="." node_paths=PackedStringArray("components_to_disable") instance=ExtResource("5_8e0cs")] +[node name="Marketplace" parent="." instance=ExtResource("5_8e0cs")] visible = false offset_top = 32.0 -components_to_disable = [null] -[node name="Pause menu" parent="." node_paths=PackedStringArray("settings_menu") instance=ExtResource("6_1q4vn")] +[node name="Pause menu" parent="." instance=ExtResource("6_1q4vn")] visible = false -settings_menu = NodePath("../Settings menu") -[node name="Settings menu" parent="." node_paths=PackedStringArray("input_settings", "audio_settings") instance=ExtResource("7_hkjav")] +[node name="Settings menu" parent="." instance=ExtResource("7_hkjav")] visible = false -input_settings = NodePath("../Input Settings") -audio_settings = NodePath("../Audio settings") [node name="Input Settings" parent="." instance=ExtResource("8_6pnu3")] visible = false diff --git a/objects/tooltip.tscn b/objects/tooltip.tscn index dc2020b..ea52ca6 100644 --- a/objects/tooltip.tscn +++ b/objects/tooltip.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=5 format=3 uid="uid://b4pdt1gv2ymyi"] -[ext_resource type="Script" uid="uid://bsq5pplxqbssh" path="res://scripts/components/tooltip_component.gd" id="1_kkpqq"] +[ext_resource type="Script" uid="uid://cvaa6aqyijcp1" path="res://scripts/components/TooltipComponent.cs" id="1_aw8h8"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_yy7uq"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_hkd8b"] @@ -9,13 +9,13 @@ size = Vector2(38, 22) [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lqw6h"] bg_color = Color(0, 0, 0, 1) -[node name="Tooltip" type="Area2D" node_paths=PackedStringArray("area2d", "ui_root", "tooltip_label")] +[node name="Tooltip" type="Area2D" node_paths=PackedStringArray("Area", "UiRoot", "TooltipLabel")] collision_layer = 0 collision_mask = 4 -script = ExtResource("1_kkpqq") -area2d = NodePath(".") -ui_root = NodePath("Panel") -tooltip_label = NodePath("Panel/PanelContainer/Label") +script = ExtResource("1_aw8h8") +Area = NodePath(".") +UiRoot = NodePath("Panel") +TooltipLabel = NodePath("Panel/PanelContainer/Label") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2(1, -3) diff --git a/objects/ui/audio_settings.tscn b/objects/ui/audio_settings.tscn index 219ae27..b84e76d 100644 --- a/objects/ui/audio_settings.tscn +++ b/objects/ui/audio_settings.tscn @@ -1,11 +1,11 @@ [gd_scene load_steps=3 format=3 uid="uid://b5fx1vdfky307"] -[ext_resource type="Script" uid="uid://dujk6pnftm7ra" path="res://scripts/ui/audio_settings.gd" id="1_g522b"] +[ext_resource type="Script" uid="uid://g61qqsymqfxd" path="res://scripts/UI/AudioSettings.cs" id="1_g522b"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g4ivv"] bg_color = Color(0, 0, 0, 1) -[node name="Audio settings" type="Control" node_paths=PackedStringArray("master_volume_slider", "music_volume_slider", "sfx_volume_slider", "audio_settings_control")] +[node name="Audio settings" type="Control" node_paths=PackedStringArray("MasterVolumeSlider", "MusicVolumeSlider", "SfxVolumeSlider", "AudioSettingsControl")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -15,10 +15,10 @@ grow_vertical = 2 size_flags_horizontal = 6 size_flags_vertical = 6 script = ExtResource("1_g522b") -master_volume_slider = NodePath("PanelContainer/MarginContainer/VBoxContainer/Master volume/HSlider") -music_volume_slider = NodePath("PanelContainer/MarginContainer/VBoxContainer/Music volume/HSlider") -sfx_volume_slider = NodePath("PanelContainer/MarginContainer/VBoxContainer/SFX volume/HSlider") -audio_settings_control = NodePath(".") +MasterVolumeSlider = NodePath("PanelContainer/MarginContainer/VBoxContainer/Master volume/HSlider") +MusicVolumeSlider = NodePath("PanelContainer/MarginContainer/VBoxContainer/Music volume/HSlider") +SfxVolumeSlider = NodePath("PanelContainer/MarginContainer/VBoxContainer/SFX volume/HSlider") +AudioSettingsControl = NodePath(".") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 diff --git a/objects/ui/charging_bar_layer.tscn b/objects/ui/charging_bar_layer.tscn index 9e2c4f7..cff0974 100644 --- a/objects/ui/charging_bar_layer.tscn +++ b/objects/ui/charging_bar_layer.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=4 format=3 uid="uid://bg76mtpcmfm2j"] -[ext_resource type="Script" uid="uid://q32rtephu1t1" path="res://scripts/ui/charge_progress_bar.gd" id="1_014ut"] +[ext_resource type="Script" uid="uid://dev2q1228otm2" path="res://scripts/UI/ChargeProgressBar.cs" id="1_014ut"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_arbva"] bg_color = Color(0, 0, 0, 1) @@ -8,10 +8,10 @@ bg_color = Color(0, 0, 0, 1) [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_014ut"] bg_color = Color(0.921569, 0.827451, 0.12549, 1) -[node name="ProgressBar" type="ProgressBar" node_paths=PackedStringArray("progress_bar")] +[node name="ProgressBar" type="ProgressBar" node_paths=PackedStringArray("ProgressBar")] offset_right = 40.0 offset_bottom = 10.0 theme_override_styles/background = SubResource("StyleBoxFlat_arbva") theme_override_styles/fill = SubResource("StyleBoxFlat_014ut") script = ExtResource("1_014ut") -progress_bar = NodePath(".") +ProgressBar = NodePath(".") diff --git a/objects/ui/credits.tscn b/objects/ui/credits.tscn index cc8a709..a247c01 100644 --- a/objects/ui/credits.tscn +++ b/objects/ui/credits.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3 uid="uid://bwgmrcyj4mvu"] -[ext_resource type="Script" uid="uid://dtjgndehihl6d" path="res://scripts/ui/credits.gd" id="1_3aqj3"] +[ext_resource type="Script" uid="uid://daevj4uootmcw" path="res://scripts/UI/Credits.cs" id="1_3aqj3"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g4ivv"] bg_color = Color(0, 0, 0, 1) diff --git a/objects/ui/death_screen.tscn b/objects/ui/death_screen.tscn index 05a9e23..f4d7408 100644 --- a/objects/ui/death_screen.tscn +++ b/objects/ui/death_screen.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=4 format=3 uid="uid://dulkm3ah4tm0u"] -[ext_resource type="Script" uid="uid://b3d1p21sviww4" path="res://scripts/ui/death_screen.gd" id="1_eaoak"] +[ext_resource type="Script" uid="uid://csprksav8mj1h" path="res://scripts/UI/DeathScreen.cs" id="1_eaoak"] [ext_resource type="Texture2D" uid="uid://jix7wdn0isr3" path="res://sprites/ppc_icon.png" id="1_m30em"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eaoak"] bg_color = Color(0, 0, 0, 1) -[node name="DeathScreen" type="Control" node_paths=PackedStringArray("death_screen_root", "current_level_label", "lives_left_label")] +[node name="DeathScreen" type="Control" node_paths=PackedStringArray("CurrentLevelLabel", "LivesLeftLabel")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -14,9 +14,8 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_eaoak") -death_screen_root = NodePath(".") -current_level_label = NodePath("PanelContainer/MarginContainer/VBoxContainer/LevelName") -lives_left_label = NodePath("PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/LivesLeft") +CurrentLevelLabel = NodePath("PanelContainer/MarginContainer/VBoxContainer/LevelName") +LivesLeftLabel = NodePath("PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/LivesLeft") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 diff --git a/objects/ui/game_over_screen.tscn b/objects/ui/game_over_screen.tscn index 2c751cc..9d891b3 100644 --- a/objects/ui/game_over_screen.tscn +++ b/objects/ui/game_over_screen.tscn @@ -1,21 +1,23 @@ -[gd_scene load_steps=3 format=3 uid="uid://wmw6gaisyrvx"] +[gd_scene load_steps=4 format=3 uid="uid://wmw6gaisyrvx"] -[ext_resource type="Script" uid="uid://bkd7o2u4psu4p" path="res://scripts/ui/game_over_screen.gd" id="1_v1o0m"] +[ext_resource type="Script" uid="uid://u4qfsx4w72dv" path="res://scripts/UI/GameOverScreen.cs" id="1_w4aho"] +[ext_resource type="PackedScene" uid="uid://cl00e2ocomk3m" path="res://scenes/main_menu.tscn" id="2_brh6h"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mtg1b"] bg_color = Color(0, 0, 0, 1) -[node name="GameOverScreen" type="Control" node_paths=PackedStringArray("game_over_screen", "restart_button", "main_menu_button")] +[node name="GameOverScreen" type="Control" node_paths=PackedStringArray("GameOverPanel", "RestartButton", "MainMenuButton")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -script = ExtResource("1_v1o0m") -game_over_screen = NodePath(".") -restart_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/RestartLevelButton") -main_menu_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/MenuButton") +script = ExtResource("1_w4aho") +GameOverPanel = NodePath(".") +RestartButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/RestartLevelButton") +MainMenuButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/MenuButton") +MainMenuScene = ExtResource("2_brh6h") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 diff --git a/objects/ui/hud.tscn b/objects/ui/hud.tscn index 8fea845..2065188 100644 --- a/objects/ui/hud.tscn +++ b/objects/ui/hud.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=8 format=3 uid="uid://byxf45ukq82pe"] [ext_resource type="LabelSettings" uid="uid://rvn5ivivfvv6" path="res://resources/ui/hud_label_settings.tres" id="1_4dsh5"] -[ext_resource type="Script" uid="uid://c3pde84b3kdco" path="res://scripts/ui/hud.gd" id="1_ueofj"] +[ext_resource type="Script" uid="uid://wfj674u4486f" path="res://scripts/UI/Hud.cs" id="1_lscdw"] [ext_resource type="FontFile" uid="uid://xm0vbusjr7b7" path="res://fonts/PressStart2P-Regular.ttf" id="1_ygmwt"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mmcdi"] @@ -16,7 +16,7 @@ bg_color = Color(0.47451, 0.47451, 0.47451, 1) [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_22dp1"] bg_color = Color(0.858824, 0.254902, 0.380392, 1) -[node name="HUD" type="Control" node_paths=PackedStringArray("coins_label", "health_progressbar", "lives_label")] +[node name="HUD" type="Control" node_paths=PackedStringArray("CoinsLabel", "HealthBar", "LivesLabel")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -25,10 +25,10 @@ grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 4 size_flags_vertical = 4 -script = ExtResource("1_ueofj") -coins_label = NodePath("PanelContainer/MarginContainer/HBoxContainer/Coins label") -health_progressbar = NodePath("PanelContainer/MarginContainer/HBoxContainer/ProgressBar") -lives_label = NodePath("PanelContainer/MarginContainer/HBoxContainer/Lives") +script = ExtResource("1_lscdw") +CoinsLabel = NodePath("PanelContainer/MarginContainer/HBoxContainer/Coins label") +HealthBar = NodePath("PanelContainer/MarginContainer/HBoxContainer/ProgressBar") +LivesLabel = NodePath("PanelContainer/MarginContainer/HBoxContainer/Lives") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 diff --git a/objects/ui/input_settings.tscn b/objects/ui/input_settings.tscn index 8c761c6..66d4451 100644 --- a/objects/ui/input_settings.tscn +++ b/objects/ui/input_settings.tscn @@ -1,21 +1,17 @@ -[gd_scene load_steps=4 format=3 uid="uid://cvfsbiy5ggrpg"] +[gd_scene load_steps=3 format=3 uid="uid://cvfsbiy5ggrpg"] [ext_resource type="PackedScene" uid="uid://bxpr4m7lq7clh" path="res://objects/ui/input_button.tscn" id="1_h8s4o"] -[ext_resource type="Script" uid="uid://dppwl7xie2mh" path="res://scripts/ui/input_settings.gd" id="1_v2gus"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_se25o"] bg_color = Color(0, 0, 0, 1) -[node name="Input Settings" type="Control" node_paths=PackedStringArray("action_list", "reset_to_default_button")] +[node name="Input Settings" type="Control"] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -script = ExtResource("1_v2gus") -action_list = NodePath("PanelContainer/MarginContainer/VBoxContainer/ScrollContainer/Actions") -reset_to_default_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Reset to default Button") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 diff --git a/objects/ui/main_menu.tscn b/objects/ui/main_menu.tscn index 3bdf935..293bfae 100644 --- a/objects/ui/main_menu.tscn +++ b/objects/ui/main_menu.tscn @@ -1,11 +1,11 @@ [gd_scene load_steps=3 format=3 uid="uid://8b6ol5sssbgo"] -[ext_resource type="Script" uid="uid://hyfvthdbgjbc" path="res://scripts/ui/main_menu.gd" id="1_epxpl"] +[ext_resource type="Script" uid="uid://bna3ggr6n7ycr" path="res://scripts/UI/MainMenu.cs" id="1_epxpl"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qv2q0"] bg_color = Color(0, 0, 0, 1) -[node name="MainMenu" type="Control" node_paths=PackedStringArray("main_menu_control", "new_game_button", "continue_button", "settings_button", "credits_button", "exit_button", "version_label")] +[node name="MainMenu" type="Control" node_paths=PackedStringArray("MainMenuControl", "NewGameButton", "ContinueButton", "SettingsButton", "CreditsButton", "ExitButton", "VersionLabel")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -13,13 +13,13 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_epxpl") -main_menu_control = NodePath(".") -new_game_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/NewGameButton") -continue_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/ContinueButton") -settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/SettingsButton") -credits_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/CreditsButton") -exit_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/QuitButton") -version_label = NodePath("PanelContainer/MarginContainer/VBoxContainer/version") +MainMenuControl = NodePath(".") +NewGameButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/NewGameButton") +ContinueButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/ContinueButton") +SettingsButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/SettingsButton") +CreditsButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/CreditsButton") +ExitButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/QuitButton") +VersionLabel = NodePath("PanelContainer/MarginContainer/VBoxContainer/VersionLabel") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 @@ -41,7 +41,7 @@ theme_override_constants/margin_bottom = 32 layout_mode = 2 theme_override_constants/separation = 16 -[node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] +[node name="TitleLabel" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 text = "GAME_TITLE" horizontal_alignment = 1 @@ -77,7 +77,7 @@ layout_mode = 2 text = "QUIT_BUTTON" flat = true -[node name="version" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] +[node name="VersionLabel" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 size_flags_horizontal = 0 size_flags_vertical = 8 diff --git a/objects/ui/marketplace.tscn b/objects/ui/marketplace.tscn index 19e7f2d..e2c5d31 100644 --- a/objects/ui/marketplace.tscn +++ b/objects/ui/marketplace.tscn @@ -1,34 +1,26 @@ -[gd_scene load_steps=12 format=3 uid="uid://dlm2ri562fynd"] +[gd_scene load_steps=6 format=3 uid="uid://dlm2ri562fynd"] -[ext_resource type="Script" uid="uid://duifmqjarjpuv" path="res://scripts/ui/marketplace.gd" id="1_ncpyg"] +[ext_resource type="Script" uid="uid://bnc16gndpl87i" path="res://scripts/UI/Marketplace.cs" id="1_li4x3"] [ext_resource type="FontFile" uid="uid://xm0vbusjr7b7" path="res://fonts/PressStart2P-Regular.ttf" id="2_ho1tm"] -[ext_resource type="Script" uid="uid://bya240e627ti6" path="res://scripts/resources/skill_data.gd" id="2_pg4mc"] -[ext_resource type="Resource" uid="uid://dw5ee2lpeypnb" path="res://resources/skills/brick_throw.tres" id="3_bk5yi"] -[ext_resource type="Resource" uid="uid://cdp8sex36vdq2" path="res://resources/skills/explosive_brick.tres" id="4_tx0n3"] -[ext_resource type="Resource" uid="uid://2glvryih82t1" path="res://resources/skills/fire_brick.tres" id="5_fqx8e"] -[ext_resource type="Resource" uid="uid://cx5fsbexblp60" path="res://resources/skills/ice_brick.tres" id="6_6665y"] -[ext_resource type="Resource" uid="uid://d3bjre2etov1n" path="res://resources/skills/magnetic.tres" id="7_ukny6"] [ext_resource type="PackedScene" uid="uid://dtl03rod7l2t0" path="res://objects/ui/marketplace_button.tscn" id="9_ode10"] [ext_resource type="PackedScene" uid="uid://ceqjwmihj70lt" path="res://objects/ui/skill_button.tscn" id="10_c7w2b"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ode10"] bg_color = Color(0, 0, 0, 1) -[node name="Marketplace" type="Control" node_paths=PackedStringArray("root", "to_unlock_grid", "unlocked_grid")] +[node name="Marketplace" type="Control" node_paths=PackedStringArray("ToUnlockGrid", "UnlockedGrid")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -script = ExtResource("1_ncpyg") -root = NodePath(".") -skill_data = Array[ExtResource("2_pg4mc")]([ExtResource("3_bk5yi"), ExtResource("4_tx0n3"), ExtResource("5_fqx8e"), ExtResource("6_6665y"), ExtResource("7_ukny6")]) -to_unlock_grid = NodePath("PanelContainer/MarginContainer/VBoxContainer/ToUnlockGridContainer") -unlocked_grid = NodePath("PanelContainer/MarginContainer/VBoxContainer/UnlockedGridContainer") -font = ExtResource("2_ho1tm") -marketplace_button = ExtResource("9_ode10") -skill_button = ExtResource("10_c7w2b") +script = ExtResource("1_li4x3") +ToUnlockGrid = NodePath("PanelContainer/MarginContainer/VBoxContainer/ToUnlockGridContainer") +UnlockedGrid = NodePath("PanelContainer/MarginContainer/VBoxContainer/UnlockedGridContainer") +Font = ExtResource("2_ho1tm") +MarketplaceButtonScene = ExtResource("9_ode10") +SkillButtonScene = ExtResource("10_c7w2b") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 diff --git a/objects/ui/marketplace_button.tscn b/objects/ui/marketplace_button.tscn index c045013..ec805dd 100644 --- a/objects/ui/marketplace_button.tscn +++ b/objects/ui/marketplace_button.tscn @@ -1,11 +1,9 @@ -[gd_scene load_steps=5 format=3 uid="uid://dtl03rod7l2t0"] +[gd_scene load_steps=3 format=3 uid="uid://dtl03rod7l2t0"] [ext_resource type="Texture2D" uid="uid://cvhoq7aubxlmq" path="res://sprites/ui/magnetic_skill_icon.png" id="1_5kqfg"] -[ext_resource type="Script" uid="uid://dx8lex40lotr5" path="res://scripts/ui/marketplace_button.gd" id="2_ulgvb"] -[ext_resource type="Texture2D" uid="uid://52adghxscdgy" path="res://sprites/locked_skill.png" id="2_vb2qn"] -[ext_resource type="Texture2D" uid="uid://rucyqmgrdld3" path="res://sprites/unlocked_skill.png" id="3_guyun"] +[ext_resource type="Script" uid="uid://vokgv56bjpf1" path="res://scripts/UI/MarketplaceButton.cs" id="2_vb2qn"] -[node name="MarketplaceButton" type="Button" node_paths=PackedStringArray("skill_level_container")] +[node name="MarketplaceButton" type="Button" node_paths=PackedStringArray("SkillLevelContainer")] offset_right = 8.0 offset_bottom = 8.0 size_flags_horizontal = 3 @@ -15,10 +13,8 @@ text = "Fire brick 100" icon = ExtResource("1_5kqfg") flat = true autowrap_mode = 2 -script = ExtResource("2_ulgvb") -unlocked_skill_icon = ExtResource("3_guyun") -locked_skill_icon = ExtResource("2_vb2qn") -skill_level_container = NodePath("HBoxContainer") +script = ExtResource("2_vb2qn") +SkillLevelContainer = NodePath("HBoxContainer") [node name="HBoxContainer" type="HBoxContainer" parent="."] layout_mode = 1 diff --git a/objects/ui/pause_menu.tscn b/objects/ui/pause_menu.tscn index d995ee9..be67a51 100644 --- a/objects/ui/pause_menu.tscn +++ b/objects/ui/pause_menu.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=4 format=3 uid="uid://i6mnjbjcoqe5"] -[ext_resource type="Script" uid="uid://cugifchx6jhuk" path="res://scripts/ui/pause_menu.gd" id="1_aktha"] +[ext_resource type="Script" uid="uid://cakgxndurgfa3" path="res://scripts/UI/PauseMenu.cs" id="1_h4pd5"] [ext_resource type="PackedScene" uid="uid://cl00e2ocomk3m" path="res://scenes/main_menu.tscn" id="2_h4pd5"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g4ivv"] bg_color = Color(0, 0, 0, 1) -[node name="Pause menu" type="Control" node_paths=PackedStringArray("pause_menu_control", "resume_button", "quit_button", "settings_button", "exit_to_menu_button")] +[node name="Pause menu" type="Control" node_paths=PackedStringArray("PauseMenuControl", "ResumeButton", "MainMenuButton", "QuitButton", "SettingsButton")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -15,13 +15,13 @@ grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 6 size_flags_vertical = 6 -script = ExtResource("1_aktha") -pause_menu_control = NodePath(".") -resume_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Resume Button") -quit_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Quit game Button") -settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Settings Button") -exit_to_menu_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Exit to menu Button") -exit_to_menu_scene = ExtResource("2_h4pd5") +script = ExtResource("1_h4pd5") +PauseMenuControl = NodePath(".") +ResumeButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/Resume Button") +MainMenuButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/Exit to menu Button") +QuitButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/Quit game Button") +SettingsButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/Settings Button") +MainMenuScene = ExtResource("2_h4pd5") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 diff --git a/objects/ui/settings_menu.tscn b/objects/ui/settings_menu.tscn index 393c240..f5a956a 100644 --- a/objects/ui/settings_menu.tscn +++ b/objects/ui/settings_menu.tscn @@ -1,11 +1,11 @@ [gd_scene load_steps=3 format=3 uid="uid://y0ae6e7t70fj"] -[ext_resource type="Script" uid="uid://c506rigcjlm6x" path="res://scripts/ui/settings_menu.gd" id="1_lt6q2"] +[ext_resource type="Script" uid="uid://i8j47qnrytuo" path="res://scripts/UI/SettingsMenu.cs" id="1_lt6q2"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wgbcl"] bg_color = Color(0, 0, 0, 1) -[node name="Settings menu" type="Control" node_paths=PackedStringArray("settings_menu_control", "input_settings_button", "audio_settings_button", "display_settings_button", "gameplay_settings_button")] +[node name="Settings menu" type="Control" node_paths=PackedStringArray("SettingsMenuControl", "InputSettingsButton", "AudioSettingsButton", "DisplaySettingsButton", "GameplaySettingsButton")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -13,11 +13,11 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_lt6q2") -settings_menu_control = NodePath(".") -input_settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Input Settings Button") -audio_settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Audio Settings Button") -display_settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Display Settings Button") -gameplay_settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Gameplay Settings Button") +SettingsMenuControl = NodePath(".") +InputSettingsButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/Input Settings Button") +AudioSettingsButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/Audio Settings Button") +DisplaySettingsButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/Display Settings Button") +GameplaySettingsButton = NodePath("PanelContainer/MarginContainer/VBoxContainer/Gameplay Settings Button") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 @@ -39,7 +39,7 @@ theme_override_constants/margin_bottom = 16 layout_mode = 2 theme_override_constants/separation = 16 -[node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] +[node name="Title" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 theme_override_font_sizes/font_size = 16 text = "SETTINGS" diff --git a/objects/ui/skill_button.tscn b/objects/ui/skill_button.tscn index 503f860..f7e892e 100644 --- a/objects/ui/skill_button.tscn +++ b/objects/ui/skill_button.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3 uid="uid://ceqjwmihj70lt"] [ext_resource type="Texture2D" uid="uid://cvhoq7aubxlmq" path="res://sprites/ui/magnetic_skill_icon.png" id="1_wnfk3"] -[ext_resource type="Script" uid="uid://0obbehfd8fki" path="res://scripts/ui/skill_button.gd" id="2_m2732"] +[ext_resource type="Script" uid="uid://bw8dlgq86jrtt" path="res://scripts/UI/SkillButton.cs" id="2_m2732"] [node name="SkillButton" type="Button"] offset_right = 8.0 diff --git a/objects/ui_manager.tscn b/objects/ui_manager.tscn index 2898ece..46ffc4e 100644 --- a/objects/ui_manager.tscn +++ b/objects/ui_manager.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://dyjumgjkqrufa"] -[ext_resource type="Script" uid="uid://vmhlsc3fu3bn" path="res://autoloads/ui_manager.gd" id="1_53w4j"] +[ext_resource type="Script" uid="uid://c3ldmnrwperr4" path="res://Autoloads/UIManager.cs" id="1_53w4j"] [node name="UiManager" type="Node"] script = ExtResource("1_53w4j") diff --git a/project.godot b/project.godot index 42f3f74..7406381 100644 --- a/project.godot +++ b/project.godot @@ -34,11 +34,10 @@ PhantomCameraManager="*res://addons/phantom_camera/scripts/managers/phantom_came AudioController="*res://objects/audio_controller.tscn" SteamIntegrationNode="*res://objects/steam_integration.tscn" SteamControllerInput="*res://autoloads/steam_controller_input.gd" -Console="*res://addons/console/console.gd" AchievementsManager="*res://objects/achievements.tscn" -ConfigFileHandler="*res://autoloads/config_file_handler.gd" -UiManager="*res://autoloads/ui_manager.gd" -SaveSystem="*res://autoloads/save_system.gd" +UIManager="*res://Autoloads/UIManager.cs" +ConfigFileHandler="*res://Autoloads/ConfigFileHandler.cs" +SaveSystem="*res://Autoloads/SaveSystem.cs" [debug] diff --git a/resources/levels/forest/forest_1.tres b/resources/levels/forest/forest_1.tres index 9e0e055..b32ddd8 100644 --- a/resources/levels/forest/forest_1.tres +++ b/resources/levels/forest/forest_1.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="LevelResource" load_steps=2 format=3 uid="uid://dsq0y2iw7tfmk"] -[ext_resource type="Script" uid="uid://cp68km8bykymb" path="res://scripts/resources/level_resource.gd" id="1_8mmd7"] +[ext_resource type="Script" uid="uid://c2h0pqhxiqswe" path="res://scripts/Resources/LevelResource.cs" id="1_8mmd7"] [resource] script = ExtResource("1_8mmd7") -level_name = "LEVEL_5_NAME" -scene_path = "res://scenes/level_forest_5.tscn" +LevelName = "LEVEL_5_NAME" +ScenePath = "res://scenes/level_forest_5.tscn" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/levels/village/village_1.tres b/resources/levels/village/village_1.tres index 19a5180..2833437 100644 --- a/resources/levels/village/village_1.tres +++ b/resources/levels/village/village_1.tres @@ -1,10 +1,10 @@ [gd_resource type="Resource" script_class="LevelResource" load_steps=2 format=3 uid="uid://cqtalsov2bkpo"] -[ext_resource type="Script" uid="uid://cp68km8bykymb" path="res://scripts/resources/level_resource.gd" id="2_a2hpx"] +[ext_resource type="Script" uid="uid://c2h0pqhxiqswe" path="res://scripts/Resources/LevelResource.cs" id="1_72j7f"] [resource] resource_local_to_scene = true -script = ExtResource("2_a2hpx") -level_name = "LEVEL_1_NAME" -scene_path = "res://scenes/level_village_1.tscn" +script = ExtResource("1_72j7f") +LevelName = "LEVEL_1_NAME" +ScenePath = "res://scenes/level_village_1.tscn" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/levels/village/village_2.tres b/resources/levels/village/village_2.tres index 4f20274..6ded9e6 100644 --- a/resources/levels/village/village_2.tres +++ b/resources/levels/village/village_2.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="LevelResource" load_steps=2 format=3 uid="uid://dlwkbjw1l33uq"] -[ext_resource type="Script" uid="uid://cp68km8bykymb" path="res://scripts/resources/level_resource.gd" id="1_1tjmh"] +[ext_resource type="Script" uid="uid://c2h0pqhxiqswe" path="res://scripts/Resources/LevelResource.cs" id="1_msres"] [resource] -script = ExtResource("1_1tjmh") -level_name = "LEVEL_2_NAME" -scene_path = "res://scenes/level_village_2.tscn" +script = ExtResource("1_msres") +LevelName = "LEVEL_2_NAME" +ScenePath = "res://scenes/level_village_2.tscn" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/levels/village/village_3.tres b/resources/levels/village/village_3.tres index 2eb5311..0d3176e 100644 --- a/resources/levels/village/village_3.tres +++ b/resources/levels/village/village_3.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="LevelResource" load_steps=2 format=3 uid="uid://b63u5qfp8p7pv"] -[ext_resource type="Script" uid="uid://cp68km8bykymb" path="res://scripts/resources/level_resource.gd" id="1_3v5yj"] +[ext_resource type="Script" uid="uid://c2h0pqhxiqswe" path="res://scripts/Resources/LevelResource.cs" id="1_6vcr8"] [resource] -script = ExtResource("1_3v5yj") -level_name = "LEVEL_3_NAME" -scene_path = "res://scenes/level_village_3.tscn" +script = ExtResource("1_6vcr8") +LevelName = "LEVEL_3_NAME" +ScenePath = "res://scenes/level_village_3.tscn" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/levels/village/village_4.tres b/resources/levels/village/village_4.tres index 0237690..6ed1da3 100644 --- a/resources/levels/village/village_4.tres +++ b/resources/levels/village/village_4.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="LevelResource" load_steps=2 format=3 uid="uid://cxfei28yu3buh"] -[ext_resource type="Script" uid="uid://cp68km8bykymb" path="res://scripts/resources/level_resource.gd" id="1_upuk8"] +[ext_resource type="Script" uid="uid://c2h0pqhxiqswe" path="res://scripts/Resources/LevelResource.cs" id="1_h4twv"] [resource] -script = ExtResource("1_upuk8") -level_name = "LEVEL_4_NAME" -scene_path = "res://scenes/level_village_4.tscn" +script = ExtResource("1_h4twv") +LevelName = "LEVEL_4_NAME" +ScenePath = "res://scenes/level_village_4.tscn" metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/resources/levels/village/village_5.tres b/resources/levels/village/village_5.tres deleted file mode 100644 index c0d2df3..0000000 --- a/resources/levels/village/village_5.tres +++ /dev/null @@ -1,9 +0,0 @@ -[gd_resource type="Resource" script_class="LevelResource" load_steps=2 format=3 uid="uid://bhs2j7k0ety3a"] - -[ext_resource type="Script" uid="uid://cp68km8bykymb" path="res://scripts/resources/level_resource.gd" id="1_owe0p"] - -[resource] -script = ExtResource("1_owe0p") -level_name = "LEVEL_5_NAME" -scene_path = "" -metadata/_custom_type_script = "uid://cp68km8bykymb" diff --git a/scenes/level_village_1.tscn b/scenes/level_village_1.tscn index 73e8824..a6cdc82 100644 --- a/scenes/level_village_1.tscn +++ b/scenes/level_village_1.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=24 format=4 uid="uid://bol7g83v2accs"] +[gd_scene load_steps=23 format=4 uid="uid://bol7g83v2accs"] [ext_resource type="PackedScene" uid="uid://bqi5s710xb1ju" path="res://objects/entities/brick_player.tscn" id="1_dnj2y"] [ext_resource type="PackedScene" uid="uid://cawlpch2lk3a2" path="res://objects/level/world_environment.tscn" id="2_1vw1j"] @@ -12,7 +12,6 @@ [ext_resource type="TileSet" uid="uid://cu2sx7qigrqnv" path="res://resources/tilesets/village/terain.tres" id="9_ttvjm"] [ext_resource type="TileSet" uid="uid://bc5a20s6kuy8e" path="res://resources/tilesets/village/entities.tres" id="10_ei558"] [ext_resource type="TileSet" uid="uid://bbppo0irxdmqy" path="res://resources/tilesets/village/foreground.tres" id="11_w7c5i"] -[ext_resource type="Script" uid="uid://8r1y8elyw7kt" path="res://scripts/console_management.gd" id="12_2tg3u"] [ext_resource type="PackedScene" uid="uid://bqom4cm7r18db" path="res://objects/entities/killzone.tscn" id="13_tvdre"] [ext_resource type="PackedScene" uid="uid://d0s2abysa86rq" path="res://objects/entities/child.tscn" id="15_vqevu"] [ext_resource type="PackedScene" uid="uid://12jnkdygpxwc" path="res://objects/entities/exit_level.tscn" id="16_chnw1"] @@ -66,16 +65,22 @@ process_material = SubResource("ParticleProcessMaterial_lgb3u") [node name="UI Layer" parent="." instance=ExtResource("3_4fsls")] -[node name="HUD" parent="UI Layer" index="0" node_paths=PackedStringArray("player_health")] -player_health = NodePath("../../Brick Player/HealthComponent") +[node name="HUD" parent="UI Layer" index="0" node_paths=PackedStringArray("Health")] +Health = NodePath("../../Brick Player/HealthComponent") -[node name="DeathScreen" parent="UI Layer" index="1" node_paths=PackedStringArray("nodes_to_disable")] -current_level = ExtResource("4_onnch") -nodes_to_disable = [NodePath("../../Brick Player")] +[node name="DeathScreen" parent="UI Layer" index="1" node_paths=PackedStringArray("NodesToDisable")] +CurrentLevel = ExtResource("4_onnch") +NodesToDisable = [NodePath("../../Brick Player")] -[node name="Marketplace" parent="UI Layer" index="3" node_paths=PackedStringArray("skill_unlocker", "components_to_disable")] -skill_unlocker = NodePath("../../Brick Player/SkillUnlockerComponent") -components_to_disable = [NodePath("../../Brick Player")] +[node name="Marketplace" parent="UI Layer" index="3" node_paths=PackedStringArray("SkillUnlockedComponent")] +SkillUnlockedComponent = NodePath("../../Brick Player/SkillUnlockerComponent") + +[node name="Pause menu" parent="UI Layer" index="4" node_paths=PackedStringArray("SettingsControl")] +SettingsControl = NodePath("../Settings menu") + +[node name="Settings menu" parent="UI Layer" index="5" node_paths=PackedStringArray("InputSettingsControl", "AudioSettingsControl")] +InputSettingsControl = NodePath("../Input Settings") +AudioSettingsControl = NodePath("../Audio settings") [node name="Global Light" parent="." instance=ExtResource("4_mc58c")] @@ -111,13 +116,6 @@ tile_set = ExtResource("10_ei558") [node name="Foreground layer" type="TileMapLayer" parent="."] tile_set = ExtResource("11_w7c5i") -[node name="ConsoleManagement" type="Node" parent="." node_paths=PackedStringArray("player_health", "skill_unlocker", "skill_manager")] -script = ExtResource("12_2tg3u") -player_health = NodePath("../Brick Player/HealthComponent") -skill_unlocker = NodePath("../Brick Player/SkillUnlockerComponent") -skill_manager = NodePath("../Brick Player/SkillManager") -metadata/_custom_type_script = "uid://8r1y8elyw7kt" - [node name="Killzone" parent="." instance=ExtResource("13_tvdre")] position = Vector2(215, 324) @@ -129,18 +127,15 @@ position = Vector2(1485, 25) [node name="Tooltip" parent="." instance=ExtResource("18_4bhfj")] position = Vector2(712, -343) -text = "LEVEL_1_TOOLTIP_1" +Text = "LEVEL_1_TOOLTIP_1" [node name="Tooltip2" parent="." instance=ExtResource("18_4bhfj")] position = Vector2(552, 25) -text = "LEVEL_1_TOOLTIP_2" +Text = "LEVEL_1_TOOLTIP_2" [node name="Tooltip3" parent="." instance=ExtResource("18_4bhfj")] position = Vector2(-59, -247) -text = "LEVEL_1_TOOLTIP_3" - -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/DeathScreen" method="on_player_death"] -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/GameOverScreen" method="on_player_death"] +Text = "LEVEL_1_TOOLTIP_3" [editable path="Brick Player"] [editable path="UI Layer"] diff --git a/scenes/level_village_2.tscn b/scenes/level_village_2.tscn index cccb78a..a567269 100644 --- a/scenes/level_village_2.tscn +++ b/scenes/level_village_2.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=27 format=4 uid="uid://chqb11pfoqmeb"] +[gd_scene load_steps=25 format=4 uid="uid://chqb11pfoqmeb"] [ext_resource type="PackedScene" uid="uid://bqi5s710xb1ju" path="res://objects/entities/brick_player.tscn" id="1_wcma7"] [ext_resource type="PackedScene" uid="uid://cawlpch2lk3a2" path="res://objects/level/world_environment.tscn" id="2_ot3dy"] [ext_resource type="PackedScene" uid="uid://6foggu31cu14" path="res://objects/level/ui_layer.tscn" id="3_cjqhe"] -[ext_resource type="Resource" uid="uid://dlwkbjw1l33uq" path="res://resources/levels/village/village_2.tres" id="4_h4uvs"] [ext_resource type="PackedScene" uid="uid://cywsu7yrtjdog" path="res://objects/level/global_light.tscn" id="4_wykfl"] [ext_resource type="PackedScene" uid="uid://cb0mnye1ki5a6" path="res://objects/level/camera_2d.tscn" id="5_8nvkd"] [ext_resource type="Script" uid="uid://d23haq52m7ulv" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="6_ono4h"] @@ -12,7 +11,6 @@ [ext_resource type="TileSet" uid="uid://cu2sx7qigrqnv" path="res://resources/tilesets/village/terain.tres" id="9_lqbd7"] [ext_resource type="TileSet" uid="uid://bc5a20s6kuy8e" path="res://resources/tilesets/village/entities.tres" id="10_4r26m"] [ext_resource type="TileSet" uid="uid://bbppo0irxdmqy" path="res://resources/tilesets/village/foreground.tres" id="11_r0ngp"] -[ext_resource type="Script" uid="uid://8r1y8elyw7kt" path="res://scripts/console_management.gd" id="12_78lb3"] [ext_resource type="TileSet" uid="uid://ccffmjebvuoaj" path="res://resources/tilesets/village/small_foreground.tres" id="13_lc0ll"] [ext_resource type="PackedScene" uid="uid://bqom4cm7r18db" path="res://objects/entities/killzone.tscn" id="13_sw2hn"] [ext_resource type="PackedScene" uid="uid://12jnkdygpxwc" path="res://objects/entities/exit_level.tscn" id="15_hcsb6"] @@ -69,17 +67,6 @@ process_material = SubResource("ParticleProcessMaterial_lgb3u") [node name="UI Layer" parent="." instance=ExtResource("3_cjqhe")] -[node name="HUD" parent="UI Layer" index="0" node_paths=PackedStringArray("player_health")] -player_health = NodePath("../../Brick Player/HealthComponent") - -[node name="DeathScreen" parent="UI Layer" index="1" node_paths=PackedStringArray("nodes_to_disable")] -current_level = ExtResource("4_h4uvs") -nodes_to_disable = [NodePath("../../Brick Player")] - -[node name="Marketplace" parent="UI Layer" index="3" node_paths=PackedStringArray("skill_unlocker", "components_to_disable")] -skill_unlocker = NodePath("../../Brick Player/SkillUnlockerComponent") -components_to_disable = [NodePath("../../Brick Player")] - [node name="Global Light" parent="." instance=ExtResource("4_wykfl")] [node name="Camera2D" parent="." instance=ExtResource("5_8nvkd")] @@ -124,13 +111,6 @@ tile_set = ExtResource("11_r0ngp") tile_map_data = PackedByteArray("AABw/ykAAAABAAAAAABr/ykAAAAAAAAAAABn/ykAAAACAAAAAABl/ykAAAABAAAAAABj/ykAAAACAAAAAABh/ykAAAABAAAAAABa/ykAAAABAAAAAABY/ykAAAACAAAAAABU/ykAAAADAAAAAABP/ykAAAAAAAAAAACD/ykAAAABAAAAAACO/ykAAAACAAAAAACT/ykAAAABAAAAAACV/ykAAAAAAAAAAACa/ykAAAADAAAAAACq/ykAAAACAAAAAACr/ykAAAAAAAAAAADi/wMAAAAAAAAAAADk/wMAAAACAAAAAADp/wMAAAABAAAAAADs/wMAAAAAAAAAAADt/wMAAAABAAAAAADx/wMAAAADAAAAAADy/wMAAAAAAAAAAADz/wMAAAACAAAAAAD0/wMAAAADAAAAAAD5/wMAAAAAAAAAAAD6/wMAAAAAAAAAAAD7/wMAAAABAAAAAAACAAMAAAABAAAAAAAJAAMAAAABAAAAAAANAAMAAAAAAAAAAAAUAAMAAAABAAAAAAAYAAMAAAADAAAAAAAaAAMAAAADAAAAAAAcAAMAAAACAAAAAAAgAAMAAAAAAAAAAAAiAAMAAAACAAAAAAAmAAMAAAADAAAAAAAoAAMAAAAAAAAAAABGAAMAAAADAAAAAABEAAMAAAACAAAAAABCAAMAAAABAAAAAAA8AAMAAAACAAAAAAA3AAMAAAACAAAAAAA0AAMAAAADAAAAAAAxAAMAAAADAAAAAAAwAAMAAAACAAAAAAAfAAMAAAAAAAAAAAATAAMAAAAAAAAAAAASAAMAAAABAAAAAAAOAAMAAAAAAAAAAABWAAUAAAABAAAAAABZAAUAAAADAAAAAABaAAUAAAABAAAAAABkAAUAAAACAAAAAAB1AAUAAAADAAAAAAB2AAUAAAABAAAAAAB/AAUAAAADAAAAAACsAO//AAAAAAAAAACrAO//AAACAAAAAACnAO//AAACAAAAAACgAO//AAABAAAAAACVAO//AAACAAAAAACUAO//AAADAAAAAACTAO//AAACAAAAAACNAO//AAAAAAAAAACxANX/AAABAAAAAACzANX/AAACAAAAAAC7ANX/AAACAAAAAADBANX/AAACAAAAAADDANX/AAABAAAAAADMANX/AAABAAAAAADQANX/AAABAAAAAADXANX/AAABAAAAAADZANX/AAABAAAAAADdANX/AAAAAAAAAADfANX/AAACAAAAAADnANX/AAABAAAAAADoANX/AAACAAAAAACiAJ//AAACAAAAAACcAJ//AAADAAAAAACbAJ//AAAAAAAAAACYAJ//AAADAAAAAACSAJ//AAADAAAAAACJAJ//AAADAAAAAACGAJ//AAABAAAAAACEAJ//AAACAAAAAACAAJ//AAABAAAAAAB/AJ//AAADAAAAAAB9AJ//AAACAAAAAAA=") tile_set = ExtResource("13_lc0ll") -[node name="ConsoleManagement" type="Node" parent="." node_paths=PackedStringArray("player_health", "skill_unlocker", "skill_manager")] -script = ExtResource("12_78lb3") -player_health = NodePath("../Brick Player/HealthComponent") -skill_unlocker = NodePath("../Brick Player/SkillUnlockerComponent") -skill_manager = NodePath("../Brick Player/SkillManager") -metadata/_custom_type_script = "uid://8r1y8elyw7kt" - [node name="Killzone" parent="." instance=ExtResource("13_sw2hn")] position = Vector2(170, 582) @@ -175,8 +155,5 @@ position = Vector2(792, -784) [node name="Lever" parent="." instance=ExtResource("20_h4uvs")] position = Vector2(-231, -776) -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/DeathScreen" method="on_player_death"] -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/GameOverScreen" method="on_player_death"] - [editable path="Brick Player"] [editable path="UI Layer"] diff --git a/scenes/level_village_3.tscn b/scenes/level_village_3.tscn index 879f963..91ddaed 100644 --- a/scenes/level_village_3.tscn +++ b/scenes/level_village_3.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=33 format=4 uid="uid://h60obxmju6mo"] +[gd_scene load_steps=31 format=4 uid="uid://h60obxmju6mo"] [ext_resource type="PackedScene" uid="uid://dyp4i4ru2j2jh" path="res://objects/fxs/explosion_fx.tscn" id="1_p30ax"] [ext_resource type="PackedScene" uid="uid://dx80ivlvuuew4" path="res://objects/fxs/fire_fx.tscn" id="2_a7yjf"] @@ -17,9 +17,7 @@ [ext_resource type="PackedScene" uid="uid://d0s2abysa86rq" path="res://objects/entities/child.tscn" id="15_dv6gh"] [ext_resource type="PackedScene" uid="uid://6foggu31cu14" path="res://objects/level/ui_layer.tscn" id="16_nr2eo"] [ext_resource type="PackedScene" uid="uid://bqom4cm7r18db" path="res://objects/entities/killzone.tscn" id="17_3xroh"] -[ext_resource type="Resource" uid="uid://b63u5qfp8p7pv" path="res://resources/levels/village/village_3.tres" id="17_a7yjf"] [ext_resource type="PackedScene" uid="uid://b4pdt1gv2ymyi" path="res://objects/tooltip.tscn" id="18_l3a7y"] -[ext_resource type="Script" uid="uid://8r1y8elyw7kt" path="res://scripts/console_management.gd" id="19_0pba3"] [ext_resource type="PackedScene" uid="uid://cawlpch2lk3a2" path="res://objects/level/world_environment.tscn" id="20_embdf"] [ext_resource type="PackedScene" uid="uid://cywsu7yrtjdog" path="res://objects/level/global_light.tscn" id="21_fytod"] [ext_resource type="PackedScene" uid="uid://t6h2ra7kjyq" path="res://objects/entities/small_heal_potion.tscn" id="23_m6h4x"] @@ -325,33 +323,14 @@ position = Vector2(880, -578) [node name="UI Layer" parent="." instance=ExtResource("16_nr2eo")] -[node name="HUD" parent="UI Layer" index="0" node_paths=PackedStringArray("player_health")] -player_health = NodePath("../../Brick Player/HealthComponent") - -[node name="DeathScreen" parent="UI Layer" index="1" node_paths=PackedStringArray("nodes_to_disable")] -current_level = ExtResource("17_a7yjf") -nodes_to_disable = [NodePath("../../Brick Player")] - -[node name="Marketplace" parent="UI Layer" index="3" node_paths=PackedStringArray("skill_unlocker", "components_to_disable")] -skill_unlocker = NodePath("../../Brick Player/SkillUnlockerComponent") -components_to_disable = [NodePath("../../Brick Player")] - [node name="Killzone" parent="." instance=ExtResource("17_3xroh")] position = Vector2(2600, 802) [node name="Tooltip" parent="." instance=ExtResource("18_l3a7y")] position = Vector2(1016, -104) -text = "Press 'down' to fall from platform!" [node name="Tooltip2" parent="." instance=ExtResource("18_l3a7y")] position = Vector2(1576, -40) -text = "Be careful!" - -[node name="ConsoleManagement" type="Node" parent="." node_paths=PackedStringArray("player_health", "skill_unlocker", "skill_manager")] -script = ExtResource("19_0pba3") -player_health = NodePath("../Brick Player/HealthComponent") -skill_unlocker = NodePath("../Brick Player/SkillUnlockerComponent") -skill_manager = NodePath("../Brick Player/SkillManager") [node name="WorldEnvironment" parent="." instance=ExtResource("20_embdf")] @@ -366,9 +345,6 @@ position = Vector2(1244, -41) [node name="SmallHealPotion3" parent="." instance=ExtResource("23_m6h4x")] position = Vector2(1359, -42) -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/DeathScreen" method="on_player_death"] -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/GameOverScreen" method="on_player_death"] - [editable path="Brick Player"] [editable path="UI Layer"] [editable path="Killzone"] diff --git a/scenes/level_village_4.tscn b/scenes/level_village_4.tscn index 94c7f48..5e9c596 100644 --- a/scenes/level_village_4.tscn +++ b/scenes/level_village_4.tscn @@ -1,11 +1,10 @@ -[gd_scene load_steps=37 format=4 uid="uid://bhad760x3vvco"] +[gd_scene load_steps=35 format=4 uid="uid://bhad760x3vvco"] [ext_resource type="PackedScene" uid="uid://bqi5s710xb1ju" path="res://objects/entities/brick_player.tscn" id="1_k3uyd"] [ext_resource type="PackedScene" uid="uid://bon6raeddf3tu" path="res://objects/entities/chaser.tscn" id="1_xraal"] [ext_resource type="PackedScene" uid="uid://cawlpch2lk3a2" path="res://objects/level/world_environment.tscn" id="2_a7hm7"] [ext_resource type="PackedScene" uid="uid://6foggu31cu14" path="res://objects/level/ui_layer.tscn" id="3_p8wo6"] [ext_resource type="PackedScene" uid="uid://cywsu7yrtjdog" path="res://objects/level/global_light.tscn" id="4_0lkg8"] -[ext_resource type="Resource" uid="uid://cxfei28yu3buh" path="res://resources/levels/village/village_4.tres" id="5_iqtv2"] [ext_resource type="PackedScene" uid="uid://cb0mnye1ki5a6" path="res://objects/level/camera_2d.tscn" id="5_yqj3b"] [ext_resource type="Script" uid="uid://d23haq52m7ulv" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="6_i5rlu"] [ext_resource type="PackedScene" uid="uid://bd51frym6mm7v" path="res://objects/entities/lever.tscn" id="7_1bwe8"] @@ -14,7 +13,6 @@ [ext_resource type="TileSet" uid="uid://cu2sx7qigrqnv" path="res://resources/tilesets/village/terain.tres" id="9_bjo44"] [ext_resource type="TileSet" uid="uid://bc5a20s6kuy8e" path="res://resources/tilesets/village/entities.tres" id="10_gg8rp"] [ext_resource type="TileSet" uid="uid://bbppo0irxdmqy" path="res://resources/tilesets/village/foreground.tres" id="11_23awj"] -[ext_resource type="Script" uid="uid://8r1y8elyw7kt" path="res://scripts/console_management.gd" id="12_4o5b1"] [ext_resource type="PackedScene" uid="uid://bqom4cm7r18db" path="res://objects/entities/killzone.tscn" id="13_1heob"] [ext_resource type="PackedScene" uid="uid://lpovacvt3yyj" path="res://objects/entities/spaceship_enter.tscn" id="14_bajwe"] [ext_resource type="PackedScene" uid="uid://d0s2abysa86rq" path="res://objects/entities/child.tscn" id="15_3iocp"] @@ -115,26 +113,10 @@ texture = SubResource("CanvasTexture_o1yb3") [node name="Chaser" parent="." instance=ExtResource("1_xraal")] position = Vector2(578.405, 15.8615) -[node name="ChaseLevelComponent" parent="Chaser" index="0" node_paths=PackedStringArray("chase_target", "phantom_camera")] -chase_speed = 170.0 -chase_target = NodePath("../../Chase Target") -phantom_camera = NodePath("../../PhantomCamera2D") - [node name="WorldEnvironment" parent="." instance=ExtResource("2_a7hm7")] [node name="UI Layer" parent="." instance=ExtResource("3_p8wo6")] -[node name="HUD" parent="UI Layer" index="0" node_paths=PackedStringArray("player_health")] -player_health = NodePath("../../Brick Player/HealthComponent") - -[node name="DeathScreen" parent="UI Layer" index="1" node_paths=PackedStringArray("nodes_to_disable")] -current_level = ExtResource("5_iqtv2") -nodes_to_disable = [NodePath("../../Brick Player")] - -[node name="Marketplace" parent="UI Layer" index="3" node_paths=PackedStringArray("skill_unlocker", "components_to_disable")] -skill_unlocker = NodePath("../../Brick Player/SkillUnlockerComponent") -components_to_disable = [NodePath("../../Brick Player")] - [node name="Global Light" parent="." instance=ExtResource("4_0lkg8")] [node name="Lever" parent="." instance=ExtResource("7_1bwe8")] @@ -174,13 +156,6 @@ tile_set = ExtResource("10_gg8rp") [node name="Foreground layer" type="TileMapLayer" parent="."] tile_set = ExtResource("11_23awj") -[node name="ConsoleManagement" type="Node" parent="." node_paths=PackedStringArray("player_health", "skill_unlocker", "skill_manager")] -script = ExtResource("12_4o5b1") -player_health = NodePath("../Brick Player/HealthComponent") -skill_unlocker = NodePath("../Brick Player/SkillUnlockerComponent") -skill_manager = NodePath("../Brick Player/SkillManager") -metadata/_custom_type_script = "uid://8r1y8elyw7kt" - [node name="Killzone" parent="." instance=ExtResource("13_1heob")] position = Vector2(215, 324) @@ -204,9 +179,6 @@ metadata/_edit_group_ = true [node name="Sprite2D" parent="Enemies/Flying Enemy" index="1"] flip_h = true -[node name="PeriodicShootingComponent" parent="Enemies/Flying Enemy" index="8"] -shoot_direction = Vector2(-1, 0) - [node name="HitParticles" parent="Enemies/Flying Enemy" index="15"] process_material = SubResource("ParticleProcessMaterial_qxfb0") @@ -220,9 +192,6 @@ metadata/_edit_group_ = true [node name="Sprite2D" parent="Enemies/Flying Enemy2" index="1"] flip_h = true -[node name="PeriodicShootingComponent" parent="Enemies/Flying Enemy2" index="8"] -shoot_direction = Vector2(-1, 0) - [node name="HitParticles" parent="Enemies/Flying Enemy2" index="15"] process_material = SubResource("ParticleProcessMaterial_qxfb0") @@ -236,9 +205,6 @@ metadata/_edit_group_ = true [node name="Sprite2D" parent="Enemies/Flying Enemy3" index="1"] flip_h = true -[node name="PeriodicShootingComponent" parent="Enemies/Flying Enemy3" index="8"] -shoot_direction = Vector2(-1, 0) - [node name="HitParticles" parent="Enemies/Flying Enemy3" index="15"] process_material = SubResource("ParticleProcessMaterial_qxfb0") @@ -252,9 +218,6 @@ metadata/_edit_group_ = true [node name="Sprite2D" parent="Enemies/Flying Enemy4" index="1"] flip_h = true -[node name="PeriodicShootingComponent" parent="Enemies/Flying Enemy4" index="8"] -shoot_direction = Vector2(-1, 0) - [node name="HitParticles" parent="Enemies/Flying Enemy4" index="15"] process_material = SubResource("ParticleProcessMaterial_qxfb0") @@ -281,9 +244,6 @@ metadata/_edit_group_ = true [node name="Sprite2D" parent="Enemies mid section path/PathFollow2D/Flying Enemy" index="1"] flip_h = true -[node name="PeriodicShootingComponent" parent="Enemies mid section path/PathFollow2D/Flying Enemy" index="8"] -shoot_direction = Vector2(-1, 0) - [node name="HitParticles" parent="Enemies mid section path/PathFollow2D/Flying Enemy" index="15"] process_material = SubResource("ParticleProcessMaterial_qxfb0") @@ -296,16 +256,6 @@ position = Vector2(7148, 22) [node name="CollisionShape2D" parent="Spaceship exit" index="0"] position = Vector2(16.5, -10) -[connection signal="spaceship_entered" from="Spaceship Enter/SpaceshipEnterComponent" to="Chaser/ChaseLevelComponent" method="on_ship_entered"] -[connection signal="spaceship_entered" from="Spaceship Enter/SpaceshipEnterComponent" to="Brick Player" method="on_spaceship_entered"] -[connection signal="spaceship_entered" from="Spaceship Enter/SpaceshipEnterComponent" to="Brick Player/Movements/PlatformMovement" method="on_ship_entered"] -[connection signal="spaceship_entered" from="Spaceship Enter/SpaceshipEnterComponent" to="Brick Player/ShipShooter" method="on_ship_entered"] -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/DeathScreen" method="on_player_death"] -[connection signal="on_death" from="Brick Player/HealthComponent" to="UI Layer/GameOverScreen" method="on_player_death"] -[connection signal="spaceship_exited" from="Spaceship exit" to="Chaser/ChaseLevelComponent" method="on_ship_exited"] -[connection signal="spaceship_exited" from="Spaceship exit" to="Brick Player" method="on_spaceship_exited"] -[connection signal="spaceship_exited" from="Spaceship exit" to="Brick Player/ShipShooter" method="on_ship_exited"] - [editable path="Chaser"] [editable path="UI Layer"] [editable path="Spaceship Enter"] diff --git a/scenes/main_menu.tscn b/scenes/main_menu.tscn index 2a08d12..35245bf 100644 --- a/scenes/main_menu.tscn +++ b/scenes/main_menu.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=6 format=3 uid="uid://cl00e2ocomk3m"] -[ext_resource type="PackedScene" path="res://objects/ui/main_menu.tscn" id="1_ekxnf"] +[ext_resource type="PackedScene" uid="uid://8b6ol5sssbgo" path="res://objects/ui/main_menu.tscn" id="1_ekxnf"] [ext_resource type="PackedScene" uid="uid://y0ae6e7t70fj" path="res://objects/ui/settings_menu.tscn" id="2_bqqt6"] [ext_resource type="PackedScene" uid="uid://bwgmrcyj4mvu" path="res://objects/ui/credits.tscn" id="3_bqqt6"] [ext_resource type="PackedScene" uid="uid://b5fx1vdfky307" path="res://objects/ui/audio_settings.tscn" id="4_8ln24"] @@ -8,14 +8,16 @@ [node name="Main menu" type="CanvasLayer"] -[node name="MainMenu" parent="." node_paths=PackedStringArray("settings_control", "credits_control") instance=ExtResource("1_ekxnf")] -settings_control = NodePath("../Settings menu") -credits_control = NodePath("../Credits") +[node name="MainMenu" parent="." node_paths=PackedStringArray("SettingsControl", "CreditsControl") instance=ExtResource("1_ekxnf")] +SettingsControl = NodePath("../Settings menu") +CreditsControl = NodePath("../Credits") -[node name="Settings menu" parent="." node_paths=PackedStringArray("input_settings", "audio_settings") instance=ExtResource("2_bqqt6")] +[node name="Settings menu" parent="." node_paths=PackedStringArray("InputSettingsControl", "AudioSettingsControl", "DisplaySettingsControl", "GameplaySettingsControl") instance=ExtResource("2_bqqt6")] visible = false -input_settings = NodePath("../Input Settings") -audio_settings = NodePath("../Audio settings") +InputSettingsControl = NodePath("../Input Settings") +AudioSettingsControl = NodePath("../Audio settings") +DisplaySettingsControl = NodePath("../Display Settings") +GameplaySettingsControl = NodePath("../Gameplay Settings") [node name="Credits" parent="." instance=ExtResource("3_bqqt6")] visible = false @@ -25,3 +27,15 @@ visible = false [node name="Input Settings" parent="." instance=ExtResource("5_rtw2f")] visible = false + +[node name="Gameplay Settings" type="Control" parent="."] +layout_mode = 3 +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Display Settings" type="Control" parent="."] +layout_mode = 3 +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 diff --git a/scripts/Resources/LevelResource.cs b/scripts/Resources/LevelResource.cs new file mode 100644 index 0000000..7db4219 --- /dev/null +++ b/scripts/Resources/LevelResource.cs @@ -0,0 +1,13 @@ +using Godot; + +namespace Mr.BrickAdventures.scripts.Resources; + +[GlobalClass] +public partial class LevelResource : Resource +{ + [Export] + public string LevelName { get; set; } = string.Empty; + + [Export] + public string ScenePath { get; set; } = string.Empty; +} \ No newline at end of file diff --git a/scripts/UI/AudioSettings.cs b/scripts/UI/AudioSettings.cs index 0d605b3..83aa475 100644 --- a/scripts/UI/AudioSettings.cs +++ b/scripts/UI/AudioSettings.cs @@ -3,7 +3,7 @@ using Mr.BrickAdventures.Autoloads; namespace Mr.BrickAdventures.scripts.UI; -public partial class AudioSettings : Node +public partial class AudioSettings : Control { [Export] public Slider MasterVolumeSlider { get; set; } [Export] public Slider MusicVolumeSlider { get; set; } diff --git a/scripts/UI/ChargeProgressBar.cs b/scripts/UI/ChargeProgressBar.cs index 5e74caf..a4662f8 100644 --- a/scripts/UI/ChargeProgressBar.cs +++ b/scripts/UI/ChargeProgressBar.cs @@ -4,7 +4,7 @@ using Mr.BrickAdventures.scripts.Resources; namespace Mr.BrickAdventures.scripts.UI; -public partial class ChargeProgressBar : Node +public partial class ChargeProgressBar : ProgressBar { [Export] public ProgressBar ProgressBar { get; set; } [Export] public BrickThrowComponent ThrowComponent { get; set; } @@ -27,6 +27,11 @@ public partial class ChargeProgressBar : Node private void SetupDependencies() { + if (ThrowComponent == null || ProgressBar == null) + { + return; + } + if (ThrowComponent.ThrowInputBehavior is ChargeThrowInputResource throwInput) { _throwInput = throwInput; diff --git a/scripts/UI/DeathScreen.cs b/scripts/UI/DeathScreen.cs new file mode 100644 index 0000000..ce03d99 --- /dev/null +++ b/scripts/UI/DeathScreen.cs @@ -0,0 +1,72 @@ +using Godot; +using Mr.BrickAdventures.Autoloads; +using Mr.BrickAdventures.scripts.Resources; + +namespace Mr.BrickAdventures.scripts.UI; + +[GlobalClass] +public partial class DeathScreen : Control +{ + [Export] public LevelResource CurrentLevel { get; set; } + [Export] public Label CurrentLevelLabel { get; set; } + [Export] public Label LivesLeftLabel { get; set; } + [Export] public float TimeoutTime { get; set; } = 2.0f; + [Export] public Godot.Collections.Array NodesToDisable { get; set; } = new(); + + private GameManager _gameManager; + private Timer _timer; + + public override void _Ready() + { + _gameManager = GetNode("/root/GameManager"); + SetLabels(); + } + + private void SetLabels() + { + if (_gameManager == null) return; + + if (CurrentLevel != null) + { + CurrentLevelLabel.Text = CurrentLevel.LevelName; + } + LivesLeftLabel.Text = $" x {_gameManager.GetLives()}"; + } + + private void SetupTimer() + { + _timer = new Timer(); + _timer.WaitTime = TimeoutTime; + _timer.OneShot = true; + _timer.Timeout += OnTimeout; + AddChild(_timer); + _timer.Start(); + } + + private void ToggleNodes() + { + foreach (var node in NodesToDisable) + { + node.ProcessMode = node.ProcessMode == ProcessModeEnum.Disabled + ? ProcessModeEnum.Inherit + : ProcessModeEnum.Disabled; + } + } + + public void OnPlayerDeath() + { + if (_gameManager == null) return; + + ToggleNodes(); + SetLabels(); + Show(); + SetupTimer(); + } + + private void OnTimeout() + { + if (_gameManager == null || _gameManager.GetLives() == 0) return; + + GetTree().ReloadCurrentScene(); + } +} \ No newline at end of file diff --git a/scripts/UI/GameOverScreen.cs b/scripts/UI/GameOverScreen.cs index 80e55b7..6cb17a1 100644 --- a/scripts/UI/GameOverScreen.cs +++ b/scripts/UI/GameOverScreen.cs @@ -3,7 +3,7 @@ using Mr.BrickAdventures.Autoloads; namespace Mr.BrickAdventures.scripts.UI; -public partial class GameOverScreen : Node +public partial class GameOverScreen : Control { [Export] public Control GameOverPanel { get; set; } [Export] public Button RestartButton { get; set; } diff --git a/scripts/UI/Hud.cs b/scripts/UI/Hud.cs index 5939a8e..9f584ce 100644 --- a/scripts/UI/Hud.cs +++ b/scripts/UI/Hud.cs @@ -4,7 +4,7 @@ using Mr.BrickAdventures.scripts.components; namespace Mr.BrickAdventures.scripts.UI; -public partial class Hud : Node +public partial class Hud : Control { [Export] public HealthComponent Health { get; set; } [Export] public Label CoinsLabel { get; set; } diff --git a/scripts/UI/MainMenu.cs b/scripts/UI/MainMenu.cs index b4b5de0..b3aa727 100644 --- a/scripts/UI/MainMenu.cs +++ b/scripts/UI/MainMenu.cs @@ -3,7 +3,7 @@ using Mr.BrickAdventures.Autoloads; namespace Mr.BrickAdventures.scripts.UI; -public partial class MainMenu : Node +public partial class MainMenu : Control { [Export] public Control MainMenuControl { get; set; } [Export] public Button NewGameButton { get; set; } diff --git a/scripts/UI/Marketplace.cs b/scripts/UI/Marketplace.cs index 1fc580c..4d33335 100644 --- a/scripts/UI/Marketplace.cs +++ b/scripts/UI/Marketplace.cs @@ -7,7 +7,7 @@ using Mr.BrickAdventures.scripts.Resources; namespace Mr.BrickAdventures.scripts.UI; -public partial class Marketplace : Node +public partial class Marketplace : Control { [Export] public Array Skills { get; set; } = []; [Export] public GridContainer ToUnlockGrid { get; set; } @@ -24,6 +24,8 @@ public partial class Marketplace : Node public override void _Ready() { + _gameManager = GetNode("/root/GameManager"); + var skillsToUnlock = new List(); foreach (var skill in Skills) skillsToUnlock.Add(skill); diff --git a/scripts/UI/PauseMenu.cs b/scripts/UI/PauseMenu.cs index 9cc2281..95e56fd 100644 --- a/scripts/UI/PauseMenu.cs +++ b/scripts/UI/PauseMenu.cs @@ -3,7 +3,7 @@ using Mr.BrickAdventures.Autoloads; namespace Mr.BrickAdventures.scripts.UI; -public partial class PauseMenu : Node +public partial class PauseMenu : Control { [Export] public Control PauseMenuControl { get; set; } [Export] public Control SettingsControl { get; set; } diff --git a/scripts/UI/SettingsMenu.cs b/scripts/UI/SettingsMenu.cs index 66890d2..010a319 100644 --- a/scripts/UI/SettingsMenu.cs +++ b/scripts/UI/SettingsMenu.cs @@ -3,7 +3,7 @@ using Mr.BrickAdventures.Autoloads; namespace Mr.BrickAdventures.scripts.UI; -public partial class SettingsMenu : Node +public partial class SettingsMenu : Control { [Export] public Control InputSettingsControl { get; set; } [Export] public Control AudioSettingsControl { get; set; } diff --git a/scripts/components/DamageComponent.cs b/scripts/components/DamageComponent.cs index d343ce7..6891036 100644 --- a/scripts/components/DamageComponent.cs +++ b/scripts/components/DamageComponent.cs @@ -16,16 +16,13 @@ public partial class DamageComponent : Node public override void _Ready() { - if (Area == null) + if (Area != null) { - GD.PushError($"DamageComponent: Area2D node is not set."); - return; + Area.BodyEntered += OnAreaBodyEntered; + Area.BodyExited += OnAreaBodyExited; + Area.AreaEntered += OnAreaAreaEntered; } - Area.BodyEntered += OnAreaBodyEntered; - Area.BodyExited += OnAreaBodyExited; - Area.AreaEntered += OnAreaAreaEntered; - if (DamageTimer != null) { DamageTimer.Timeout += OnDamageTimerTimeout; diff --git a/scripts/components/ExitDoorComponent.cs b/scripts/components/ExitDoorComponent.cs index d204421..9c70fa6 100644 --- a/scripts/components/ExitDoorComponent.cs +++ b/scripts/components/ExitDoorComponent.cs @@ -18,6 +18,8 @@ public partial class ExitDoorComponent : Node, IUnlockable public override void _Ready() { + _gameManager = GetNode("/root/GameManager"); + if (ExitArea == null) { GD.PushError("ExitDoorComponent: ExitArea is not set."); @@ -26,12 +28,15 @@ public partial class ExitDoorComponent : Node, IUnlockable ExitArea.BodyEntered += OnExitAreaBodyEntered; - _gameManager = GetNode("/root/gameManager"); } private void OnExitAreaBodyEntered(Node2D body) { - throw new System.NotImplementedException(); + if (Locked) return; + + EmitSignalExitTriggered(); + _gameManager.UnlockLevel((int)_gameManager.PlayerState["CurrentLevel"] + 1); + CallDeferred(nameof(GoToNextLevel)); } public void Unlock() diff --git a/scripts/components/PlayerController.cs b/scripts/components/PlayerController.cs index 3006488..dd5387a 100644 --- a/scripts/components/PlayerController.cs +++ b/scripts/components/PlayerController.cs @@ -4,7 +4,7 @@ using Mr.BrickAdventures.scripts.interfaces; namespace Mr.BrickAdventures.scripts.components; -public partial class PlayerController : Node2D +public partial class PlayerController : CharacterBody2D { [Export] public string DefaultMovementType { get; set; } = "platform"; diff --git a/scripts/components/PlayerDeathComponent.cs b/scripts/components/PlayerDeathComponent.cs index 2c62493..7db4780 100644 --- a/scripts/components/PlayerDeathComponent.cs +++ b/scripts/components/PlayerDeathComponent.cs @@ -14,7 +14,7 @@ public partial class PlayerDeathComponent : Node2D public override void _Ready() { - _gameManager = GetNode("/root/gameManager"); + _gameManager = GetNode("/root/GameManager"); HealthComponent.Death += OnDeath; } diff --git a/scripts/components/ScoreComponent.cs b/scripts/components/ScoreComponent.cs index c00b685..f56ba49 100644 --- a/scripts/components/ScoreComponent.cs +++ b/scripts/components/ScoreComponent.cs @@ -20,10 +20,12 @@ public partial class ScoreComponent : Node return; } - var coins = GetTree().GetNodesInGroup("Coins"); + var coins = GetTree().GetNodesInGroup("coins"); + GD.Print($"Found {coins.Count} coins in the scene."); foreach (var coin in coins) { var c = coin.GetNodeOrNull("CollectableComponent"); + GD.Print(c == null ? "CollectableComponent not found on coin." : "CollectableComponent found on coin."); if (c != null) { c.Collected += OnCollected; @@ -31,6 +33,17 @@ public partial class ScoreComponent : Node } } + public override void _Process(double delta) + { + GetCoinsInScene(); + } + + private void GetCoinsInScene() + { + var coins = GetTree().GetNodesInGroup("Coins"); + GD.Print($"Found {coins.Count} coins in the scene."); + } + private void OnCollected(float amount, CollectableType type, Node2D body) { if (type != CollectableType.Coin) return; diff --git a/scripts/components/TooltipComponent.cs b/scripts/components/TooltipComponent.cs index f32961b..3500062 100644 --- a/scripts/components/TooltipComponent.cs +++ b/scripts/components/TooltipComponent.cs @@ -2,9 +2,8 @@ using Godot; namespace Mr.BrickAdventures.scripts.components; -public partial class TooltipComponent : Node +public partial class TooltipComponent : Area2D { - [Export] public Area2D Area { get; set; } [Export] public Control UiRoot { get; set; } [Export] public string Text { get; set; } = string.Empty; [Export] public Label TooltipLabel { get; set; } @@ -13,8 +12,8 @@ public partial class TooltipComponent : Node { TooltipLabel.Text = Text; UiRoot.Visible = false; - Area.BodyEntered += OnBodyEntered; - Area.BodyExited += OnBodyExited; + BodyEntered += OnBodyEntered; + BodyExited += OnBodyExited; } private void OnBodyEntered(Node2D body) diff --git a/scripts/resources/level_resource.gd b/scripts/resources/level_resource.gd deleted file mode 100644 index 0a891d9..0000000 --- a/scripts/resources/level_resource.gd +++ /dev/null @@ -1,5 +0,0 @@ -class_name LevelResource -extends Resource - -@export var level_name: String -@export var scene_path: String \ No newline at end of file diff --git a/scripts/resources/level_resource.gd.uid b/scripts/resources/level_resource.gd.uid deleted file mode 100644 index 89be7e5..0000000 --- a/scripts/resources/level_resource.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cp68km8bykymb diff --git a/scripts/ui/hud.gd b/scripts/ui/hud.gd index 77cd50a..f788db5 100644 --- a/scripts/ui/hud.gd +++ b/scripts/ui/hud.gd @@ -48,4 +48,4 @@ func set_health_progressbar() -> void: return health_progressbar.value = player_health.health - health_progressbar.max_value = player_health.max_health \ No newline at end of file + health_progressbar.max_value = player_health.max_health