hero-mark-2/objects/enemy/eel.tscn

115 lines
3.2 KiB
Text

[gd_scene load_steps=13 format=2]
[ext_resource path="res://objects/enemy/eel.gd" type="Script" id=1]
[ext_resource path="res://graphics/enemy/eel_head.png" type="Texture" id=2]
[ext_resource path="res://graphics/enemy/eel_body.png" type="Texture" id=3]
[ext_resource path="res://graphics/enemy/eel_tail.png" type="Texture" id=4]
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=6]
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 2, 2 )
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 4.5, 2 )
[sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 2, 2 )
[sub_resource type="AtlasTexture" id=10]
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 14, 12 )
[sub_resource type="AtlasTexture" id=11]
atlas = ExtResource( 2 )
region = Rect2( 14, 0, 14, 12 )
[sub_resource type="SpriteFrames" id=12]
animations = [ {
"frames": [ SubResource( 10 ), SubResource( 11 ) ],
"loop": true,
"name": "chomp",
"speed": 8.0
} ]
[sub_resource type="ShaderMaterial" id=6]
shader = ExtResource( 6 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = false
[node name="Eel" type="Path2D" groups=["enemy"]]
curve = null
script = ExtResource( 1 )
segments = 2
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
position = Vector2( 4, 0 )
z_index = 2
[node name="TailShape" type="CollisionShape2D" parent="Hitbox"]
position = Vector2( -4, 0 )
shape = SubResource( 8 )
[node name="HeadShape" type="CollisionShape2D" parent="Hitbox"]
position = Vector2( -1.5, 0 )
shape = SubResource( 7 )
[node name="SegmentShape" type="CollisionShape2D" parent="Hitbox"]
unique_name_in_owner = true
position = Vector2( -4, 0 )
shape = SubResource( 9 )
[node name="Head" type="PathFollow2D" parent="." groups=["eel_segment"]]
offset = 8.0
cubic_interp = false
lookahead = 0.001
[node name="Sprite" type="AnimatedSprite" parent="Head"]
position = Vector2( 4, 0 )
z_index = 1
frames = SubResource( 12 )
animation = "chomp"
playing = true
[node name="Border" type="AnimatedSprite" parent="Head/Sprite"]
material = SubResource( 6 )
frames = SubResource( 12 )
animation = "chomp"
playing = true
[node name="ShapeTransform" type="RemoteTransform2D" parent="Head"]
position = Vector2( 2.5, 0 )
remote_path = NodePath("../../Hitbox/HeadShape")
[node name="Tail" type="PathFollow2D" parent="."]
cubic_interp = false
lookahead = 0.001
[node name="Sprite" type="Sprite" parent="Tail"]
position = Vector2( -2, 0 )
z_index = 1
texture = ExtResource( 4 )
[node name="Border" type="Sprite" parent="Tail/Sprite"]
material = SubResource( 6 )
texture = ExtResource( 4 )
[node name="ShapeTransform" type="RemoteTransform2D" parent="Tail"]
remote_path = NodePath("../../Hitbox/TailShape")
[node name="Segment" type="PathFollow2D" parent="."]
offset = 4.0
cubic_interp = false
lookahead = 0.001
[node name="Sprite" type="Sprite" parent="Segment"]
z_index = 1
texture = ExtResource( 3 )
[node name="Border" type="Sprite" parent="Segment/Sprite"]
material = SubResource( 6 )
texture = ExtResource( 3 )
[node name="ShapeTransform" type="RemoteTransform2D" parent="Segment"]
remote_path = NodePath("../../Hitbox/SegmentShape")
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]