squigs now move up and down

This commit is contained in:
pennyrigate 2023-06-21 22:04:41 -04:00
parent f1b54fc4e2
commit cb7c660e44

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=9 format=2] [gd_scene load_steps=10 format=2]
[ext_resource path="res://objects/enemy/squig.gd" type="Script" id=1] [ext_resource path="res://objects/enemy/enemy_move_sidesideupdown.gd" type="Script" id=1]
[ext_resource path="res://graphics/enemy/squig.png" type="Texture" id=2] [ext_resource path="res://graphics/enemy/squig.png" type="Texture" id=2]
[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=3] [ext_resource path="res://graphics/particles/dust.png" type="Texture" id=3]
@ -144,11 +144,29 @@ tracks/3/keys = {
"values": [ Vector2( 1, 1 ) ] "values": [ Vector2( 1, 1 ) ]
} }
[sub_resource type="Animation" id=7]
resource_name = "up_and_down"
length = 0.3
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ 0, 1 ]
}
[node name="Squig" type="Node2D" groups=["enemy"]] [node name="Squig" type="Node2D" groups=["enemy"]]
light_mask = 8 light_mask = 8
script = ExtResource( 1 ) script = ExtResource( 1 )
damping = 0.5 direction = -1
hitbox_clip = Rect2( 3.5, -1, 0, 9 ) move_direction = 1
node_to_flip = NodePath("Sprite")
[node name="InkParticles" type="CPUParticles2D" parent="."] [node name="InkParticles" type="CPUParticles2D" parent="."]
position = Vector2( 3.5, 7 ) position = Vector2( 3.5, 7 )
@ -183,9 +201,10 @@ position = Vector2( -0.5, -0.5 )
shape = SubResource( 1 ) shape = SubResource( 1 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "swimming" autoplay = "up_and_down"
anims/RESET = SubResource( 2 ) anims/RESET = SubResource( 2 )
anims/falling = SubResource( 5 ) anims/falling = SubResource( 5 )
anims/swimming = SubResource( 4 ) anims/swimming = SubResource( 4 )
anims/up_and_down = SubResource( 7 )
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"] [connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]