Exemple #1
0
 public override void CompTick()
 {
     if (ReactivatedThisTick && Props.reactivateEffect != null)
     {
         Effecter effecter = new Effecter(Props.reactivateEffect);
         effecter.Trigger(parent, TargetInfo.Invalid);
         effecter.Cleanup();
     }
     if (Find.TickManager.TicksGame >= nextChargeTick + Props.chargeDurationTicks)
     {
         nextChargeTick += Props.chargeIntervalTicks;
     }
     stunner.StunHandlerTick();
     if (Props.activeSound.NullOrUndefined())
     {
         return;
     }
     if (Active)
     {
         if (sustainer == null || sustainer.Ended)
         {
             sustainer = Props.activeSound.TrySpawnSustainer(SoundInfo.InMap(parent));
         }
         sustainer.Maintain();
     }
     else if (sustainer != null && !sustainer.Ended)
     {
         sustainer.End();
     }
 }
 public override void Tick()
 {
     base.Tick();
     if (forcedTarget.HasThing && (!forcedTarget.Thing.Spawned || !base.Spawned || forcedTarget.Thing.Map != base.Map))
     {
         forcedTarget = LocalTargetInfo.Invalid;
     }
     stunner.StunHandlerTick();
 }
Exemple #3
0
 public override void CompTick()
 {
     if (ReactivatedThisTick && Props.reactivateEffect != null)
     {
         Effecter effecter = new Effecter(Props.reactivateEffect);
         effecter.Trigger(parent, TargetInfo.Invalid);
         effecter.Cleanup();
     }
     if (Find.TickManager.TicksGame >= nextChargeTick + Props.chargeDurationTicks)
     {
         nextChargeTick += Props.chargeIntervalTicks;
     }
     stunner.StunHandlerTick();
 }