void ITick.Tick(Actor self) { // Harvester was killed while unloading if (dockedHarv != null && dockedHarv.IsDead) { wsb.CancelCustomAnimation(self); dockedHarv = null; } if (info.ShowTicks && currentDisplayValue > 0 && --currentDisplayTick <= 0) { var temp = currentDisplayValue; if (self.Owner.IsAlliedWith(self.World.RenderPlayer)) { self.World.AddFrameEndTask(w => w.Add(new FloatingText(self.CenterPosition, self.Owner.Color.RGB, FloatingText.FormatCashTick(temp), 30))); } currentDisplayTick = info.TickRate; currentDisplayValue = 0; } }
public void Tick(Actor self) { if (!buildComplete || IsTraitDisabled) { return; } if (--ticks <= 0) { if (!(Info.PauseOnLowPower && self.IsDisabled())) { wsb.PlayCustomAnimation(self, Info.Sequences.Random(Game.CosmeticRandom), () => wsb.CancelCustomAnimation(self)); } ticks = Info.Interval; } }
public void Charging(Actor self, Target target) { wsb.PlayCustomAnimation(self, info.ChargeSequence, () => wsb.CancelCustomAnimation(self)); }