Esempio n. 1
0
        public NetworkManager()
        {
            m_NetworkLog = new NetworkLog();

            m_Client = new HClient();
            m_Client.OnAccountResponse += M_Client_OnAccountResponse;
            m_Client.OnGameDataResponse += M_Client_OnGameDataResponse;
            m_Client.OnTowerDataResponse += M_Client_OnTowerDataResponse;

            m_ClientPump = new Thread(new ThreadStart(ClientPumpThread));
            m_ClientPump.Name = "Client Pump Thread";
            m_ClientPump.Start();

            m_SignInStatus = SignInStatus.None;

            if (m_VipData == null)
            {
                m_VipData = new VipDataArgs();
                m_VipData.Level = 1;
                m_VipData.Progress = 0;
                m_VipData.Hints = 5;
                m_VipData.MegaHints = 2;
                m_VipData.UndoSize = 5;
            }
        }
Esempio n. 2
0
        public override GameClient CreateClient(System.Net.Sockets.Socket s)
        {
            HClient client = new HClient(s);

            // Register Happiness specific handlers
            client.OnGameDataRequest += Client_OnGameDataRequest;
            client.OnPuzzleComplete += Client_OnPuzzleComplete;
            client.OnSpendCoins += Client_OnSpendCoins;
            client.OnTowerDataRequest += Client_OnTowerDataRequest;
            client.OnTutorialData += Client_OnTutorialData;

            return client;
        }
Esempio n. 3
0
 private void Client_OnTutorialData(HClient arg1, ulong arg2)
 {
     TaskProcessor.AddTask(new HTask(HTask.HTaskType.TutorialData_Store, arg1, arg2));
 }
Esempio n. 4
0
 public HTask(HTaskType type, HClient client = null, object args = null)
 {
     Type = (int)type;
     _client = client;
     _args = args;
 }