public void Init() { AllComps.OfType <IEnergyNode>().Do(Connect); _flickable = GetComp <CompFlickable>(); _shield = ShieldUtility.FindComp(AllComps); _shield.SetParent(this); _heatSink = HeatsinkUtility.FindComp(AllComps); }
/// <summary>Strikes this instance with the specified energy</summary> /// <param name="energy">The energy.</param> public void Strike(int energy) { OnStrike(energy); foreach (var receiverComp in AllComps.OfType <ILightningReceiverComp>()) { receiverComp.Strike(energy); } }