Example #1
0
 public static Mapa GetInstancia()
 {
     if (instancia == null)
     {
         instancia = GameObject.FindObjectOfType <Mapa>();
     }
     return(instancia);
 }
Example #2
0
 protected virtual void Start()
 {
     for (int i = 0; i < modulos.Count; i++)
     {
         modulos[i].Start();
     }
     mapa = Mapa.GetInstancia();
     eventovivir.Invoke();
 }
Example #3
0
        public override void Start()
        {
            base.Start();

            mapa     = Mapa.GetInstancia();
            gameplay = ManagerGameplay.GetInstanciaBase();


            SetPosicionX((int)posicion.x);
            SetPosicionY((int)posicion.y);
        }
Example #4
0
        void OnDrawGizmos()
        {
            if (!mostrarguias)
            {
                return;
            }

            if (mapa != null)
            {
                mapa = Mapa.GetInstancia();
            }
            if (mapa == null)
            {
                return;
            }

            Gizmos.color = color;
            Gizmos.DrawWireCube(GetPosicion(), mapa.GetTamaño());
        }
Example #5
0
        private void Start()
        {
            mapa = Mapa.GetInstancia();
            game = ManagerGameplay.GetInstanciaBase();

            if (entidadreferencia == null)
            {
                distancia = distanciamaxima;
            }
            else
            {
                distancia = Mathf.Abs(entidadreferencia.GetPosicion().z - GetPosicion().z);
            }

            for (int i = 0; i < generacion.Count; i++)
            {
                generacion[i].Start(game.GetDificultad());
            }
        }
Example #6
0
 private void Awake()
 {
     instancia = null;
     mapa      = GetComponent <BoxCollider>();
     posicion  = transform.position + offset;
 }
Example #7
0
 public abstract void Generacion(Mapa mapa, int x, int y);