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; } }
// 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; } }