當前位置: 首頁>>代碼示例>>C#>>正文


C# AssetType類代碼示例

本文整理匯總了C#中AssetType的典型用法代碼示例。如果您正苦於以下問題:C# AssetType類的具體用法?C# AssetType怎麽用?C# AssetType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AssetType類屬於命名空間,在下文中一共展示了AssetType類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ReceiveAndUse

 private void ReceiveAndUse(UUID objectid, AssetType type)
 {
     if (type==AssetType.Clothing)
     {
         Received.Add(objectid);
     }
 }
開發者ID:drzo,項目名稱:opensim4opencog,代碼行數:7,代碼來源:FashionBotModuleMain.cs

示例2: AssetKey

 public AssetKey(AssetType assetType, params string[] tags)
 {
     AssetType = assetType;
     Tags = tags.Select(x => x.ToUpperInvariant()).OrderBy(x => x).ToArray();
     var objects = Tags.Concat(new string[] { AssetType.ToString() }).ToArray();
     compoundKey = new CompoundKey(objects);
 }
開發者ID:chriskooken,項目名稱:Pithy,代碼行數:7,代碼來源:AssetKey.cs

示例3: AssetsGroup

        public AssetsGroup( AssetType assetType )
        {
            InitializeComponent( );

            _assets = new AssetsPool( );
            _assetType = assetType;
        }
開發者ID:HaKDMoDz,項目名稱:Lunar-Development-Kit,代碼行數:7,代碼來源:AssetsGroup.cs

示例4: CheckContainsReferences

 private void CheckContainsReferences(AssetType assetType, bool expected)
 {
     AssetBase asset = new AssetBase();
     asset.Type = (sbyte)assetType;
     bool actual = asset.ContainsReferences;
     Assert.AreEqual(expected, actual, "Expected "+assetType+".ContainsReferences to be "+expected+" but was "+actual+".");
 }
開發者ID:ChrisD,項目名稱:opensim,代碼行數:7,代碼來源:AssetBaseTest.cs

示例5: GatherAssetUuids

        /// <summary>
        ///     Gather all the asset uuids associated with the asset referenced by a given uuid
        /// </summary>
        /// This includes both those directly associated with
        /// it (e.g. face textures) and recursively, those of items within it's inventory (e.g. objects contained
        /// within this object).
        /// <param name="assetUuid">The uuid of the asset for which to gather referenced assets</param>
        /// <param name="assetType">The type of the asset for the uuid given</param>
        /// <param name="assetUuids">The assets gathered</param>
        /// <param name="scene"></param>
        public void GatherAssetUuids(UUID assetUuid, AssetType assetType, IDictionary<UUID, AssetType> assetUuids,
                                     IRegistryCore scene)
        {
            // avoid infinite loops
            if (assetUuids.ContainsKey(assetUuid))
                return;

            assetUuids[assetUuid] = assetType;

            switch (assetType)
            {
                case AssetType.Clothing:
                case AssetType.Bodypart:
                    GetWearableAssetUuids(assetUuid, assetUuids);
                    break;
                case AssetType.Gesture:
                    GetGestureAssetUuids(assetUuid, assetUuids);
                    break;
                case AssetType.LSLText:
                    GetScriptAssetUuids(assetUuid, assetUuids);
                    break;
                case AssetType.Object:
                    GetSceneObjectAssetUuids(assetUuid, assetUuids, scene);
                    break;
            }
        }
開發者ID:velus,項目名稱:Async-Sim-Testing,代碼行數:36,代碼來源:UuidGatherer.cs

示例6: StoreData

        public void StoreData(AssetType type, string path, IAssetCachedData metadata)
        {
            var metaDataPath = GetCachedDataFilePath(type, path);

            var data = JsonConvert.SerializeObject(metadata);
            File.WriteAllText(metaDataPath, data);
        }
開發者ID:ParkitectNexus,項目名稱:ParkitectNexusClient,代碼行數:7,代碼來源:AssetCachedDataStorage.cs

示例7: MissingItemInfo

 public MissingItemInfo(MemberInfo name,UUID id)
 {
     MemberName = name;
     MissingID = id;
     key = MemberName.DeclaringType.Name + "." + MemberName.Name + "=" + MissingID;
     AssetType = GuessType(name);
 }
開發者ID:drzo,項目名稱:opensim4opencog,代碼行數:7,代碼來源:ImportCommand_Assets.cs

示例8: CreateBundles

 private List<string> CreateBundles(FileListsByAssetType fileListsByAssetType, AssetType assetType, Func<string, string[], Bundle> bundleFactory)
 {
     List<AssetPath> files = fileListsByAssetType.GetList(assetType);
     List<List<AssetPath>> filesByAreaController = RouteHelper.FilePathsSortedByRoute(files);
     List<string> bundleVirtualPaths = BundleHelper.AddFileListsAsBundles(_bundles, filesByAreaController, bundleFactory);
     return bundleVirtualPaths;
 }
開發者ID:nbucket,項目名稱:dynamicbundles,代碼行數:7,代碼來源:DynamicBundlesBuilder.cs

