public void SpawnRandomly(int creatureCount) { for (var i = 0; i < creatureCount; ++i) { var creature = _creatureFactory.CreateRandom(); var autonomousModel = _autonomousFactory.Create("simpledefender", creature); var openCell = _playArea.GameMap.GetRandomOpenCell(); // TODO: Simplify all the registering. _playArea.GameMap.Add(openCell.X, openCell.Y, creature); creature.Position.SetPosition(openCell.X, openCell.Y); _autonomousRegistry.Register(autonomousModel); _creatureRegistry.Register(creature); _recipientRegistry.Register(autonomousModel); } }
private void CreateInitialIndentities() { // Temp until CRC design issue is resolved between LobbyRouter and SocketServer (IClientSender) _recipientRegistry.Register(new ClientMessageProxy(_clientSender, "1")); _recipientRegistry.Register(new ClientMessageProxy(_clientSender, "2")); }