public Model(RS5DirectoryEntry dirent) : this() { this.Name = dirent.Name; this.ModTime = dirent.ModTime; this.CreatTime = dirent.ModTime; this._ModelDataInitializer = () => ModelBase.Create(dirent); }
public static Texture AddTexture(RS5DirectoryEntry dirent) { return(GetTexture(dirent.Name, (t) => { t.ModTime = dirent.ModTime; t.Chunk = dirent.Data; })); }
public static ModelBase Create(RS5DirectoryEntry dirent) { RS5Chunk chunk = dirent.Data; if (dirent.Type == "IMDL") { return(ImmobileModel.Create(chunk)); } else if (dirent.Type == "AMDL") { return(AnimatedModel.Create(chunk)); } else { throw new ArgumentException("Entry does not represent a model"); } }
public static Texture AddTexture(RS5DirectoryEntry dirent) { return GetTexture(dirent.Name, (t) => { t.ModTime = dirent.ModTime; t.Chunk = dirent.Data; }); }