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(); }
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); }
private void DestroyMachine() { if (_network != null) { _network.Close(); _network = null; } if (_scenario != null) { _scenario.Close(); _scenario = null; } }