示例#1
0
        public void SetPosicionX(int x)
        {
            if (mapa == null)
            {
                return;
            }
            int n = (int)mapa.GetSecciones().x;

            posicion.x = Mathf.Clamp(x, 0, n - 1);
            ActualizarPosicion();
        }
示例#2
0
 public void Generar(Entidad entidad, Entidad entidadpadre = null)
 {
     if (entidad == null)
     {
         return;
     }
     entidadreferencia = entidad.Create(carpeta, GetPosicion(), entidadpadre);
     entidadreferencia.Generacion(mapa,
                                  Random.Range(0, (int)mapa.GetSecciones().x),
                                  Random.Range(0, (int)mapa.GetSecciones().y));
     distancia = Random.Range(distanciaminima, distanciamaxima);
 }