예제 #1
0
 public Model(RS5DirectoryEntry dirent)
     : this()
 {
     this.Name                  = dirent.Name;
     this.ModTime               = dirent.ModTime;
     this.CreatTime             = dirent.ModTime;
     this._ModelDataInitializer = () => ModelBase.Create(dirent);
 }
예제 #2
0
 public static Texture AddTexture(RS5DirectoryEntry dirent)
 {
     return(GetTexture(dirent.Name, (t) =>
     {
         t.ModTime = dirent.ModTime;
         t.Chunk = dirent.Data;
     }));
 }
예제 #3
0
            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");
                }
            }
예제 #4
0
 public static Texture AddTexture(RS5DirectoryEntry dirent)
 {
     return GetTexture(dirent.Name, (t) =>
     {
         t.ModTime = dirent.ModTime;
         t.Chunk = dirent.Data;
     });
 }