コード例 #1
0
        public void UpdatePowerConsumption()
        {
            TerrainComp_PowerTrader powerComp = parent.GetComp <TerrainComp_PowerTrader>();

            if (powerComp != null)
            {
                powerComp.PowerOutput = -PowerConsumptionNow;
            }
        }
コード例 #2
0
        // 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;
            }
        }
コード例 #3
0
        // 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);
        }
コード例 #4
0
 // Token: 0x06000078 RID: 120 RVA: 0x000039CF File Offset: 0x00001BCF
 public virtual void Notify_TerrainCompRemoved(TerrainComp_PowerTrader comp)
 {
     acceptedComps.Remove(comp);
     UpdatePowerOutput();
 }
コード例 #5
0
 // Token: 0x06000077 RID: 119 RVA: 0x000039B8 File Offset: 0x00001BB8
 public virtual void ReceiveTerrainComp(TerrainComp_PowerTrader comp)
 {
     acceptedComps.Add(comp);
     UpdatePowerOutput();
 }