add mine that explodes on contact with player, shot by arrow, or other mine's explosions
This commit is contained in:
parent
c577f0a57c
commit
8a47c20d94
12 changed files with 338 additions and 7 deletions
55
objects/enemy/explosion.tscn
Normal file
55
objects/enemy/explosion.tscn
Normal file
|
@ -0,0 +1,55 @@
|
|||
[gd_scene load_steps=11 format=2]
|
||||
|
||||
[ext_resource path="res://objects/enemy/explosion.gd" type="Script" id=1]
|
||||
[ext_resource path="res://graphics/enemy/explosion.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 0, 0, 64, 64 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 64, 0, 64, 64 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 128, 0, 64, 64 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 192, 0, 64, 64 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 256, 0, 64, 64 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 320, 0, 64, 64 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=7]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
|
||||
"loop": false,
|
||||
"name": "explode",
|
||||
"speed": 10.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=8]
|
||||
extents = Vector2( 24, 24 )
|
||||
|
||||
[node name="Explosion" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
blood = false
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 7 )
|
||||
animation = "explode"
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox", "explosion"]]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||
shape = SubResource( 8 )
|
||||
|
||||
[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_animation_finished"]
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
Loading…
Add table
Add a link
Reference in a new issue