public void ChangeRoomType(PreRoomType a_Type) { roomType = a_Type; }
//draw each room of dungeon, if its not explored and GetRoomType == NO_ROOM //then it will be filled in as black, otherwise it is an explored and valid room //displayed in white //also draw marker for where the player currently is public void DrawMiniMap(PreRoomType typeToHighlight = PreRoomType.NO_ROOM) { foreach (PreRoom n in m_PreRooms) { if (typeToHighlight != PreRoomType.NO_ROOM) { if (n.GetRoomType == typeToHighlight) { Utility.Instance.SB.Draw(Utility.Instance.WhiteSquare, new Rectangle((int)m_StartPos.X + n.X * m_RoomWidth, (int)m_StartPos.Y + n.Y * m_RoomHeight, m_RoomWidth, m_RoomHeight), Color.Red); continue; } } //specialised room if (n.GetRoomType != PreRoomType.NO_ROOM) { //explored room if (n.Explored) { Utility.Instance.SB.Draw(Utility.Instance.WhiteSquare, new Rectangle((int)m_StartPos.X + n.X * m_RoomWidth, (int)m_StartPos.Y + n.Y * m_RoomHeight, m_RoomWidth, m_RoomHeight), Color.White); } //not explored room else { Utility.Instance.SB.Draw(Utility.Instance.WhiteSquare, new Rectangle((int)m_StartPos.X + n.X * m_RoomWidth, (int)m_StartPos.Y + n.Y * m_RoomHeight, m_RoomWidth, m_RoomHeight), Color.Black); } } //non-specialised room else { Utility.Instance.SB.Draw(Utility.Instance.WhiteSquare, new Rectangle((int)m_StartPos.X + n.X * m_RoomWidth, (int)m_StartPos.Y + n.Y * m_RoomHeight, m_RoomWidth, m_RoomHeight), Color.Black); } } playerMarker.ChangePosition(new Vector2(m_StartPos.X + m_CurrentRoom.X * (m_RoomWidth) - 0.5f, m_StartPos.Y + m_CurrentRoom.Y * (m_RoomHeight))); playerMarker.Draw(); }