private void comboBox3_SelectionChangeCommitted(object sender, EventArgs e) { string room = comboBox3.SelectedValue.ToString(); //roomName = room; OnRoomChanged?.Invoke(room, roomName); }
private void ChangeRoom(Transform room) { /// Add effects and delay time later cam.transform.position = new Vector3(room.position.x, room.position.y, cam.transform.position.z); cam.transform.rotation = room.rotation; string previousRoom = currentRoom; currentRoom = room.name.ToLower(); OnRoomChanged?.Invoke(this, new RoomChangedEventArgs(currentRoom, previousRoom)); }
public void Go(DungeonRoom from, Direction direction) { DungeonRoom nextRoom = from.GetRoom(direction); if (nextRoom == null || nextRoom == ActiveRoom) { return; } ActiveRoom = nextRoom; IntPair offset = ActiveRoom.position * ActiveRoom.Dimensions; ShowRoom(planetData.areaType, ActiveRoom, offset, true); OnRoomChanged?.Invoke(ActiveRoom, direction); }