/// <summary> /// Carga todos los valores en base a la informaciĆ³n del Room /// </summary> public void fillRoomData(RoomsEditorRoom room) { updateUiData(mapView.selectedRoom.Walls[0], roofImage, roofAutoUv, roofUTile, roofVTile); updateUiData(mapView.selectedRoom.Walls[1], floorImage, floorAutoUv, floorUTile, floorVTile); updateUiData(mapView.selectedRoom.Walls[2], eastWallImage, eastWallAutoUv, eastWallUTile, eastWallVTile); updateUiData(mapView.selectedRoom.Walls[3], westWallImage, westWallAutoUv, westWallUTile, westWallVTile); updateUiData(mapView.selectedRoom.Walls[4], northWallImage, northWallAutoUv, northWallUTile, northWallVTile); updateUiData(mapView.selectedRoom.Walls[5], southWallImage, southWallAutoUv, southWallUTile, southWallVTile); }
/// <summary> /// Crea un nuevo Room y lo agrega al panel2D /// </summary> /// <param name="name"></param> /// <param name="pos"></param> public RoomsEditorRoom createRoom(string name, Point pos, Size size) { RoomPanel rPanel = new RoomPanel(name, this, pos, size); RoomsEditorRoom room = new RoomsEditorRoom(name, rPanel); rooms.Add(room); panel2d.Controls.Add(room.RoomPanel.Label); return room; }
/// <summary> /// Eliminar un room /// </summary> internal void deleteRoom(RoomsEditorRoom room) { this.rooms.Remove(room); this.panel2d.Controls.Remove(room.RoomPanel.Label); }
/// <summary> /// Seleccionar un cuarto /// </summary> private void selectRoom(RoomsEditorRoom room) { if (selectedRoom != null) { selectedRoom.RoomPanel.setRoomSelected(false); } selectedRoom = room; selectedRoom.RoomPanel.setRoomSelected(true); groupBoxEditRoom.Enabled = true; //Cargar datos de edicion del Room textBoxRoomName.Text = selectedRoom.Name; numericUpDownRoomPosX.Value = selectedRoom.RoomPanel.Label.Location.X; numericUpDownRoomPosY.Value = selectedRoom.RoomPanel.Label.Location.Y; numericUpDownRoomWidth.Value = selectedRoom.RoomPanel.Label.Width; numericUpDownRoomLength.Value = selectedRoom.RoomPanel.Label.Height; numericUpDownRoomHeight.Value = selectedRoom.Height; numericUpDownRoomFloorLevel.Value = selectedRoom.FloorLevel; }
/// <summary> /// Chequea colision con otros rooms. /// Devuelve el room contra el cual colisiono o null /// </summary> internal RoomsEditorRoom testRoomPanelCollision(RoomsEditorRoom room, Rectangle testRect) { foreach (RoomsEditorRoom r in rooms) { if (r != room) { if (r.RoomPanel.Label.Bounds.IntersectsWith(testRect)) { return r; } } } return null; }
public RoomsEditorWall(RoomsEditorRoom room, string name) { this.room = room; this.name = name; wallSegments = new List<TgcPlaneWall>(); intersectingRooms = new List<RoomsEditorRoom>(); //cargar valores default de la pared texture = TgcTexture.createTexture(GuiController.Instance.D3dDevice, room.RoomPanel.mapView.defaultTextureImage); autoAdjustUv = true; uTile = 1f; vTile = 1f; }