public void PrintForAirGrid(SectionLayer layer)
 {
     foreach (var current in AllComps.Where(s => s is CompAir).Cast <CompAir>())
     {
         current.CompPrintForAirGrid(layer);
     }
 }
Esempio n. 2
0
 public void Init()
 {
     AllComps.OfType <IEnergyNode>().Do(Connect);
     _flickable = GetComp <CompFlickable>();
     _shield    = ShieldUtility.FindComp(AllComps);
     _shield.SetParent(this);
     _heatSink = HeatsinkUtility.FindComp(AllComps);
 }
Esempio n. 3
0
 /// <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);
     }
 }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        public void Detonate()
        {
            BlownUp = true;

            LightingDestroyEffect_ClimateBombComp comp = new LightingDestroyEffect_ClimateBombComp
            {
                parent = this
            };

            AllComps.Add(comp);
            comp.Initialize(null);
        }
Esempio n. 6
0
 public SettingScreen() : base(ScreenContent.settings)
 {
     soundEffect = ContentLoader.Instance.LoadSound("shoot");
     menu        = (Menu)AllComps.First(t => t is Menu);
 }