Example #1
0
    public override NodeState Evaluate()
    {
        ai.isAClient = true;
        //spawnM = SpawnManager.Instance;
        bool rdmBool = ai.GetRandomBool();

        if (clientOnly || rdmBool)
        {
            nbClient.Value += 1;
            agentSpeed      = 4f;
            ai.SetAgentSpeed(agentSpeed);
            return(NodeState.SUCCCESS);
        }
        else
        {
            return(NodeState.FAILURE);
        }
    }
    public override NodeState Evaluate()
    {
        ai.isAClient = false;
        //spawnM = SpawnManager.Instance;
        bool rdmBool = ai.GetRandomBool();

        if (thiefOnly || !rdmBool)
        {
            nbThief.Value += 1;
            agentSpeed     = 5f;
            ai.SetAgentSpeed(agentSpeed);
            //Debug.Log(agentSpeed);
            ai.SetColor(Color.red);
            return(NodeState.SUCCCESS);
        }
        else
        {
            return(NodeState.FAILURE);
        }
    }