public static RoomData GetRoomFromID(SecretBaseRoomTypes type, SecretBaseRoomLayouts layout) { SecretBaseRoomID id = new SecretBaseRoomID { Type = type, Layout = layout }; if (roomMap.ContainsKey(id)) return roomMap[id]; return null; }
public static RoomData GetRoomFromID(SecretBaseRoomTypes type, SecretBaseRoomLayouts layout) { SecretBaseRoomID id = new SecretBaseRoomID { Type = type, Layout = layout }; if (roomMap.ContainsKey(id)) { return(roomMap[id]); } return(null); }
public LocationData(DataRow row) { this.id = (byte)(long)row["ID"]; this.order = (int)(long)row["Order"]; this.route = (byte)(long)row["Route"]; this.mapX = (byte)((long)row["MapX"] + 1); // At first I made the map position 1 off to center on the location but I'm thinking I'll just highlight the grid location this.mapY = (byte)((long)row["MapY"] + 1); this.side = GetSideFromString(row["Side"] as string); this.type = GetTypeFromString(row["Type"] as string); this.layout = GetLayoutFromString(row["Layout"] as string); this.requirements = row["Requirements"] as string; this.image = LoadImage((byte[])row["Image"]); }
public RoomData(DataRow row) { this.id = (byte)(long)row["ID"]; this.type = GetTypeFromString(row["Type"] as string); this.layout = GetLayoutFromString(row["Layout"] as string); this.width = (byte)(long)row["Width"]; this.height = (byte)(long)row["Height"]; this.trainerX = (byte)(long)row["TrainerX"]; this.trainerY = (byte)(long)row["TrainerY"]; this.image = LoadImage(row["Image"] as byte[]); this.backgroundImage = LoadImage(row["BackgroundImage"] as byte[]); CompilePlacementGrid(row["PlacementGrid"] as string); }