コード例 #1
0
 public override void SpawnSetup(Map map, bool respawningAfterLoad)
 {
     _energySource   = EnergySourceUtility.Find(this);
     _shield         = ShieldUtility.FindComp(this);
     _heatSink       = HeatsinkUtility.FindComp(this);
     _activeLastTick = IsActive;
     base.SpawnSetup(map, respawningAfterLoad);
 }
コード例 #2
0
 public void Init()
 {
     AllComps.OfType <IEnergyNode>().Do(Connect);
     _flickable = GetComp <CompFlickable>();
     _shield    = ShieldUtility.FindComp(AllComps);
     _shield.SetParent(this);
     _heatSink = HeatsinkUtility.FindComp(AllComps);
 }
コード例 #3
0
 public override void PostSpawnSetup(bool respawningAfterLoad)
 {
     base.PostSpawnSetup(respawningAfterLoad);
     _cellCount    = GenRadial.NumCellsInRadius(_fieldRadius);
     _positionLast = parent.Position;
     _radiusLast   = (int)Radius;
     _energySource = EnergySourceUtility.Find(parent);
     _heatSink     = HeatsinkUtility.Find(parent);
     _resistance   = parent.TryGetComp <Comp_ShieldResistance>();
     parent.Map.GetComponent <ShieldManager>().Add(this);
     LessonAutoActivator.TeachOpportunity(ConceptDef.Named("FD_Shields"), OpportunityType.Critical);
 }