Esempio n. 1
0
        public void UpdatePowerConsumption()
        {
            TerrainComp_PowerTrader powerComp = parent.GetComp <TerrainComp_PowerTrader>();

            if (powerComp != null)
            {
                powerComp.PowerOutput = -PowerConsumptionNow;
            }
        }
        // Token: 0x06000054 RID: 84 RVA: 0x000033AC File Offset: 0x000015AC
        public void UpdatePowerConsumption()
        {
            TerrainComp_PowerTrader comp = this.parent.GetComp <TerrainComp_PowerTrader>();
            bool flag = comp != null;

            if (flag)
            {
                comp.PowerOutput = -this.PowerConsumptionNow;
            }
        }
        // Token: 0x06000008 RID: 8 RVA: 0x000021D4 File Offset: 0x000003D4
        public static bool Powered(this TerrainInstance t)
        {
            TerrainComp_PowerTrader comp = t.GetComp <TerrainComp_PowerTrader>();

            return(comp == null || comp.PowerOn);
        }
Esempio n. 4
0
 // Token: 0x06000078 RID: 120 RVA: 0x000039CF File Offset: 0x00001BCF
 public virtual void Notify_TerrainCompRemoved(TerrainComp_PowerTrader comp)
 {
     acceptedComps.Remove(comp);
     UpdatePowerOutput();
 }
Esempio n. 5
0
 // Token: 0x06000077 RID: 119 RVA: 0x000039B8 File Offset: 0x00001BB8
 public virtual void ReceiveTerrainComp(TerrainComp_PowerTrader comp)
 {
     acceptedComps.Add(comp);
     UpdatePowerOutput();
 }