/// <summary> /// /// </summary> /// <param name="dungeon">The dungeon this floor belongs to.</param> /// <param name="viewport">The picturebox that will hold the rendered floor. Used to find the size of the characters to be rendered</param> /// <param name="w">The width that this floor will have in number of characters.</param> /// <param name="h">The height that this floor will have in number of chracetrs.</param> public Floor(Dungeon dungeon, PictureBox viewport, int w, int h) { this.dungeon = dungeon; tiles = new DisplayChar[w, h]; characters = new Character[w, h]; GenerateLevel(); charSize = viewport.Width / VIEW_AREA_WIDTH; viewAreaHeight = (int)(Math.Round(viewport.Height / charSize)); renderFont = new Font(FontFamily.GenericMonospace, charSize); }
public FinalCombat() { InitializeComponent(); dungeon = new Dungeon(map); player = new Warrior(dungeon.GetFloor(0).StairsDownLocation.X, dungeon.GetFloor(0).StairsDownLocation.Y+1, 10, 0, 0, 0, 0, 0, Brushes.PowderBlue); }