示例#1
0
    // crea los iconos de los turnos y la cola
    public void CreaTurnos(Queue <int> ordenTurnos)
    {
        int num = 0;

        foreach (int x in ordenTurnos)
        {
            Turno aux = turnosArray[num];
            if (x < nJugadoresPorEquipo)
            {
                aux.SetProperties(x, aliados[x].GetFoto());
            }
            else
            {
                aux.SetProperties(x, enemigos[x - nJugadoresPorEquipo].GetFoto());
            }
            float relation = 1920.0f / (float)Screen.width;
            aux.transform.position += new Vector3(num * 120 / relation, 0, 0);
            if (num == 0)
            {
                aux.ActivarTexto();
            }
            num++;
            turnosJugadores.Enqueue(aux);
        }
        gestorAcciones.PreparaTurno();
    }