Add terrain hit effects, progressive damage component, and update collectable signals
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 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://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="2_i6t5k"]
|
||||
@@ -7,6 +7,7 @@
|
||||
[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="5_2vqt8"]
|
||||
[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="6_d0tcd"]
|
||||
[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="7_r41xl"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1iorglk708g0" path="res://objects/fxs/terrain_hit_fx.tscn" id="8_d0tcd"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ar0xf"]
|
||||
size = Vector2(16, 10)
|
||||
@@ -24,10 +25,12 @@ hframes = 12
|
||||
vframes = 12
|
||||
frame = 80
|
||||
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")]
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d", "hit_terrain_fx", "bullet_sprite")]
|
||||
script = ExtResource("2_i6t5k")
|
||||
root = NodePath("..")
|
||||
area2d = NodePath("..")
|
||||
hit_terrain_fx = NodePath("../TerrainHitFX")
|
||||
bullet_sprite = NodePath("../Sprite2D")
|
||||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
position = Vector2(0, 2.38419e-07)
|
||||
@@ -60,3 +63,5 @@ script = ExtResource("7_r41xl")
|
||||
root = NodePath("..")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://cvcnfrr1udco5"
|
||||
|
||||
[node name="TerrainHitFX" parent="." instance=ExtResource("8_d0tcd")]
|
||||
|
@@ -1,12 +1,12 @@
|
||||
[gd_scene load_steps=47 format=3 uid="uid://bqi5s710xb1ju"]
|
||||
[gd_scene load_steps=48 format=3 uid="uid://bqi5s710xb1ju"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ccuddyoakg04u" path="res://scripts/player.gd" id="1_8j4h4"]
|
||||
[ext_resource type="Texture2D" uid="uid://b7gp0gqvkv8j4" path="res://sprites/MrBrick_base.png" id="2_bc55y"]
|
||||
[ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="2_lgb3u"]
|
||||
[ext_resource type="Texture2D" uid="uid://jl1gwqchhpdc" path="res://sprites/left_eye.png" id="3_2srrh"]
|
||||
[ext_resource type="Script" uid="uid://b3mrdvre1y567" path="res://scripts/components/ship_movement.gd" id="3_p4n66"]
|
||||
[ext_resource type="Texture2D" uid="uid://iiawtnwmeny3" path="res://sprites/right_eye.png" id="4_ccn81"]
|
||||
[ext_resource type="Script" uid="uid://oxeqvxkgj87j" path="res://scripts/components/flip_player.gd" id="5_geu10"]
|
||||
[ext_resource type="Texture2D" uid="uid://0l454rfplmqg" path="res://sprites/MrBrick_base-sheet.png" id="5_yysbb"]
|
||||
[ext_resource type="Script" uid="uid://qeu80jy4vmuf" path="res://scripts/components/score.gd" id="6_fowa2"]
|
||||
[ext_resource type="Script" uid="uid://btfsq0bvtrx3t" path="res://scripts/components/health.gd" id="7_tqjk8"]
|
||||
[ext_resource type="Script" uid="uid://dkpu3121y88oo" path="res://scripts/components/player_death.gd" id="8_1v23d"]
|
||||
@@ -37,6 +37,7 @@
|
||||
[ext_resource type="Script" uid="uid://d1ctdx52gskv1" path="res://scripts/components/ship_shooter.gd" id="34_gwc8i"]
|
||||
[ext_resource type="PackedScene" uid="uid://dtem8jgcyoqar" path="res://objects/entities/green_laser.tscn" id="36_oxudy"]
|
||||
[ext_resource type="Script" uid="uid://cfeoalic0mu2j" path="res://scripts/components/kill_player_out_of_screen.gd" id="37_oxudy"]
|
||||
[ext_resource type="Script" uid="uid://d32kd83lf86iy" path="res://scripts/components/progressive_damage_component.gd" id="38_o1ihh"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xoue7"]
|
||||
shader = ExtResource("2_lgb3u")
|
||||
@@ -116,7 +117,8 @@ metadata/_custom_type_script = "uid://b3mrdvre1y567"
|
||||
|
||||
[node name="Base" type="Sprite2D" parent="Graphics/Root"]
|
||||
material = SubResource("ShaderMaterial_xoue7")
|
||||
texture = ExtResource("2_bc55y")
|
||||
texture = ExtResource("5_yysbb")
|
||||
hframes = 5
|
||||
|
||||
[node name="Left Eye" type="Sprite2D" parent="Graphics/Root"]
|
||||
position = Vector2(-7, -6)
|
||||
@@ -277,5 +279,12 @@ script = ExtResource("37_oxudy")
|
||||
screen_notifier = NodePath("../VisibleOnScreenNotifier2D")
|
||||
health_component = NodePath("../HealthComponent")
|
||||
|
||||
[node name="ProgressiveDamageComponent" type="Node" parent="." node_paths=PackedStringArray("health_component", "sprite", "platform_movement")]
|
||||
script = ExtResource("38_o1ihh")
|
||||
health_component = NodePath("../HealthComponent")
|
||||
sprite = NodePath("../Graphics/Root/Base")
|
||||
platform_movement = NodePath("../Movements/PlatformMovement")
|
||||
jump_reduction_percentage = 0.15
|
||||
|
||||
[connection signal="on_death" from="HealthComponent" to="PlayerDeathComponent" method="_on_health_component_on_death"]
|
||||
[connection signal="on_health_change" from="HealthComponent" to="KnockbackComponent" method="_on_health_component_on_health_change"]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://bhc7y4xugu4q7"]
|
||||
[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"]
|
||||
@@ -7,6 +7,7 @@
|
||||
[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="PackedScene" uid="uid://c1iorglk708g0" path="res://objects/fxs/terrain_hit_fx.tscn" id="8_6th6w"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_txsw8"]
|
||||
radius = 4.0
|
||||
@@ -59,8 +60,13 @@ script = ExtResource("7_e0mqp")
|
||||
root = NodePath("..")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")]
|
||||
[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")
|
||||
metadata/_custom_type_script = "uid://cdnwrn8v05qhi"
|
||||
|
||||
[node name="TerrainHitFX" parent="." instance=ExtResource("8_6th6w")]
|
||||
z_index = 3
|
||||
|
32
objects/entities/small_heal_potion.tscn
Normal file
32
objects/entities/small_heal_potion.tscn
Normal file
@@ -0,0 +1,32 @@
|
||||
[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="Resource" uid="uid://2tl3yoh202no" path="res://resources/collectables/small_health_potion.tres" id="4_p0sdo"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_uj2v5"]
|
||||
radius = 7.0
|
||||
|
||||
[node name="SmallHealPotion" type="Area2D"]
|
||||
collision_layer = 0
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_uj2v5")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
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="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")
|
||||
metadata/_custom_type_script = "uid://pa1bwc4no08q"
|
Reference in New Issue
Block a user