private int stageNumFile; //ステージのファイル番号 /// <summary> /// シーンの間にゲーム情報を伝える仲介者 /// </summary> /// <param name="gameDevice">ゲームディバイス</param> public GameManager(GameDevice gameDevice) { this.gameDevice = gameDevice; mapInstance = null; stageManager = new StageManager(gameDevice); enemySettingManager = new EnemySettingManager(gameDevice); blockStyle = new BlockStyle(); questManager = new QuestLoader(); questManager.Initialize(); questManager.Load(dungeonProcess, true); itemManager = new ItemManager(); dungeonProcess = new DungeonProcess(); enemyName = new EnemyNameLoader(); #region Player初期化 PlayerStatusLoader psLoader = new PlayerStatusLoader(); int[] status = psLoader.LoadStatus(); Status defaultStatus = new Status(1, status[0], status[1], status[2], status[3], 1); playerStatus = new PlayerStatus(defaultStatus, gameDevice); playerStatus.Initialize(); playerItem = playerStatus.GetInventory(); //道具欄を取得 playerQuest = new PlayerQuest(); playerGuildRank = new PlayerGuildRank(); #endregion Load(); }
public void Update(GameTime gameTime) { if (!questManager.IsLoad()) { questManager.Load( gameManager.DungeonProcess); questManager.RandomQuest( gameDevice, gameManager.GuildInfo); return; } gameManager.PlayerQuest.UpdateQuestProcess(); endFlag = true; }
public void Setup(IEnumerable <IPlayer> players, ScenarioCode scenarioCode) { if (players == null) { throw new ArgumentNullException("players"); } if (players.Count() == 0) { throw new ArgumentException("list of players cannot be empty"); } if (players.Any(x => x == null)) { throw new ArgumentNullException("list of players cannot contain nulls"); } this.players.Clear(); foreach (var player in players) { this.players.Add(player); } var questLoader = new QuestLoader(); this.QuestArea = questLoader.Load(this, scenarioCode); var gameSetup = new GameSetup(this); gameSetup.Run(); CurrentRound = 0; CurrentPhase = null; foreach (var callback in gameSetupCallbacks) { callback(); } Run(); }