コード例 #1
0
 public SegmentRange <int> GetCharactersLocationRange(SegmentRange <int> locationRange)
 {
     return(new SegmentRange <int>(
                locationRange.Start == 0 ? 0 :
                mCharacterPostLocation[locationRange.Start - 1],
                mCharacterPostLocation[locationRange.End]));
 }
コード例 #2
0
        public Asset CreateIndependentAsset(string path, string name, SegmentRange <int> range, List <Asset> dependentAssets)
        {
            //create independent asset(without reference count)
            //we do not have any reference count for independent asset
            System.IO.FileStream file = new System.IO.FileStream(path + "/" + name, System.IO.FileMode.Open);

            byte[] bytes = new byte[range.End - range.Start + 1];

            file.Read(bytes, range.Start, bytes.Length);

            return(mAssetDescriptions[name].CreateIndependentAsset(bytes, dependentAssets));
        }
コード例 #3
0
        public Asset CreateIndependentAsset(AssetDescription description, SegmentRange <int> range)
        {
            //for independent asset, we wiil search the dependent assets
            //and we will destory the dependent assets after we create independent asset
            var dependentAssets = SearchDependentAssets(mNodes[description]);

            var result = description.Package.CreateIndependentAsset(description.Name, range, dependentAssets);

            foreach (var dependentAsset in dependentAssets)
            {
                DestoryAsset(dependentAsset);
            }
            return(result);
        }
コード例 #4
0
ファイル: AssetSystem.cs プロジェクト: muGouDan/GalDesigner
 public Asset CreateIndependentAsset(AssetDescription description, SegmentRange <int> range)
 {
     return(mAssetGraph.CreateIndependentAsset(description, range));
 }
コード例 #5
0
ファイル: Package.cs プロジェクト: muGouDan/GalDesigner
 internal Asset CreateIndependentAsset(string name, SegmentRange <int> range, List <Asset> dependentAssets)
 {
     return(mPackageComponent.CreateIndependentAsset(FullPath, name, range, dependentAssets));
 }