Damage source and effect fix

This commit is contained in:
Фёдор Веселов 2024-10-06 19:55:42 +05:00
commit c89d93cf24
15 changed files with 52 additions and 34 deletions

View file

@ -15,6 +15,7 @@ size = Vector2(20, 44)
[sub_resource type="SegmentShape2D" id="SegmentShape2D_8iovl"]
[node name="Peashooter" instance=ExtResource("1_pyk3o")]
_maxHP = 100
[node name="Sprite2D" parent="." index="0"]
texture = ExtResource("2_14qlx")
@ -58,14 +59,4 @@ script = ExtResource("7_2bki8")
shape = SubResource("SegmentShape2D_8iovl")
script = ExtResource("8_nl4jc")
[node name="CollisionShape2D2" type="CollisionShape2D" parent="Eysight" index="1"]
position = Vector2(0, 60)
shape = SubResource("SegmentShape2D_8iovl")
script = ExtResource("8_nl4jc")
[node name="CollisionShape2D3" type="CollisionShape2D" parent="Eysight" index="2"]
position = Vector2(0, -60)
shape = SubResource("SegmentShape2D_8iovl")
script = ExtResource("8_nl4jc")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." index="6"]

View file

@ -1,9 +1,22 @@
[gd_scene load_steps=3 format=3 uid="uid://eegv1qihfv2q"]
[gd_scene load_steps=5 format=3 uid="uid://eegv1qihfv2q"]
[ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_muntu"]
[ext_resource type="Script" path="res://scripts/components/plants/ThreepeaterShooter.cs" id="2_ieami"]
[ext_resource type="Script" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="3_dqn6w"]
[sub_resource type="SegmentShape2D" id="SegmentShape2D_yb26d"]
[node name="Threepeater" instance=ExtResource("1_muntu")]
[node name="Shooter" parent="." index="3"]
script = ExtResource("2_ieami")
[node name="CollisionShape2D2" type="CollisionShape2D" parent="Eysight" index="1"]
position = Vector2(0, 60)
shape = SubResource("SegmentShape2D_yb26d")
script = ExtResource("3_dqn6w")
[node name="CollisionShape2D3" type="CollisionShape2D" parent="Eysight" index="2"]
position = Vector2(0, -60)
shape = SubResource("SegmentShape2D_yb26d")
script = ExtResource("3_dqn6w")

View file

@ -14,6 +14,7 @@ script = ExtResource("1_fkydi")
_speed = 3.0
_damage = 10
_impactEffect = ExtResource("2_txupr")
_damageType = 1
[node name="Sprite" type="Sprite2D" parent="."]
texture = ExtResource("2_xt8td")