Add new skills: Double Jump, Ground Pound, Brick Armor, and Brick Shield; implement skill removal signal in SkillManager (#11)

This commit is contained in:
2025-08-31 15:17:11 +02:00
committed by GitHub
parent bd40c797d4
commit ead52f6d51
89 changed files with 682 additions and 7 deletions

View File

@@ -90,7 +90,7 @@ color_ramp = SubResource("GradientTexture1D_lgb3u")
[node name="Brick Player" type="CharacterBody2D" node_paths=PackedStringArray("MovementAbilitiesContainer") groups=["player"]]
collision_layer = 4
collision_mask = 43
collision_mask = 107
script = ExtResource("1_yysbb")
MovementAbilitiesContainer = NodePath("Movements")
GroundMovementScene = ExtResource("2_oefns")

View File

@@ -13,7 +13,7 @@
radius = 4.0
[node name="Bullet" type="Area2D"]
collision_layer = 8
collision_layer = 64
collision_mask = 21
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
@@ -50,7 +50,6 @@ LifeTime = 10.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("LaunchComponent")]
script = ExtResource("6_lycw2")
@@ -61,7 +60,6 @@ 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")]
z_index = 3

View File

@@ -0,0 +1,23 @@
[gd_scene load_steps=4 format=3 uid="uid://d0074by8ith81"]
[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="1_dkcj7"]
[ext_resource type="Script" uid="uid://oyf25mpc5etr" path="res://scripts/components/LifetimeComponent.cs" id="2_mcqxt"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jwgyp"]
size = Vector2(128, 20)
[node name="Shockwave" type="Area2D"]
collision_layer = 0
collision_mask = 72
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_jwgyp")
[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")]
script = ExtResource("1_dkcj7")
Area = NodePath("..")
metadata/_custom_type_script = "uid://2i7p7v135u7c"
[node name="LifetimeComponent" type="Node" parent="."]
script = ExtResource("2_mcqxt")
LifeTime = 0.2

38
objects/items/shield.tscn Normal file
View File

@@ -0,0 +1,38 @@
[gd_scene load_steps=6 format=3 uid="uid://c6rgh0qn4jqlc"]
[ext_resource type="Texture2D" uid="uid://c0xtjfpmkfolk" path="res://sprites/explosive_brick_skill_icon.png" id="1_n5wbm"]
[ext_resource type="Script" uid="uid://dgb8bqcri7nsj" path="res://scripts/components/HealthComponent.cs" id="2_yw7rl"]
[ext_resource type="Script" uid="uid://ctfrbj52ejay4" path="res://scripts/components/DestroyableComponent.cs" id="3_6t8cd"]
[ext_resource type="Script" uid="uid://2i7p7v135u7c" path="res://scripts/components/DamageComponent.cs" id="4_yw7rl"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_n5wbm"]
radius = 26.0
height = 60.0
[node name="Shield" type="Sprite2D"]
modulate = Color(0.00784314, 1, 1, 1)
texture = ExtResource("1_n5wbm")
[node name="Area2D" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 64
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(1, -3)
shape = SubResource("CapsuleShape2D_n5wbm")
[node name="HealthComponent" type="Node2D" parent="."]
script = ExtResource("2_yw7rl")
Health = 0.5
MaxHealth = 0.5
metadata/_custom_type_script = "uid://dgb8bqcri7nsj"
[node name="DestroyableComponent" type="Node2D" parent="." node_paths=PackedStringArray("Health")]
script = ExtResource("3_6t8cd")
Health = NodePath("../HealthComponent")
metadata/_custom_type_script = "uid://ctfrbj52ejay4"
[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("Area")]
script = ExtResource("4_yw7rl")
Area = NodePath("../Area2D")
metadata/_custom_type_script = "uid://2i7p7v135u7c"

View File

@@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://bktuhojquwesl"]
[ext_resource type="Script" uid="uid://xc0j26e88np7" path="res://scripts/components/Movement/DoubleJumpAbility.cs" id="1_vu3oa"]
[node name="DoubleJump" type="Node"]
script = ExtResource("1_vu3oa")
metadata/_custom_type_script = "uid://xc0j26e88np7"

View File

@@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://cdeh7wfc62fr4"]
[ext_resource type="Script" uid="uid://5fyepa666cc8" path="res://scripts/components/BrickArmorSkillComponent.cs" id="1_i7tox"]
[node name="BrickArmorSkillComponent" type="Node"]
script = ExtResource("1_i7tox")
metadata/_custom_type_script = "uid://5fyepa666cc8"

View File

@@ -0,0 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://blwk5qduvdnxv"]
[ext_resource type="Script" uid="uid://dbiu2qrr8sprx" path="res://scripts/components/BrickShieldSkillComponent.cs" id="1_gjjt4"]
[ext_resource type="PackedScene" uid="uid://c6rgh0qn4jqlc" path="res://objects/items/shield.tscn" id="2_wjvuq"]
[node name="BrickShieldSkillComponent" type="Node"]
script = ExtResource("1_gjjt4")
ShieldScene = ExtResource("2_wjvuq")
metadata/_custom_type_script = "uid://dbiu2qrr8sprx"

View File

@@ -0,0 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://dwaxbojb44a6l"]
[ext_resource type="Script" uid="uid://c61jxwtgiuqsy" path="res://scripts/components/DoubleJumpSkillComponent.cs" id="1_d8v8j"]
[ext_resource type="PackedScene" uid="uid://bktuhojquwesl" path="res://objects/movement_abilities/double_jump.tscn" id="2_romvo"]
[node name="DoubleJumpSkill" type="Node"]
script = ExtResource("1_d8v8j")
_doubleJumpAbilityScene = ExtResource("2_romvo")
metadata/_custom_type_script = "uid://c61jxwtgiuqsy"

View File

@@ -0,0 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://lu3wvpqefekn"]
[ext_resource type="Script" uid="uid://3sclg5kdjg13" path="res://scripts/components/GroundPoundSkillComponent.cs" id="1_gx4wb"]
[ext_resource type="PackedScene" uid="uid://d0074by8ith81" path="res://objects/fxs/shockwave.tscn" id="2_3vdwu"]
[node name="GroundPoundSkillComponent" type="Node"]
script = ExtResource("1_gx4wb")
ShockwaveScene = ExtResource("2_3vdwu")
metadata/_custom_type_script = "uid://3sclg5kdjg13"

View File

@@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://dtxkjif7prm70"]
[ext_resource type="Script" uid="uid://dl7vthhurirwc" path="res://scripts/components/XRayVisionSkillComponent.cs" id="1_ebn6n"]
[node name="XRayVisionSkillComponent" type="Node"]
script = ExtResource("1_ebn6n")
SecretLayer = 2
metadata/_custom_type_script = "uid://dl7vthhurirwc"

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=3 uid="uid://bi6v7u17vg1ww"]
[gd_scene load_steps=13 format=3 uid="uid://bi6v7u17vg1ww"]
[ext_resource type="Script" uid="uid://dru77vj07e18s" path="res://Autoloads/SkillManager.cs" id="1_31033"]
[ext_resource type="Script" uid="uid://d4crrfmbgxnqf" path="res://scripts/Resources/SkillData.cs" id="2_87da4"]
@@ -7,7 +7,12 @@
[ext_resource type="Resource" uid="uid://cr5lo4h8wm0jc" path="res://resources/skills/fire_brick.tres" id="5_77gav"]
[ext_resource type="Resource" uid="uid://ceakv6oqob6m7" path="res://resources/skills/ice_brick.tres" id="6_gib8v"]
[ext_resource type="Resource" uid="uid://d3bjre2etov1n" path="res://resources/skills/magnetic.tres" id="7_6wy8o"]
[ext_resource type="Resource" uid="uid://bxsgq8703qx4u" path="res://resources/skills/double_jump.tres" id="8_87da4"]
[ext_resource type="Resource" uid="uid://cseilsspimw1n" path="res://resources/skills/ground_pound_skill.tres" id="9_77gav"]
[ext_resource type="Resource" uid="uid://c5dj06l86winx" path="res://resources/skills/xray_vision.tres" id="10_gib8v"]
[ext_resource type="Resource" uid="uid://d12defdtmlk0u" path="res://resources/skills/brick_shield.tres" id="11_6wy8o"]
[ext_resource type="Resource" uid="uid://dghnl301o1aiy" path="res://resources/skills/brick_armor.tres" id="12_gib8v"]
[node name="SkillManager" type="Node"]
script = ExtResource("1_31033")
AvailableSkills = Array[ExtResource("2_87da4")]([ExtResource("3_shjvi"), ExtResource("4_53vnv"), ExtResource("5_77gav"), ExtResource("6_gib8v"), ExtResource("7_6wy8o")])
AvailableSkills = Array[ExtResource("2_87da4")]([ExtResource("3_shjvi"), ExtResource("4_53vnv"), ExtResource("5_77gav"), ExtResource("6_gib8v"), ExtResource("7_6wy8o"), ExtResource("8_87da4"), ExtResource("9_77gav"), ExtResource("10_gib8v"), ExtResource("11_6wy8o"), ExtResource("12_gib8v")])