skeletons can be flipped!
This commit is contained in:
parent
a2eaf0f214
commit
fcfeabed8b
3 changed files with 41 additions and 63 deletions
|
@ -1,8 +1,7 @@
|
|||
[gd_scene load_steps=18 format=2]
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=1]
|
||||
[ext_resource path="res://graphics/enemy/skelarcher_shoot.png" type="Texture" id=2]
|
||||
[ext_resource path="res://graphics/enemy/skelarcher_idle.png" type="Texture" id=3]
|
||||
[ext_resource path="res://objects/enemy/skelarcher.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=18]
|
||||
|
@ -10,52 +9,6 @@ shader = ExtResource( 1 )
|
|||
shader_param/border_color = Color( 0, 0, 0, 1 )
|
||||
shader_param/border_corners = true
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
shader = ExtResource( 1 )
|
||||
shader_param/border_color = Color( 0, 0, 0, 1 )
|
||||
shader_param/border_corners = true
|
||||
|
||||
[sub_resource type="AtlasTexture" id=11]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 0, 0, 19, 20 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=12]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 19, 0, 19, 20 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=13]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 38, 0, 19, 20 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=14]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 57, 0, 19, 20 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=15]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 76, 0, 19, 20 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=16]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 95, 0, 19, 20 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=17]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 114, 0, 19, 20 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=9]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ) ],
|
||||
"loop": false,
|
||||
"name": "shoot",
|
||||
"speed": 15.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=10]
|
||||
extents = Vector2( 4, 4 )
|
||||
|
||||
|
@ -148,18 +101,13 @@ shoot_time = 3.0
|
|||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
material = SubResource( 18 )
|
||||
position = Vector2( 5, -2 )
|
||||
texture = ExtResource( 2 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 0, 0, 19, 20 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
visible = false
|
||||
material = SubResource( 1 )
|
||||
frames = SubResource( 9 )
|
||||
animation = "idle"
|
||||
playing = true
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
|
||||
position = Vector2( 5, -2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||
position = Vector2( -1, 6 )
|
||||
|
@ -171,5 +119,11 @@ shape = SubResource( 10 )
|
|||
anims/idle = SubResource( 19 )
|
||||
anims/shoot = SubResource( 20 )
|
||||
|
||||
[node name="ArrowSpawnR" type="Position2D" parent="."]
|
||||
position = Vector2( 9, 2 )
|
||||
|
||||
[node name="ArrowSpawnL" type="Position2D" parent="."]
|
||||
position = Vector2( -9, 2 )
|
||||
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue