Пример #1
0
        public ChatManager(string chatServerIndex)
        {
            myDataManager = new DataManager();
            myServerManager = new ChatClientManager(chatServerIndex);

            myServerManager.OnCreateChatChannel += OnCreateChatChannel;
            myServerManager.OnJoinChatChannel += OnJoinChatChannel;
            myServerManager.OnSendMessage += OnSendMessage;
            myServerManager.OnLeaveChatRoom += OnLeaveChatRoom;

            myServerManager.OnUserDisconnect += OnUserDisconnect;
        }
Пример #2
0
        public GameManager(string gameServerIndex)
        {
            myServerManager = new GameClientManager(gameServerIndex);
            myServerManager.OnGameCreate += CreateGame;
            myServerManager.OnUserAnswerQuestion += UserAnswerQuestion;
            myServerManager.OnUserDisconnect += UserDisconnect;
            myServerManager.OnUserLeave += UserLeave;

            rooms = new List<GameRoom>();
            cachedGames = new JsDictionary<string, GameObject>();
            gameData = new GameData();
            dataManager = new DataManager();
            Global.SetInterval(flushQueue, 50);
        }
Пример #3
0
        public SiteManager(string siteServerIndex)
        {
            myDataManager = new DataManager();
            mySiteClientManager = new SiteClientManager(siteServerIndex);

            mySiteClientManager.OnUserLogin += OnUserLogin;
            mySiteClientManager.OnGetGameTypes += OnGetGameTypes;
            mySiteClientManager.OnGetRoomInfo += OnGetRoomInfo;
            mySiteClientManager.OnGetRooms += OnGetRooms;
            mySiteClientManager.OnCreateRoom += OnCreateRoom;
            mySiteClientManager.OnJoinRoom += OnJoinRoom;
            mySiteClientManager.OnLeaveRoom += OnLeaveRoom;
            mySiteClientManager.OnStartGame += OnStartGame;

            mySiteClientManager.OnUserDisconnect += OnUserDisconnect;
        }
Пример #4
0
        public DebugGameManager(string debugServerIndex)
        {

          processor=  Global.Require<FileProcessor>("./uglify5.js");
            myServerManager = new DebugGameClientManager(debugServerIndex);
            myServerManager.OnGameCreate += CreateGame;
            myServerManager.OnHandleDebugResponse += HandleDebugResponse;
            myServerManager.OnGameDestroy += GameDestroy;
            myServerManager.OnUserAnswerQuestion += UserAnswerQuestion;
            myServerManager.OnUserDisconnect += UserDisconnect;
            myServerManager.OnUserLeave += UserLeave;

            rooms = new List<DebugGameRoom>();
            gameData = new DebugGameData();
            dataManager = new DataManager();
            Global.SetInterval(flushQueue, 50);
        }
Пример #5
0
        public SiteManager(string siteServerIndex)
        {
            myDataManager = new DataManager();
            mySiteClientManager = new SiteClientManager(siteServerIndex);

            mySiteClientManager.OnUserLogin += OnUserLogin;
            mySiteClientManager.OnUserCreate += OnUserCreate;
            mySiteClientManager.OnGetGameTypes += OnGetGameTypes;
            mySiteClientManager.OnGetRoomInfo += OnGetRoomInfo;
            mySiteClientManager.OnGetRooms += OnGetRooms;
            mySiteClientManager.OnCreateRoom += OnCreateRoom;
            mySiteClientManager.OnJoinRoom += OnJoinRoom;
            mySiteClientManager.OnLeaveRoom += OnLeaveRoom;
            mySiteClientManager.OnStartGame += OnStartGame;


            mySiteClientManager.OnGetGamesByUser += OnGetGamesByUser;
            mySiteClientManager.OnDoesGameNameExist += OnDoesGameNameExist;
            mySiteClientManager.OnDeveloperCreateGame += OnDeveloperCreateGame;
            mySiteClientManager.OnDeveloperUpdateGame += OnDeveloperUpdateGame;

            mySiteClientManager.OnUserDisconnect += OnUserDisconnect;
        }