public void PrintForAirGrid(SectionLayer layer) { foreach (var current in AllComps.Where(s => s is CompAir).Cast <CompAir>()) { current.CompPrintForAirGrid(layer); } }
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); } }
public MainScreen() : base(ScreenContent.main) { Random rnd = new Random(); int index = rnd.Next(1, 3); Arts[0].ChangeAnimation("key" + index); menu = (Menu)AllComps.First(t => t is Menu); }
public void Detonate() { BlownUp = true; LightingDestroyEffect_ClimateBombComp comp = new LightingDestroyEffect_ClimateBombComp { parent = this }; AllComps.Add(comp); comp.Initialize(null); }
public SettingScreen() : base(ScreenContent.settings) { soundEffect = ContentLoader.Instance.LoadSound("shoot"); menu = (Menu)AllComps.First(t => t is Menu); }