public bool ReadFile(string filePath, bool isCompressed, bool isBinary) { if (!isBinary) { OverworldFile file = FileUtils.LoadJson <OverworldFile>(filePath, isCompressed); if (file == null) { return(false); } else { CopyFrom(file); return(true); } } else { OverworldFile file = FileUtils.LoadBinary <OverworldFile>(filePath); if (file == null) { return(false); } else { CopyFrom(file); return(true); } } }
public void CopyFrom(OverworldFile file) { Data = file.Data; }