91 lines
2.5 KiB
Text
91 lines
2.5 KiB
Text
[gd_scene load_steps=8 format=2]
|
|
|
|
[ext_resource path="res://graphics/enemy/turtle.png" type="Texture" id=1]
|
|
[ext_resource path="res://objects/enemy/turtle.gd" type="Script" id=2]
|
|
[ext_resource path="res://objects/enemy/death_particles.tscn" type="PackedScene" id=3]
|
|
|
|
[sub_resource type="Animation" id=1]
|
|
length = 0.001
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("ToFlip/Sprite:frame_coords:x")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/keys = {
|
|
"times": PoolRealArray( 0 ),
|
|
"transitions": PoolRealArray( 1 ),
|
|
"update": 0,
|
|
"values": [ 0.0 ]
|
|
}
|
|
|
|
[sub_resource type="Animation" id=2]
|
|
resource_name = "swim"
|
|
length = 0.9
|
|
loop = true
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("ToFlip/Sprite:frame_coords:x")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/keys = {
|
|
"times": PoolRealArray( 0, 0.3, 0.6, 0.9 ),
|
|
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
|
"update": 1,
|
|
"values": [ 0.0, 1.0, 2.0, 0.0 ]
|
|
}
|
|
|
|
[sub_resource type="RectangleShape2D" id=3]
|
|
extents = Vector2( 2.5, 2.5 )
|
|
|
|
[sub_resource type="RectangleShape2D" id=5]
|
|
extents = Vector2( 6, 1.5 )
|
|
|
|
[node name="Turtle" type="Node2D" groups=["enemy"]]
|
|
script = ExtResource( 2 )
|
|
blood = false
|
|
speed = 20
|
|
node_to_flip = NodePath("ToFlip")
|
|
|
|
[node name="ToFlip" type="Node2D" parent="."]
|
|
position = Vector2( 8.5, 4 )
|
|
|
|
[node name="Sprite" type="Sprite" parent="ToFlip"]
|
|
unique_name_in_owner = true
|
|
position = Vector2( -9.5, -9 )
|
|
texture = ExtResource( 1 )
|
|
centered = false
|
|
hframes = 3
|
|
vframes = 4
|
|
frame = 6
|
|
|
|
[node name="SwimPlayer" type="AnimationPlayer" parent="ToFlip"]
|
|
root_node = NodePath("../..")
|
|
autoplay = "swim"
|
|
anims/RESET = SubResource( 1 )
|
|
anims/swim = SubResource( 2 )
|
|
|
|
[node name="HeadHitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
|
|
position = Vector2( 8.5, 4 )
|
|
|
|
[node name="HeadShape" type="CollisionShape2D" parent="HeadHitbox"]
|
|
position = Vector2( 11, -0.5 )
|
|
shape = SubResource( 3 )
|
|
|
|
[node name="DeathSplatter" parent="HeadHitbox/HeadShape" instance=ExtResource( 3 )]
|
|
unique_name_in_owner = true
|
|
|
|
[node name="SpikeHitbox" type="Area2D" parent="."]
|
|
|
|
[node name="SpikeShape" type="CollisionShape2D" parent="SpikeHitbox"]
|
|
unique_name_in_owner = true
|
|
position = Vector2( 8.5, -1.5 )
|
|
shape = SubResource( 5 )
|
|
|
|
[node name="Platform" type="KinematicBody2D" parent="."]
|
|
|
|
[node name="PlatformShape" type="CollisionPolygon2D" parent="Platform"]
|
|
polygon = PoolVector2Array( 2, 0, 15, 0, 17, 4, 0, 4 )
|
|
|
|
[connection signal="area_entered" from="SpikeHitbox" to="." method="_on_Hitbox_area_entered"]
|