Ejemplo n.º 1
0
    protected override void OnUpdate()
    {
        switch (State)
        {
        case AnimationState.Moving:
            renderer.sprite = move.Direction(direction).GetSprite(renderer.sprite);
            break;

        case AnimationState.Attacking:
            renderer.sprite = attack.Direction(direction);
            break;

        default:
            break;
        }
    }