Пример #1
0
        void FixedUpdate()
        {
            if (!Init)
            {
                if (masterServer.isConnected)
                {
                    Init                = true;
                    moduleManager       = masterServer.GetComponent <ModuleManager>();
                    authModule          = moduleManager.GetModule <ServerAuthentication>();
                    chatModule          = moduleManager.GetModule <ChatServer>();
                    masterSpawnerModule = moduleManager.GetModule <MasterSpawner>();
                    gameModule          = moduleManager.GetModule <ServerGameManager>();
                    matchModule         = moduleManager.GetModule <ServerMatchMaking>();
                }
                return;
            }

            spawnerCountText.text        = masterSpawnerModule.registeredSpawners.Count.ToString();
            gameCountText.text           = gameModule.registeredGameServers.Count.ToString();
            userCountText.text           = authModule.registeredUsers.Count.ToString();
            playersInQueueCountText.text = matchModule.playerQueue.Count.ToString();

            //Clear previous values
            activeGamesText.text = "";

            //Game Status
            foreach (GameContainer game in gameModule.registeredGameServers)
            {
                activeGamesText.text += game.UniqueId + " - " + game.NetworkAddress + ":" + game.NetworkPort + " - " + game.SceneName + " - " + game.CurrentPlayers + "/" + game.MaxPlayers + Environment.NewLine;
            }
        }
        internal static void Open(ServerAuthentication target)
        {
            var window = GetWindow <ServerAuthenticationGenerator>(true, "Set public/private key for uLink server authentication");

            window.Init(target);
            window.Repaint();
        }
Пример #3
0
    private void Update()
    {
        if (!Init)
        {
            if (masterServer.isConnected)
            {
                Init                = true;
                moduleManager       = masterServer.GetComponent <ModuleManager>();
                authModule          = moduleManager.GetModule <ServerAuthentication>();
                chatModule          = moduleManager.GetModule <ChatServer>();
                masterSpawnerModule = moduleManager.GetModule <MasterSpawner>();
                gameModule          = moduleManager.GetModule <ServerGameManager>();
                matchModule         = moduleManager.GetModule <ServerMatchMaking>();
            }
            return;
        }

        spawnerCountText.text        = masterSpawnerModule.registeredSpawners.Count.ToString();
        gameCountText.text           = gameModule.registeredGameServers.Count.ToString();
        userCountText.text           = authModule.registeredUsers.Count.ToString();
        playersInQueueCountText.text = matchModule.playerQueue.Count.ToString();
        activeMatchesCountText.text  = matchModule.matchList.Count.ToString();
    }
Пример #4
0
 public AuthKeyUpdatedEventArgs(ServerAuthentication authentication)
 {
     ServerAuthentication = authentication;
 }
 private void Init(ServerAuthentication target)
 {
     this.target = target;
     minSize     = maxSize = new Vector2(WINDOW_WIDTH, WINDOW_HEIGHT);
 }