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);
            }
        }
예제 #2
0
        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
    }
예제 #4
0
    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();
    }
예제 #5
0
    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();
    }
예제 #6
0
    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();

    }
예제 #7
0
 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;
 }
예제 #9
0
        public override void OnRemove()
        {
            EchoView.InputSignal.RemoveListener(ProcessInput);

            LogSignal.RemoveListener(Log);
        }