public override void Tick()
{
if (CheckIfSupportingWallIsAlive(this.Position, this.Rotation) == false)
{
this.Destroy(DestroyMode.Deconstruct);
}
base.Tick();
int tickCounter = Find.TickManager.TicksGame;
if (lastUpdateTick != tickCounter)
{
// The following treatment is performed only once per tick (static treatment).
lastUpdateTick = tickCounter;
if ((tickCounter % (2 * GenTicks.TicksPerRealSecond)) == 0)
{
DisplayActiveMote();
}
if ((tickCounter % GenTicks.TicksPerRealSecond) == 0)
{
previousDangerRate = currentDangerRate;
currentDangerRate = Find.StoryWatcher.watcherDanger.DangerRating;
PerformTreatmentOnDangerRateTransition();
}
PerformSoundTreatment();
ComputeDrawingParameters();
}
// Update for each speaker.
if ((tickCounter % GenTicks.TicksPerRealSecond) == 0)
{
if (powerComp.PowerOn)
{
PerformTreatmentDuringAlert();
}
}
PerformDrawingTreatment();
}