예제 #1
0
 protected override void PrepareProto()
 {
     if (IsServer)
     {
         config = new EmptyTriggerConfig(this);
     }
 }
예제 #2
0
        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);
 }
예제 #4
0
        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;
 }
예제 #6
0
 public void ServerUnregisterConfiguration(BaseTriggerConfig triggerConfig)
 {
     this.configurations.OriginalList.Remove(triggerConfig);
 }
예제 #7
0
 public void ServerRegisterConfiguration(BaseTriggerConfig triggerConfig)
 {
     this.configurations.OriginalList.Add(triggerConfig);
 }