コード例 #1
0
ファイル: StateMachine.cs プロジェクト: Dori12/Zombie-Defence
 public void Excute(CharacterMove t)
 {
     if (t.isStandingEnd)
     {
         t.stateMachine.ChangeState(StandState.GetInstance());
     }
 }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        animator   = GetComponent <Animator>();
        tr         = GetComponent <Transform>();
        controller = GetComponent <CharacterController>();

        isCrouch = false;

        speed        = 0.0f;
        stackGravity = 0.0f;

        MoveDir = Vector3.zero;


        stateMachine = new StateMachine <CharacterMove>(this);
        stateMachine.SetCurrentState(StandState.GetInstance());
        stateMachine.SetGlobalState(CharacterGlobalState.GetInstance());
    }