示例#1
0
 // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     if (animatorFSM.GetPatrolReachedPoint())
     {
         animatorFSM.SetPatrolReachedPoint(false);
         animator.SetTrigger(animator_IdleTrigger);
     }
 }
示例#2
0
    private void UpdateUI()
    {
        if (fsm.GetRobotState() == AnimatorFSM.RobotStates.Idle)
        {
            StartTimer();
        }
        else
        {
            StopTimer();
        }

        stateText.text = fsm.GetRobotState().ToString();

        distanceDropdown.SetValueWithoutNotify((int)fsm.GetRobotToPlayerDistance());

        idlePauseTimeInputField.text = fsm.GetIdlePauseTime().ToString();

        reachedPatrolPointToggle.SetIsOnWithoutNotify(fsm.GetPatrolReachedPoint());

        canSeePlayerToggle.SetIsOnWithoutNotify(fsm.GetPlayerVisibility());
        playerIsDeadToggle.SetIsOnWithoutNotify(fsm.GetPlayerStatus());
    }