Beispiel #1
0
    public override void OnEnter()
    {
        var go = Fsm.GetOwnerDefaultTarget(gameObject);


        if (go == null)
        {
            Finish();
            return;
        }

        animPlayer = go.GetComponent <SpriteAnimationPlayer>();

        if (animPlayer)
        {
            _previousValue = animPlayer.direction.source;
            animPlayer.SetMovementSourceType(sourceType);
        }
        Finish();
    }
Beispiel #2
0
 public void SetMovementSourceType(DirectionSourceType sourceType)
 {
     direction.source = sourceType;
 }