private IEnumerator LogRoutine() { while (IsRunning) { if (LogQueue.Count > 0) { var data = LogQueue.Dequeue(); char logType = data [0]; var message = data.Substring(1); switch (logType) { case '0': LogSignal.Dispatch(LogType.Connected, message); break; case '1': LogSignal.Dispatch(LogType.Message, message); break; case '2': LogSignal.Dispatch(LogType.Disconnected, message); IsRunning = false; break; } } yield return(null); } }
public override void OnRegister() { EchoView.Initialize(); SetCanConnect(true); EchoView.InputSignal.AddListener(ProcessInput); LogSignal.AddListener(Log); }
public override void Launch() { #region GAMER SERVER STARTUP CODE ( You don't need to touch this ) _logger = injectionBinder.GetInstance <LogSignal>(); _logger.Dispatch(LoggerTypes.Info, "Launch from MainGameServer Context."); //Bind to onComplete. _loadPlayFabDataCompleteSignal = injectionBinder.GetInstance <PlayFabServerStartupCompleteSignal>(); _loadPlayFabDataCompleteSignal.AddListener(OnPlayFabServerStartup); //Dispatch Signal to startup var loadPlayFabDataSignal = injectionBinder.GetInstance <PlayFabServerStartupSignal>(); loadPlayFabDataSignal.Dispatch(); #endregion }
public override void Launch() { _logger = injectionBinder.GetInstance <LogSignal>(); _logger.Dispatch(LoggerTypes.Info, "Launch from MainGameServer Context."); foreach (var pack in MainCtx.Packages) { pack.Launch(injectionBinder); } PlayFabServerEvents.OnServerStartupComplete += OnPlayFabServerStartup; //startup server _serverService = injectionBinder.GetInstance <PlayFabServerService>(); _serverService.PlayFabServerStartup(); }
public override void Launch() { _logger = injectionBinder.GetInstance <LogSignal>(); _logger.Dispatch(LoggerTypes.Info, "Launch from MainGameServer Context."); foreach (var pack in MainCtx.Packages) { pack.Launch(injectionBinder); } //Bind to onComplete. _loadPlayFabDataCompleteSignal = injectionBinder.GetInstance <PlayFabServerStartupCompleteSignal>(); _loadPlayFabDataCompleteSignal.AddListener(OnPlayFabServerStartup); //Dispatch Signal to startup var loadPlayFabDataSignal = injectionBinder.GetInstance <PlayFabServerStartupSignal>(); loadPlayFabDataSignal.Dispatch(); }
public override void Launch() { _logger = injectionBinder.GetInstance<LogSignal>(); _logger.Dispatch(LoggerTypes.Info, "Launch from MainGameServer Context."); foreach (var pack in MainCtx.Packages) { pack.Launch(injectionBinder); } //Bind to onComplete. _loadPlayFabDataCompleteSignal = injectionBinder.GetInstance<PlayFabServerStartupCompleteSignal>(); _loadPlayFabDataCompleteSignal.AddListener(OnPlayFabServerStartup); //Dispatch Signal to startup var loadPlayFabDataSignal = injectionBinder.GetInstance<PlayFabServerStartupSignal>(); loadPlayFabDataSignal.Dispatch(); }
public UnityNetworkingService(UnityNetworkingData data, ServerSettingsData serverSettings, LogSignal logger) { UnityNetworkingData = data; ServerSettingsData = serverSettings; Logger = logger; }
public PlayFabServerService(LogSignal logger, PlayFabServerEvents serverEvents, ServerSettingsData settings) { ServerSettingsData = settings; ServerEvents = serverEvents; Logger = logger; }
public override void OnRemove() { EchoView.InputSignal.RemoveListener(ProcessInput); LogSignal.RemoveListener(Log); }