Initial commit

This commit is contained in:
Фёдор Веселов 2024-09-08 00:45:50 +05:00
commit c266d22f58
85 changed files with 1649 additions and 0 deletions

View file

@ -0,0 +1,32 @@
[gd_scene load_steps=5 format=3 uid="uid://co11v3w8hbwgf"]
[ext_resource type="Script" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"]
[ext_resource type="Texture2D" uid="uid://bwwbkybryi6k0" path="res://assets/sprites/zombie.tres" id="2_4pdxh"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"]
size = Vector2(24, 84)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_r4ug6"]
size = Vector2(20, 48)
[node name="Zombie" type="Node2D"]
script = ExtResource("1_qq3f1")
_maxHP = 100
[node name="Sprite" type="Sprite2D" parent="."]
position = Vector2(0, -44)
texture = ExtResource("2_4pdxh")
[node name="Hitbox" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2(2, -42)
shape = SubResource("RectangleShape2D_hxyad")
[node name="Eatbox" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Eatbox"]
position = Vector2(-10, -24)
shape = SubResource("RectangleShape2D_r4ug6")

View file

@ -0,0 +1,27 @@
[gd_scene load_steps=4 format=3 uid="uid://b2hrv0aqbui7u"]
[ext_resource type="Script" path="res://scripts/LinearProjectile.cs" id="1_3kc4s"]
[ext_resource type="Texture2D" uid="uid://dq0mul65hevtt" path="res://assets/sprites/plants/pea.tres" id="2_26q5x"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ix1sk"]
radius = 6.0
[node name="Pea" type="Area2D"]
collision_layer = 2
collision_mask = 4
script = ExtResource("1_3kc4s")
_speed = 3.0
[node name="Sprite" type="Sprite2D" parent="."]
texture = ExtResource("2_26q5x")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_ix1sk")
[node name="Timer" type="Timer" parent="."]
wait_time = 15.0
one_shot = true
autostart = true
[connection signal="area_entered" from="." to="." method="OnAreaEntered"]
[connection signal="timeout" from="Timer" to="." method="queue_free"]

View file

@ -0,0 +1,117 @@
[gd_scene load_steps=19 format=3 uid="uid://be1kgukmiu0hs"]
[ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="1_cmjrw"]
[ext_resource type="Script" path="res://scripts/components/plants/RuntimePlantData.cs" id="1_f4h5i"]
[ext_resource type="AnimationLibrary" uid="uid://bv1dl1g4dmbho" path="res://resources/animations/plants/peashooter.res" id="2_vs0tj"]
[ext_resource type="Script" path="res://scripts/components/plants/Shooter.cs" id="4_sbggp"]
[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/entities/plants/pea.tscn" id="5_66an8"]
[ext_resource type="Script" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="6_0812i"]
[ext_resource type="Script" path="res://scripts/components/plants/behaviours/PeashooterBehaviour.cs" id="6_tdkoh"]
[ext_resource type="Script" path="res://scripts/components/plants/Eyesight.cs" id="7_fdkt2"]
[sub_resource type="Animation" id="Animation_pephc"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_djmlc"]
_data = {
"RESET": SubResource("Animation_pephc")
}
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_w1am6"]
animation = &"peashooter/idle"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_irqfm"]
animation = &"peashooter/shoot"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4oxpj"]
advance_mode = 2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_bjldt"]
advance_mode = 2
advance_condition = &"ready"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_srdpm"]
switch_mode = 2
advance_mode = 2
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_8qsie"]
states/Start/position = Vector2(192, 100)
states/peashooter_idle/node = SubResource("AnimationNodeAnimation_w1am6")
states/peashooter_idle/position = Vector2(457, 91)
states/peashooter_shoot/node = SubResource("AnimationNodeAnimation_irqfm")
states/peashooter_shoot/position = Vector2(660, 91)
transitions = ["Start", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_4oxpj"), "peashooter_idle", "peashooter_shoot", SubResource("AnimationNodeStateMachineTransition_bjldt"), "peashooter_shoot", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_srdpm")]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4stx8"]
size = Vector2(26, 48)
[sub_resource type="SegmentShape2D" id="SegmentShape2D_v570y"]
resource_local_to_scene = true
b = Vector2(5.865, 0)
[node name="Peashooter" type="Node2D"]
script = ExtResource("1_f4h5i")
[node name="Sprite" type="Sprite2D" parent="."]
texture = ExtResource("1_cmjrw")
hframes = 2
vframes = 10
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_djmlc"),
"peashooter": ExtResource("2_vs0tj")
}
[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource("AnimationNodeStateMachine_8qsie")
anim_player = NodePath("../AnimationPlayer")
parameters/conditions/ready = false
[node name="Hitbox" type="Area2D" parent="."]
collision_layer = 2
collision_mask = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2(0, 4)
shape = SubResource("RectangleShape2D_4stx8")
[node name="Shooter" type="Node2D" parent="." node_paths=PackedStringArray("_timer")]
position = Vector2(17, -4)
script = ExtResource("4_sbggp")
_projectile = ExtResource("5_66an8")
_timer = NodePath("Timer")
[node name="Timer" type="Timer" parent="Shooter"]
wait_time = 1.5
one_shot = true
[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("_animationTree", "_shootTimer", "_sight")]
script = ExtResource("6_tdkoh")
_animationTree = NodePath("../AnimationTree")
_shootTimer = NodePath("../Shooter/Timer")
_sight = NodePath("../Eyesight")
[node name="Eyesight" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 4
script = ExtResource("7_fdkt2")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Eyesight"]
shape = SubResource("SegmentShape2D_v570y")
script = ExtResource("6_0812i")
[connection signal="area_entered" from="Eyesight" to="Eyesight" method="OnAreaEntered"]
[connection signal="area_exited" from="Eyesight" to="Eyesight" method="OnAreaExited"]