Example #1
0
    // aContinuar = animacion de abrir la pared y meter la vaus
    public void aContinuar()
    {
        pared scriptWall = GameObject.Find("wall").GetComponent <pared>();

        scriptWall.bJugar = true;
        animContinuar     = true;
    }
Example #2
0
    // aNuevoJuego = animacion de abrir la pared y meter la vaus
    public void aNuevoJuego()
    {
        pared scriptWall = GameObject.Find("wall").GetComponent <pared>();

        scriptWall.bJugar = true;
        animNuevoJuego    = true;
    }
Example #3
0
        protected override void OnLoad(EventArgs e)
        {
            GL.ClearColor(0.2f, 0.3f, 0.3f, 1.0f);


            GL.Enable(EnableCap.DepthTest);

            tech   = new techo();
            paredd = new pared();
            puert  = new puerta();

            base.OnLoad(e);
        }
Example #4
0
 void OnCollisionEnter(Collision col)
 { //si choca con algo de eso el bicho hace una explosion
     if (col.gameObject.name == "Vaus" ||
         col.gameObject.name == "balaEnergia(Clone)" ||
         col.gameObject.name == "pelota"
         )
     {
         pared.esteObjeto.asignarTiempoParaCrearBicho();
         pared scriptPared = GameObject.Find("wall").GetComponent <pared>();
         scriptPared.cntBichos--;
         Instantiate(explosion, transform.position, transform.rotation);
         Destroy(gameObject);
     }
 }
Example #5
0
 // entrada = el bicho cae por gravedad desde la pared
 public void entrada()
 {
     if (transform.position.y < 10.88f && rb.useGravity == true)
     {
         rb.useGravity  = false;
         rb.isKinematic = true;
         rb.isKinematic = false;
         sc.enabled     = true;
     }
     if (transform.position.y < -2.8f)
     {
         pared scriptPared = GameObject.Find("wall").GetComponent <pared>();
         scriptPared.cntBichos--;
         Destroy(gameObject);
     }
 }
Example #6
0
 void Start()
 {
     if (esteObjeto == null)
     {
         esteObjeto = this;
     }
     else if (esteObjeto != this)
     {
         Destroy(gameObject);
     }
     bichoCono1 = Resources.Load("bicho1") as GameObject;
     paredFalsa = false;
     if (PlayerPrefs.GetInt("enemigosInGame") == 0)
     {
         paredFalsa = true;
     }
     tiempoDeCreacionBicho = segundosAesperar;
 }