示例#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>();
 }
示例#2
0
        private Transform[] FindAllBlackHoles(Collider[] allObjects)
        {
            List <Transform> bHoles = new List <Transform>();

            for (int i = 0; i < allObjects.Length; i++)
            {
                BlackHoleInner blackHole = allObjects[i].GetComponent <BlackHoleInner>();
                if (blackHole != null && blackHole.blackHole.owningPlayer != ai.thisShip.playerEnum)
                {
                    bHoles.Add(blackHole.transform);
                }
            }

            return(bHoles.ToArray());
        }