public Bitmap GetCharacterImage(string characterName, string expression, ImageFormatType imageFormatType) { string ext = imageFormatType.ToString(); var characterPath = $"{Directory.GetCurrentDirectory()}\\Characters\\{characterName}\\{expression}.{ext}"; if (!File.Exists(characterPath)) { throw new ArgumentException($"{expression} missing for character {characterName}"); } return(new Bitmap($"{characterPath}")); }
public Bitmap GetSceneImage(string sceneName, ImageFormatType imageFormatType) { string ext = imageFormatType.ToString(); var sceneFilePath = $"{Directory.GetCurrentDirectory()}\\Scenes\\{sceneName}.{ext}"; if (!File.Exists(sceneFilePath)) { throw new ArgumentException($"{sceneName} is missing"); } return(new Bitmap(sceneFilePath)); }
public Bitmap GetImageAsset(string fileName, ImageFormatType imageFormatType) { string ext = imageFormatType.ToString(); var assetFilePath = $"{Directory.GetCurrentDirectory()}\\Assets\\{fileName}.{ext}"; if (!File.Exists(assetFilePath)) { throw new ArgumentException($"{fileName}.{ext} is not present in the assets folder"); } return(new Bitmap(assetFilePath)); }