Пример #1
0
 void checkCola()
 {
     if (actualPos != 0)
     {
         if (!client.world.cola[actualPos - 1].ocupado)
         {
             client.CalculateNavPos(client.world.cola[actualPos - 1].transform.position);
             cola.ocupado = false;
             cola         = client.world.cola[actualPos - 1];
             cola.cliente = client;
             cola.ocupado = true;
             actualPos--;
         }
     }
     else
     {
         client.esperando = true;
     }
 }
Пример #2
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;
        }
    }