Example #1
0
        public static CAsset Create <T>(string name) where T : CAsset, new()
        {
            // 1. Create
            CAsset asset = new T();

            string filename = string.Format(".\\asset\\{0}{1}", name, asset.Extension);

            asset.FileInfo = CFileInfo.SetFileInfo(filename);

            // 2. Init
            if (asset.Init() == false)
            {
                MessageBox.Show("Asset 초기화 실패");
                return(asset);
            }

            return(asset);
        }
Example #2
0
 public static CAsset Load <T>(string filename) where T : CAsset, new()
 {
     return(Load <T>(CFileInfo.SetFileInfo(filename)));
 }