public static RoomModel Load(string path) { var model = AGSProject.LoadJson <RoomModel>(path); model.Folder = getDirectoryName(Path.GetDirectoryName(path)); return(model); }
public static RoomModel Load(IEditorPlatform platform, IGame game, string path) { var model = AGSProject.LoadJson <RoomModel>(platform, game, path); model.Folder = getDirectoryName(Path.GetDirectoryName(path)); return(model); }
private void loadGameSettings(IEditorPlatform platform, IGame game, string path) { if (!File.Exists(path)) { return; } Settings = AGSProject.LoadJson <AGSGameSettings>(platform, game, path); game.Settings.LoadFrom(Settings); }
public static EntityModel Load(string path) { if (!path.EndsWith(".json", StringComparison.InvariantCultureIgnoreCase)) { return(null); } try { var model = AGSProject.LoadJson <EntityModel>(path); model.Filename = Path.GetFileName(path); return(model); } catch (JsonReaderException e) { Debug.WriteLine($"Exception while trying to read json from {path}.{Environment.NewLine}Exception: {e.ToString()}"); throw; } }