private void UpdateUI()
    {
        switch (bt.GetRobotState())
        {
        case RobotBlackboard.RobotStates.Idle:
            spriteAnimator.SetTrigger(idleTrigger);

            StartTimer();

            break;

        case RobotBlackboard.RobotStates.Patrol:
            spriteAnimator.SetTrigger(patrolTrigger);

            StopTimer();

            break;

        case RobotBlackboard.RobotStates.Chase:
            spriteAnimator.SetTrigger(chaseTrigger);

            StopTimer();

            break;

        case RobotBlackboard.RobotStates.Attack:
            spriteAnimator.SetTrigger(attackTrigger);

            StopTimer();

            break;

        case RobotBlackboard.RobotStates.Kick:
            spriteAnimator.SetTrigger(kickTrigger);

            StopTimer();

            break;
        }

        nodeText.text = bt.GetRobotState().ToString();

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

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

        reachedPatrolPointToggle.SetIsOnWithoutNotify(bt.GetPatrolReachedPoint());

        canSeePlayerToggle.SetIsOnWithoutNotify(bt.GetPlayerVisibility());
        playerIsDeadToggle.SetIsOnWithoutNotify(bt.GetPlayerStatus());
    }
Exemplo n.º 2
0
    public override bool IsMet(BlackboardBase bb)
    {
        RobotBlackboard robotBB = bb as RobotBlackboard;

        return(!robotBB.GetPlayerVisibility() || robotBB.GetPlayerStatus());
    }