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