Animations improved
This commit is contained in:
parent
c89d93cf24
commit
ad18793543
35 changed files with 430 additions and 465 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://dy41q1kxray5t"]
|
||||
[gd_scene load_steps=19 format=3 uid="uid://dy41q1kxray5t"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_pyk3o"]
|
||||
[ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="2_14qlx"]
|
||||
|
|
@ -9,29 +9,73 @@
|
|||
[ext_resource type="Script" path="res://scripts/components/plants/Eyesight.cs" id="7_2bki8"]
|
||||
[ext_resource type="Script" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="8_nl4jc"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"]
|
||||
size = Vector2(20, 44)
|
||||
[sub_resource type="Animation" id="Animation_a2y0j"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D: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_ipp6b"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_a2y0j")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_34v85"]
|
||||
animation = &"peashooter/idle"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_u4o2k"]
|
||||
animation = &"peashooter/shoot"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_70n3m"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_2lwpg"]
|
||||
advance_mode = 2
|
||||
advance_condition = &"ready"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_k61yr"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_13o7y"]
|
||||
states/peashooter_idle/node = SubResource("AnimationNodeAnimation_34v85")
|
||||
states/peashooter_idle/position = Vector2(420, 92)
|
||||
states/peashooter_shoot/node = SubResource("AnimationNodeAnimation_u4o2k")
|
||||
states/peashooter_shoot/position = Vector2(674, 82)
|
||||
transitions = ["Start", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_70n3m"), "peashooter_idle", "peashooter_shoot", SubResource("AnimationNodeStateMachineTransition_2lwpg"), "peashooter_shoot", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_k61yr")]
|
||||
|
||||
[sub_resource type="SegmentShape2D" id="SegmentShape2D_8iovl"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"]
|
||||
size = Vector2(20, 44)
|
||||
|
||||
[node name="Peashooter" instance=ExtResource("1_pyk3o")]
|
||||
_maxHP = 100
|
||||
|
||||
[node name="Sprite2D" parent="." index="0"]
|
||||
texture = ExtResource("2_14qlx")
|
||||
hframes = 2
|
||||
vframes = 10
|
||||
frame = 6
|
||||
hframes = 10
|
||||
vframes = 2
|
||||
|
||||
[node name="AnimationPlayer" parent="." index="1"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_ipp6b"),
|
||||
"peashooter": ExtResource("3_8lrhp")
|
||||
}
|
||||
autoplay = "peashooter/idle"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"]
|
||||
position = Vector2(0, 5)
|
||||
shape = SubResource("RectangleShape2D_r7xnh")
|
||||
[node name="AnimationTree" parent="." index="2"]
|
||||
tree_root = SubResource("AnimationNodeStateMachine_13o7y")
|
||||
parameters/conditions/ready = false
|
||||
|
||||
[node name="Shooter" type="Marker2D" parent="." index="3" node_paths=PackedStringArray("_timer")]
|
||||
position = Vector2(12, -4)
|
||||
|
|
@ -60,3 +104,7 @@ shape = SubResource("SegmentShape2D_8iovl")
|
|||
script = ExtResource("8_nl4jc")
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." index="6"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"]
|
||||
position = Vector2(0, 5)
|
||||
shape = SubResource("RectangleShape2D_r7xnh")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue