예제 #1
0
 public override void PostSpawnSetup(bool respawningAfterLoad)
 {
     base.PostSpawnSetup(respawningAfterLoad);
     compPower  = parent.GetComp <CompPowerTrader>();
     compFlick  = parent.GetComp <CompFlickable>();
     compRefuel = parent.GetComp <CompRefuelable>();
     glowPos    = parent.Position + parent.Rotation.FacingCell;
     if (glower == null)
     {
         SpawnGlower();
     }
     else
     {
         if (glowerObject == null)
         {
             glowerObject = (GlowObject)glower;
         }
     }
     if ((compPower != null && !compPower.PowerOn) || (compRefuel != null && !compRefuel.HasFuel))
     {
         glowerObject.ToggleGlower(false);
     }
 }
예제 #2
0
 public override void SpawnSetup(Map map, bool respawningAfterLoad)
 {
     base.SpawnSetup(map, respawningAfterLoad);
     compPower  = GetComp <CompPowerTrader>();
     compFlick  = GetComp <CompFlickable>();
     compRefuel = GetComp <CompRefuelable>();
     glowPos    = Position + Rotation.FacingCell;
     ColorSetup();
     if (glower == null)
     {
         SpawnGlower();
     }
     else
     {
         if (glowerObject == null)
         {
             glowerObject = (GlowObject)glower;
         }
     }
     if ((compPower != null && !compPower.PowerOn) || (compRefuel != null && !compRefuel.HasFuel))
     {
         glowerObject.ToggleGlower(false);
     }
 }