Exemplo n.º 1
0
        private void OnPartBleed(Transform who)
        {
            AIFunc w = who.GetComponent <AIFunc>();

            if (w != null)
            {
                w.HalfPower();
            }
        }
Exemplo n.º 2
0
 public void Eject(Transform child, bool death = false)             // On death eject all modules. Destroy this gameObject
 {
     foreach (Transform c in GetComponentsInChildren <Transform>()) //Maybe useless check?!
     {
         if (child == c | death)
         {
             AIFunc cai = c.GetComponent <AIFunc>();
             if (cai != null)
             {
                 cai.Eject(); AIF.Remove(cai);
             }
             Ejection(c);
             if (!death)
             {
                 break;
             }
         }
     }
     if (death)
     {
         this.death = death; H.DropAll();
     }
 }