revo-jailbreak/objects/enemy/tentacle.tscn
Hazel Snider a2974d8dd3 the damage system refactor!
killing is now done based on groups, the same way enemies already killed
the player.

these groups go on the entity's hitbox, not the entity itself.
enemies' hitboxes have all been put in "enemy_hitbox"

the arrow_projectile has a variable for the target group, so it could
easily be simply set to "player" for arrows shot by enemies

blocking is also done with groups. any hitbox with "blocks_arrow"
will block arrows, same with "blocks_sword" and "blocks_squash"
2023-01-20 00:06:34 -05:00

40 lines
1.1 KiB
Text

[gd_scene load_steps=7 format=2]
[ext_resource path="res://objects/enemy/enemy.gd" type="Script" id=1]
[ext_resource path="res://graphics/enemy/tentacle.png" type="Texture" id=2]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 8, 24 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 2 )
region = Rect2( 8, 0, 8, 24 )
[sub_resource type="SpriteFrames" id=3]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
"loop": true,
"name": "default",
"speed": 7.0
} ]
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 4, 12 )
[node name="Tentacle" type="Node2D" groups=["enemy"]]
script = ExtResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 4, 12 )
frames = SubResource( 3 )
frame = 1
playing = true
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2( 4, 12 )
shape = SubResource( 4 )
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]