Beispiel #1
0
 void Awake()
 {
     inner = GetComponentInChildren <BlackHoleInner>();
     inner.GetComponent <SphereCollider>().enabled = false;
     outer               = GetComponentInChildren <BlackHoleOuter>();
     explosion           = transform.Find("Explosion").GetComponent <ParticleSystem>();
     outerParticleSystem = transform.Find("OuterParticleSystem").GetComponent <ParticleSystem>();
     innerParticleSystem = transform.Find("InnerParticleSystem").GetComponent <ParticleSystem>();
 }
Beispiel #2
0
    // Use this for initialization
    IEnumerator Start()
    {
        Invoke("Explode", maxLifespan);
        if (GameManager.S.inGame)
        {
            SoundManager.instance.Play("BlackHole");
        }

        //Set particle colors
        if (GameManager.S.inGame)
        {
            SetColor(GameManager.S.players[(int)owningPlayer].playerColor);
        }


        yield return(new WaitForSeconds(armTime));

        inner.GetComponent <SphereCollider>().enabled = true;
    }