Esempio n. 1
0
    public void ReceiveState(ReceiveStateData stateData)
    {
        switch ((PlayerState)stateData.state)
        {
        case PlayerState.Trap:
            if (stateData.trapData.trapLevel == (char)TrapLevel.Trap1)
            {
                animatorController.AcceptSpecialState(PlayerDirection.Down, PlayerState.Trap);
            }
            break;

        case PlayerState.Save:
            animatorController.AcceptSpecialState(PlayerDirection.Down, PlayerState.Save);
            break;

        case PlayerState.Death:
            animatorController.AcceptSpecialState(PlayerDirection.Down, PlayerState.Death);
            break;
        }
    }
Esempio n. 2
0
 //这个状态是玩家自身的explore判断的
 public void BeAttack()
 {
     Debug.Log("BeAttack");
     animatorController.AcceptSpecialState(PlayerDirection.Down, PlayerState.Trap);
     behaviorCollector.SendTrapState(TrapLevel.Trap1);
 }