Example #1
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     client.mesa            = client.currentTask.Coordinates.GetComponent <Mesa>();
     client.agent.isStopped = false;
     client.world.genteEnCola--;
     client.CalculateNavPos(client.mesa.asiento.position);
 }
Example #2
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        going = (0.4 < Random.Range(0, 1));
        if (going)
        {
            currentPoint = 0;
            client.CalculateNavPos(client.world.calle[currentPoint].position);
        }
        else
        {
            currentPoint = client.world.calle.Count - 1;
            client.CalculateNavPos(client.world.calle[currentPoint].position);
        }

        currentTime = Random.Range(0, checkTime);
    }
Example #3
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     animator.SetBool("Sentado", false);
     client.agent.enabled   = true;
     client.agent.isStopped = false;
     client.CalculateNavPos(client.world.calle[4].transform.position);
     client.world.genteDentro--;
 }
Example #4
0
    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    //override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
    //
    //}

    void checkColaFirst()
    {
        bool check = false;

        while (actualPos < client.world.cola.Count && !check)
        {
            if (!client.world.cola[actualPos].ocupado)
            {
                check = true;
            }
            else
            {
                actualPos++;
            }
        }
        if (check)
        {
            client.CalculateNavPos(client.world.cola[actualPos].transform.position);
            cola         = client.world.cola[actualPos];
            cola.cliente = client;
            cola.ocupado = true;
        }
    }