Esempio n. 1
0
    private void Generation(Case prefabCase, HubFin prefabHubfin) //Génère toute les case du labyrinthe
    {
        for (int iz = 0; iz < zt; iz++)
        {
            for (int ix = 0; ix < xt; ix++)
            {
                NouvelleCase(ix, iz, prefabCase); //création des case
            }
        }

        HubFin hub = Instantiate(prefabHubfin);  //Instancie le prefab Case

        Debug.Log("Création du hub de fin");
        hub.transform.localPosition = new Vector3((xt * 2) + 5.1f, -0.05f, (zt * 2) - 1f); //postion du Hub de fin
        Sauvegarde();
    }
Esempio n. 2
0
 public Labyrinthe(int xPosDebut, int zPosDebut, int xTaille, int zTaille, string nomDuFichier, Case prefabCase, HubFin prefabHubFin)
 {
     xt          = xTaille;
     zt          = zTaille;
     xD          = xPosDebut;
     zD          = zPosDebut;
     fichierLaby = nomDuFichier;
     if (fichierLaby == "")
     {
         GenerationTableau();
     }
     else
     {
         ChargerLabyrinthe(nomDuFichier);
     }
     Generation(prefabCase, prefabHubFin);
 }
Esempio n. 3
0
    public Labyrinthe(int xPosDebut, int zPosDebut, int xTaille, int zTaille, Case prefabCase, HubFin prefabHubFin)
    {
        xt = xTaille;
        zt = zTaille;
        xD = xPosDebut;
        zD = zPosDebut;

        GenerationTableau();
        Generation(prefabCase, prefabHubFin);
    }