Exemplo n.º 1
0
        protected override void OnStart()
        {
            base.OnStart();

            m_Engine = new SFEngine();
            m_Engine.StartEngine();

            m_MessageRouter.RegisterMessageHandler(SF.Net.MessageIDLogin.CreateRandomUserRes, 0, HandleLoginRes);
            m_MessageRouter.RegisterMessageHandler(SF.Net.MessageIDLogin.UpdateMyScoreRes, 0, HandleScoreRes);
        }
Exemplo n.º 2
0
        protected override void OnStop()
        {
            CloseAllConnections();


            if (m_Engine != null)
            {
                m_Engine.StopEngine();
            }
            m_Engine = null;

            base.OnStop();
        }