Пример #1
0
 private void OnTriggerEnter2D(Collider2D col)
 {
     if (col.gameObject.CompareTag("PowerUp"))
     {
         EspecialAtual = SpecialFire.Especial_2;
         Destroy(col.gameObject);
         zeroControl.SetAudioPickUp();
     }
 }
Пример #2
0
 void Awake()
 {
     zeroControl = GetComponent <ZeroControl>();
     //tiro = Resources.Load<GameObject>("Zero/Projeteis/TiroPadraoProjetil");
     tiro                  = carregaGameObject("Zero/Projeteis/TiroPadraoProjetil");
     tiroEspecial_1        = carregaGameObject("Zero/Projeteis/TiroEspecial1");
     tiroEspecial_2        = carregaGameObject("Zero/Projeteis/TiroEspecial2");
     saidaDoProjetilNoChao = GameObject.Find("saida1").GetComponent <Transform>();
     saidaDoProjetilNoAr   = GameObject.Find("saida2").GetComponent <Transform>();
     contadorTiro          = 0;
     valorDoTiro           = 0;
     EspecialAtual         = SpecialFire.Especial_1;
 }
Пример #3
0
 void ContagemDotiroEspecial()
 {
     if (EspecialAtual == SpecialFire.Especial_2)
     {
         valorDoTiro += Time.deltaTime;
         //print(valorDoTiro);
         if (valorDoTiro >= 10)
         {
             valorDoTiro   = 0;
             EspecialAtual = SpecialFire.Especial_1;
         }
     }
 }