/// <summary> /// Starts a new game. /// </summary> /// <param name="worldId">World identifier.</param> /// <param name="factionId">Faction identifier.</param> public void NewGame(string worldId, string factionId) { world = new WorldManager(); world.LoadWorld(worldId); attack = new AttackManager(world); InitializeGame(factionId); }
/// <summary> /// Starts a new game as a random faction. /// </summary> /// <param name="worldId">World identifier.</param> public void NewGame(string worldId) { world = new WorldManager(); world.LoadWorld(worldId); attack = new AttackManager(world); Faction faction = GetFactions().Where(f => f.Id != GameDefines.GAIA_FACTION).GetRandomElement(); InitializeGame(faction.Id); }
/// <summary> /// Initializes a new instance of the <see cref="GameManager"/> class. /// </summary> public GameManager() { entityManager = new EntityManager(); entityManager.LoadContent(); currentPlayer = entityManager.GetPlayer(); inventoryManager = new InventoryManager(currentPlayer, entityManager); combatManager = new CombatManager(inventoryManager); questManager = new QuestManager(); worldManager = new WorldManager(); questManager.LoadContent(); worldManager.LoadContent(); worldManager.LoadWorld(currentPlayer.World); }