mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
16 lines
396 B
C#
16 lines
396 B
C#
|
|
using Cirno.Scripts.Enums;
|
|||
|
|
using Godot;
|
|||
|
|
|
|||
|
|
namespace Cirno.Scripts.Components;
|
|||
|
|
|
|||
|
|
public partial class SpriteAnimationStartupRotator : AnimatedSprite2D
|
|||
|
|
{
|
|||
|
|
public override void _Ready()
|
|||
|
|
{
|
|||
|
|
var parent = GetParent<IIRotateable>();
|
|||
|
|
|
|||
|
|
var sprite = GetParent().GetNode<AnimatedSprite2D>("AnimatedSprite2D");
|
|||
|
|
|
|||
|
|
sprite.Play(parent.Direction.ToString());
|
|||
|
|
}
|
|||
|
|
}
|