eels reborn

This commit is contained in:
Haze Weathers 2023-06-22 18:01:24 -04:00
parent 7e460cc4e1
commit 04dec83275
6 changed files with 104 additions and 92 deletions

View file

@ -1,90 +1,95 @@
[gd_scene load_steps=9 format=2]
[gd_scene load_steps=10 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://graphics/enemy/eel_inner_border.png" type="Texture" id=5]
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=6]
[sub_resource type="Curve2D" id=4]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, -24, 0, 0, 0, 0, -8, -48, 0, 0, 0, 0, 24, -72, 0, 0, 0, 0, -8, -96, 0, 0, 0, 0, -8, -96, 0, 0, 0, 0, 24, -72, 0, 0, 0, 0, -8, -48, 0, 0, 0, 0, 24, -24, 0, 0, 0, 0, 0, 0 )
}
[sub_resource type="RectangleShape2D" id=3]
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 2, 2 )
[sub_resource type="RectangleShape2D" id=2]
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 4.5, 2 )
[sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 2, 2 )
[node name="Eel" type="Node2D" groups=["enemy"]]
[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
wave_amplitude = 6.0
[node name="Path2D" type="Path2D" parent="."]
curve = SubResource( 4 )
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
position = Vector2( 4, 0 )
z_index = 1
[node name="PathFollow2D" type="PathFollow2D" parent="Path2D"]
position = Vector2( 8, 0 )
[node name="Hitbox" type="Area2D" parent="Path2D/PathFollow2D" groups=["enemy_hitbox"]]
position = Vector2( 7.99424, 0.405511 )
rotation = 3.14159
scale = Vector2( 1, -1 )
[node name="SegmentStart" type="Position2D" parent="Path2D/PathFollow2D/Hitbox"]
unique_name_in_owner = true
position = Vector2( 12, 0 )
__meta__ = {
"_gizmo_extents_": 5.0
}
[node name="HeadShape" type="CollisionPolygon2D" parent="Path2D/PathFollow2D/Hitbox"]
position = Vector2( 8, 0 )
polygon = PoolVector2Array( -7, -2, 2, -2, 2, 2, -7, 2 )
[node name="HeadSprite" type="Sprite" parent="Path2D/PathFollow2D/Hitbox/HeadShape"]
show_behind_parent = true
[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="Sprite" parent="Head"]
position = Vector2( 4, 0 )
texture = ExtResource( 2 )
[node name="InnerBorder" type="Sprite" parent="Path2D/PathFollow2D/Hitbox/HeadShape"]
position = Vector2( 3, 0 )
[node name="Border" type="Sprite" parent="Head/Sprite"]
material = SubResource( 6 )
z_index = -1
texture = ExtResource( 5 )
texture = ExtResource( 2 )
[node name="TailShape" type="CollisionShape2D" parent="Path2D/PathFollow2D/Hitbox"]
position = Vector2( 16, 0 )
shape = SubResource( 3 )
[node name="ShapeTransform" type="RemoteTransform2D" parent="Head"]
position = Vector2( 2.5, 0 )
remote_path = NodePath("../../Hitbox/HeadShape")
[node name="TailSprite" type="Sprite" parent="Path2D/PathFollow2D/Hitbox/TailShape"]
show_behind_parent = true
position = Vector2( 2, 0 )
[node name="Tail" type="PathFollow2D" parent="."]
cubic_interp = false
lookahead = 0.001
[node name="Sprite" type="Sprite" parent="Tail"]
position = Vector2( -2, 0 )
texture = ExtResource( 4 )
[node name="InnerBorder" type="Sprite" parent="Path2D/PathFollow2D/Hitbox/TailShape"]
position = Vector2( -2, 0 )
[node name="Border" type="Sprite" parent="Tail/Sprite"]
material = SubResource( 6 )
z_index = -1
texture = ExtResource( 5 )
texture = ExtResource( 4 )
[node name="Segment" type="CollisionShape2D" parent="Path2D/PathFollow2D/Hitbox"]
unique_name_in_owner = true
position = Vector2( 12, 0 )
shape = SubResource( 2 )
[node name="ShapeTransform" type="RemoteTransform2D" parent="Tail"]
remote_path = NodePath("../../Hitbox/TailShape")
[node name="SegmentSprite" type="Sprite" parent="Path2D/PathFollow2D/Hitbox/Segment"]
show_behind_parent = true
[node name="Segment" type="PathFollow2D" parent="."]
offset = 4.0
cubic_interp = false
lookahead = 0.001
[node name="Sprite" type="Sprite" parent="Segment"]
texture = ExtResource( 3 )
[node name="InnerBorder" type="Sprite" parent="Path2D/PathFollow2D/Hitbox/Segment"]
position = Vector2( -2, 0 )
[node name="Border" type="Sprite" parent="Segment/Sprite"]
material = SubResource( 6 )
z_index = -1
texture = ExtResource( 5 )
texture = ExtResource( 3 )
[node name="InnerBorder2" type="Sprite" parent="Path2D/PathFollow2D/Hitbox/Segment"]
position = Vector2( 3, 0 )
z_index = -1
texture = ExtResource( 5 )
[node name="ShapeTransform" type="RemoteTransform2D" parent="Segment"]
remote_path = NodePath("../../Hitbox/SegmentShape")
[connection signal="area_entered" from="Path2D/PathFollow2D/Hitbox" to="." method="_on_Hitbox_area_entered"]
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]