コード例 #1
0
ファイル: Shadow.cs プロジェクト: ema-barr/TimelessInvasion
    // Start is called before the first frame update
    void Start()
    {
        anim = GetComponent <Animator>();

        stateMachine = new StateMachine <Shadow>(this);
        stateMachine.currentState = Shadow_IdleState.Instance();
    }
コード例 #2
0
    public static Shadow_IdleState Instance()
    {
        if (_instance == null)
        {
            _instance = new Shadow_IdleState();
        }

        return(_instance);
    }
コード例 #3
0
ファイル: Shadow.cs プロジェクト: ema-barr/TimelessInvasion
 public void SwitchAttackOff()
 {
     anim.SetBool("isAttacking", false);
     stateMachine.ChangeState(Shadow_IdleState.Instance());
 }