Exemplo n.º 1
0
		/// <summary>
		/// Creates new puzzle.
		/// </summary>
		/// <param name="dungeon"></param>
		/// <param name="section"></param>
		/// <param name="floorData"></param>
		/// <param name="puzzleData"></param>
		/// <param name="puzzleScript"></param>
		public Puzzle(Dungeon dungeon, DungeonFloorSection section, DungeonFloorData floorData, DungeonPuzzleData puzzleData, PuzzleScript puzzleScript)
		{
			_variables = new Dictionary<string, Object>();
			_monsterGroups = new Dictionary<string, MonsterGroup>();
			_monsterGroupData = new Dictionary<string, DungeonMonsterGroupData>();
			this.Props = new Dictionary<string, Prop>();
			this.Keys = new Dictionary<string, Item>();

			_section = section;
			this.Name = puzzleScript.Name;
			this.Data = puzzleData;
			this.Dungeon = dungeon;
			this.Script = puzzleScript;
			this.FloorData = floorData;

			for (int i = 1; i <= puzzleData.Groups.Count; ++i)
				_monsterGroupData["Mob" + i] = puzzleData.Groups[i - 1].Copy();
		}
Exemplo n.º 2
0
		public Puzzle NewPuzzle(Dungeon dungeon, DungeonFloorData floorData, DungeonPuzzleData puzzleData, PuzzleScript puzzleScript)
		{
			var puzzle = new Puzzle(dungeon, this, floorData, puzzleData, puzzleScript);
			this.Puzzles.Add(puzzle);
			return puzzle;
		}