private GameManager() { messageDecoder = MessageDecoder.GetInstance(); communicator = Communicator.GetInstance(); gridManager = new GridManager(); playerManager = new PlayerManager(); itemManager = new ItemManager(); collisionManager = new CollisionManager(); aiManager = new AIManager(); // Event subscribe messageDecoder.InitialMapReceived += messageDecoder_InitialMapReceived; messageDecoder.PlayerSetupReceived += messageDecoder_PlayerSetupReceived; messageDecoder.GameUpdateReceived += messageDecoder_GameUpdateReceived; messageDecoder.CoinUpdateReceived += messageDecoder_CoinUpdateReceived; messageDecoder.LifeUpdateReceived += messageDecoder_LifeUpdateReceived; }
private MessageDecoder() { com = Communicator.GetInstance(); com.MessageReceived += com_MessageReceived; }