public static AdministradorAzulejos Instanciar() { if (instancia == null) { instancia = new AdministradorAzulejos(); } return(instancia); }
public void AgregarAzulejo(int idAzulejo, Vector3Int posicion) { AdministradorAzulejos.Instanciar().ObtenerAzulejo(ClaseAzulejo.Arbol, idAzulejo); if (PosicionValida(posicion)) { Azulejo azulejo = new Azulejo(); mapaArboles.AgregarAzulejo(azulejo, posicion); } }
public CapaNativo(MapaNativo <T> mapa, CuadranteNativo <T> cuadrante, int capa, bool generaGameObject) { this.mapa = mapa; this.cuadrante = cuadrante; this.capa = capa; adminAzulejos = AdministradorAzulejos.Instanciar(); contenedorAzulejos = new NativeHashMap <int, T>(mapa.cuadranteTam * mapa.cuadranteTam, Allocator.Persistent); /*-----------*/ if (gameObject) { gameObject = new GameObject("Capa:" + capa); gameObject.transform.parent = cuadrante.gameObject.transform; gameObject.transform.localPosition = new Vector3(0, capa - 1, 0); } }
public Capa(Mapa <T> mapa, Cuadrante <T> cuadrante, int capa, bool generaGameObject) { this.mapa = mapa; this.cuadrante = cuadrante; this.capa = capa; adminAzulejos = AdministradorAzulejos.Instanciar(); contenedorAzulejos = new Dictionary <int, T>(); /*-----------*/ if (gameObject) { gameObject = new GameObject("Capa:" + capa); gameObject.transform.parent = cuadrante.gameObject.transform; gameObject.transform.localPosition = new Vector3(0, capa - 1, 0); } }