Exemple #1
0
    IEnumerator BulletDeath()
    {
        yield return(new WaitForSeconds(bulletTime.destroyBulletTime));

        isHalo = true;
        GameObject newLight = Instantiate(LightPrefab, transform.position, Quaternion.identity);

        lightF        = newLight.GetComponent <LightFade>();
        lightF.bullet = this;
        lightF.setLightRange();
        Destroy(this.gameObject);
    }
Exemple #2
0
 public void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.tag == "Terrain")
     {
         isHalo = false;
         GameObject newLight = Instantiate(LightPrefab, transform.position, Quaternion.identity);
         lightF = newLight.GetComponent <LightFade>();
         lightF.GetComponent <Light>().flare = null;
         lightF.bullet = this;
         lightF.setLightRange();
         SED.StartScan(transform.position);
         Destroy(this.gameObject);
     }
 }