Some sprite fixes
This commit is contained in:
@@ -53,6 +53,7 @@ func _ready() -> void:
|
|||||||
for sprite : AnimatedSprite2D in [ attack_left_sprite, attack_right_sprite ]:
|
for sprite : AnimatedSprite2D in [ attack_left_sprite, attack_right_sprite ]:
|
||||||
var lambda := func() -> void:
|
var lambda := func() -> void:
|
||||||
sprite.hide()
|
sprite.hide()
|
||||||
|
if not is_zero_approx(velocity.x):
|
||||||
blade_sprite.show()
|
blade_sprite.show()
|
||||||
sprite.animation_finished.connect(lambda)
|
sprite.animation_finished.connect(lambda)
|
||||||
sprite.hide()
|
sprite.hide()
|
||||||
|
|||||||
@@ -114,16 +114,16 @@ region = Rect2(160, 96, 32, 32)
|
|||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_bhunq"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_bhunq"]
|
||||||
animations = [{
|
animations = [{
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 10.0,
|
"duration": 30.0,
|
||||||
"texture": SubResource("AtlasTexture_cjfdk")
|
"texture": SubResource("AtlasTexture_cjfdk")
|
||||||
}, {
|
}, {
|
||||||
"duration": 3.0,
|
"duration": 10.0,
|
||||||
"texture": SubResource("AtlasTexture_p5qu6")
|
"texture": SubResource("AtlasTexture_p5qu6")
|
||||||
}, {
|
}, {
|
||||||
"duration": 10.0,
|
"duration": 30.0,
|
||||||
"texture": SubResource("AtlasTexture_cjfdk")
|
"texture": SubResource("AtlasTexture_cjfdk")
|
||||||
}, {
|
}, {
|
||||||
"duration": 3.0,
|
"duration": 10.0,
|
||||||
"texture": SubResource("AtlasTexture_heu0c")
|
"texture": SubResource("AtlasTexture_heu0c")
|
||||||
}],
|
}],
|
||||||
"loop": 1,
|
"loop": 1,
|
||||||
@@ -508,7 +508,7 @@ shape = SubResource("CapsuleShape2D_bhunq")
|
|||||||
|
|
||||||
[node name="PlayerSprite" type="AnimatedSprite2D" parent="." unique_id=2025942250]
|
[node name="PlayerSprite" type="AnimatedSprite2D" parent="." unique_id=2025942250]
|
||||||
sprite_frames = SubResource("SpriteFrames_bhunq")
|
sprite_frames = SubResource("SpriteFrames_bhunq")
|
||||||
animation = &"jump_right"
|
animation = &"idle"
|
||||||
|
|
||||||
[node name="BladeSprite" type="AnimatedSprite2D" parent="." unique_id=1561250707]
|
[node name="BladeSprite" type="AnimatedSprite2D" parent="." unique_id=1561250707]
|
||||||
position = Vector2(0, 8)
|
position = Vector2(0, 8)
|
||||||
|
|||||||
Reference in New Issue
Block a user