示例#1
0
        public void Start()
        {
            _isExit          = false;
            _messagesManager = new MessagesManager();
            _network         = new NetworkClientMachine(_messagesManager);
            IAllParameters p = new AllGameOneParameters(this, SceneMenu, SceneGame, _messagesManager);

            _scenario = new ScenarioMachine(p);
            _network.Start();
            _scenario.Start();
        }
示例#2
0
        public Server()
        {
            _isExit          = false;
            _sceneMenu       = new SceneServerMenu();
            _sceneGame       = new SceneServerGame();
            _messagesManager = new MessagesManager();
            _network         = new NetworkServerMachine(_messagesManager);
            cc = new ConsoleCtrl();
            IAllParameters p = new AllGameOneParameters(this, _sceneMenu, _sceneGame, _messagesManager);

            _scenario = new ScenarioMachine(p);
        }
示例#3
0
 private void DestroyMachine()
 {
     if (_network != null)
     {
         _network.Close();
         _network = null;
     }
     if (_scenario != null)
     {
         _scenario.Close();
         _scenario = null;
     }
 }