示例9: pb_MetaData

		/**
		 * Serialized constructor.
		 */
		public pb_MetaData(SerializationInfo info, StreamingContext context)
		{
			_fileId				= (string) info.GetValue("_fileId", typeof(string));
			_assetBundlePath	= (pb_AssetBundlePath) info.GetValue("_assetBundlePath", typeof(pb_AssetBundlePath));
			_assetType			= (AssetType) info.GetValue("_assetType", typeof(AssetType));
			componentDiff		= (pb_ComponentDiff) info.GetValue(	"componentDiff", typeof(pb_ComponentDiff));
		}
開發者ID:procore3d,項目名稱:giles,代碼行數:10,代碼來源:pb_MetaData.cs

示例10: Asset

            public Asset(string text, AssetType type)
            {
                if (text == null) throw new ArgumentNullException("text");

                Text = text;
                Type = type;
            }
開發者ID:ronnieoverby,項目名稱:MvcAssetManager,代碼行數:7,代碼來源:AssetManager.cs

示例11: AssetRequirement

 public AssetRequirement(AssetType type, string file, string inline = null, string addOnceToken = null)
 {
     Type = type;
     File = file;
     Inline = inline;
     AddOnceToken = addOnceToken;
 }
開發者ID:BIGANDYT,項目名稱:spitfire-vitality,代碼行數:7,代碼來源:AssetRequirement.cs

示例12: MultiRelationAttributeDefinition

 public MultiRelationAttributeDefinition(Type type, PropertyInfo property, Type relatedType, AssetType assetType, AssetType relatedAssetType)
     : base(assetType, property.Name, false, relatedAssetType, true)
 {
     _type = type;
     _property = property;
     _relatedType = relatedType;
 }
開發者ID:donald-hanson,項目名稱:V1Antlr,代碼行數:7,代碼來源:MultiRelationAttributeDefinition.cs

示例13: GatherAssetUuids

        /// <summary>
        ///   Gather all the asset uuids associated with the asset referenced by a given uuid
        /// </summary>
        /// This includes both those directly associated with
        /// it (e.g. face textures) and recursively, those of items within it's inventory (e.g. objects contained
        /// within this object).
        /// <param name = "assetUuid">The uuid of the asset for which to gather referenced assets</param>
        /// <param name = "assetType">The type of the asset for the uuid given</param>
        /// <param name = "assetUuids">The assets gathered</param>
        public void GatherAssetUuids(UUID assetUuid, AssetType assetType, IDictionary<UUID, AssetType> assetUuids,
                                     IRegistryCore scene)
        {
            // avoid infinite loops
            if (assetUuids.ContainsKey(assetUuid))
                return;

            assetUuids[assetUuid] = assetType;

            if (AssetType.Bodypart == assetType || AssetType.Clothing == assetType)
            {
                GetWearableAssetUuids(assetUuid, assetUuids);
            }
            else if (AssetType.Gesture == assetType)
            {
                GetGestureAssetUuids(assetUuid, assetUuids);
            }
            else if (AssetType.LSLText == assetType)
            {
                GetScriptAssetUuids(assetUuid, assetUuids);
            }
            else if (AssetType.Object == assetType)
            {
                GetSceneObjectAssetUuids(assetUuid, assetUuids, scene);
            }
        }
開發者ID:nathanmarck,項目名稱:Aurora-Sim,代碼行數:35,代碼來源:UuidGatherer.cs

示例14: GetImage

 public Image GetImage(AssetType type)
 {
     return new Image()
     {
         Source =  this.LoadImage(type)
     };
 }
開發者ID:ivailojordanov,項目名稱:Fundamental-Level,代碼行數:7,代碼來源:AssetLoader.cs

示例15: GetFilesInAssetPath

        private string[] GetFilesInAssetPath(AssetType type)
        {
            switch (type)
            {
                case AssetType.Blueprint:
                    if (_parkitect.Paths.GetAssetPath(type) == null)
                        return new string[0];

                    return Directory.GetFiles(_parkitect.Paths.GetAssetPath(type), "*.png",
                        SearchOption.AllDirectories);
                case AssetType.Savegame:
                    if (_parkitect.Paths.GetAssetPath(type) == null)
                        return new string[0];

                    return Directory.GetFiles(_parkitect.Paths.GetAssetPath(type), "*.txt",
                        SearchOption.AllDirectories)
                        .Concat(Directory.GetFiles(_parkitect.Paths.GetAssetPath(type), "*.park",
                            SearchOption.AllDirectories)).ToArray();
                case AssetType.Mod:
                    if (_parkitect.Paths.GetAssetPath(type) == null)
                        return new string[0];
                    return Directory.GetDirectories(_parkitect.Paths.GetAssetPath(AssetType.Mod))
                        .Where(path => File.Exists(Path.Combine(path, "mod.json")))
                        .ToArray();
                default:
                    throw new Exception("unsupported asset type.");
            }
        }
開發者ID:ParkitectNexus,項目名稱:ParkitectNexusClient,代碼行數:28,代碼來源:LocalAssetRepository.cs


注:本文中的AssetType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。