Exemplo n.º 1
0
 public void WaveClear()
 {
     BGMSource.clip = BGMs[0];
     BGMSource.Play();
     for (int i = 0; i < this.SpawnObject.transform.childCount; i++)
     {
         Destroy(this.SpawnObject.transform.GetChild(i).gameObject);
     }
     for (int i = 0; i < this.ShotedObjects.transform.childCount; i++)
     {
         Destroy(this.ShotedObjects.transform.GetChild(i).gameObject);
     }
     ScoreCalculation();
     if (RemainLife == 0)
     {
         SESource.PlayOneShot(GameOverSound);
         ResultUI.SetActive(true);
     }
     else
     {
         SESource.PlayOneShot(ClearSound);
         ResultUI.SetActive(true);
     }
     WaveUI.SetActive(false);
     RightPointer.enabled = true;
     LeftPointer.enabled  = true;
     Rightgun.ShotPos.GetChild(0).gameObject.SetActive(true);
     LeftGun.ShotPos.GetChild(0).gameObject.SetActive(true);
 }
Exemplo n.º 2
0
 new void Awake()
 {
     base.Awake();
     for (int i = 0; i < maxSounds; i++)
     {
         sources[i] = new SESource(Instantiate(SourceTemplate, transform));
     }
 }