protected override void PrepareProto() { if (IsServer) { config = new EmptyTriggerConfig(this); } }
private static void EnsureConfigCreated() { if (IsClient || config != null) { return; } config = new EmptyTriggerConfig(GetProtoEntity <TriggerEveryFrame>()); }
public ServerWrappedTriggerTimeInterval( Action callbackTimerTick, TimeSpan interval, string name) { this.callbackTimerTick = callbackTimerTick; this.triggerConfig = TriggerTimeInterval.ServerConfigureAndRegister( interval, this.ServerTimerTick, name); }
public static void ApplyPostpone(BaseTriggerConfig triggerConfig, double duration) { var config = (TriggerTimeIntervalConfig)triggerConfig; config.SetNextTriggerTime(Server.Game.FrameTime + duration); }
public void Dispose() { this.triggerConfig.ServerUnregister(); this.triggerConfig = null; }
public void ServerUnregisterConfiguration(BaseTriggerConfig triggerConfig) { this.configurations.OriginalList.Remove(triggerConfig); }
public void ServerRegisterConfiguration(BaseTriggerConfig triggerConfig) { this.configurations.OriginalList.Add(triggerConfig); }