• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AssetType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AssetType的典型用法代码示例。如果您正苦于以下问题:C# AssetType类的具体用法?C# AssetType怎么用?C# AssetType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AssetType类属于命名空间,在下文中一共展示了AssetType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: RequestXfer

        private byte[] RequestXfer(UUID assetID, AssetType type, out string filename)
        {
            AutoResetEvent xferEvent = new AutoResetEvent(false);
            ulong xferID = 0;
            byte[] data = null;

            EventHandler<XferReceivedEventArgs> xferCallback =
                delegate(object sender, XferReceivedEventArgs e)
                    {
                        if (e.Xfer.XferID == xferID)
                        {
                            if (e.Xfer.Success)
                                data = e.Xfer.AssetData;
                            xferEvent.Set();
                        }
                    };

            Client.Assets.XferReceived += xferCallback;

            filename = assetID + ".asset";
            xferID = Client.Assets.RequestAssetXfer(filename, false, true, assetID, type, false);

            xferEvent.WaitOne(FETCH_ASSET_TIMEOUT, false);

            Client.Assets.XferReceived -= xferCallback;

            return data;
        }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:28,代码来源:XferCommand.cs


示例17: Initialize

    virtual public void Initialize(Ilife lifeData, string resourcePath, AssetType resourceType)
    {
        m_LifeData = lifeData;
        m_iInstanceId = lifeData.GetInstanceId();

        m_ObjectInstance = GameObject.Instantiate(ResourceManager.Instance.LoadBuildInResource<GameObject>(resourcePath, resourceType));

        //load material
        string localpath = resourcePath.Substring(0, resourcePath.LastIndexOf('/'));
        m_NormalMaterial = ResourceManager.Instance.LoadBuildInResource<Material>(localpath + "/Normal", AssetType.Char);
        m_HighlightMaterial = ResourceManager.Instance.LoadBuildInResource<Material>(localpath + "/SelectedHighlight", AssetType.Char);
        m_MeshRender = ComponentTool.FindChildComponent<SkinnedMeshRenderer>("Body", m_ObjectInstance);
        if (null == m_NormalMaterial || null == m_HighlightMaterial || null == m_MeshRender)
        {
            Debuger.LogWarning("can't load mesh render or normal&highlight materials !");
        }

        //mark transform
        m_CharContainer = m_ObjectInstance.AddComponent<CharTransformContainer>();
        m_CharContainer.Initialize(lifeData.GetInstanceId(), lifeData);

        if (null == m_ObjectInstance)
        {
            Debuger.LogError("Can't load resource " + resourcePath);
        }
        m_AnimatorAgent = new AnimatorAgent(m_ObjectInstance);
    }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:27,代码来源:CharTransformData.cs


示例18: ForType

 public static DirectiveParser ForType(AssetType assetType)
 {
     if (assetType == AssetType.Css)
         return CssParser;
     if (assetType == AssetType.Js)
         return JsParser;
     return null;
 }
开发者ID:pvasek,项目名称:nsprockets,代码行数:8,代码来源:DirectiveParser.cs


示例19: Asset

 public Asset(AssetType type, string file, ScriptLocation location = ScriptLocation.Body, string inline = null, string addOnceToken = null)
 {
     this.Type = type;
       this.File = file;
       this.Location = location;
       this.Inline = inline;
       this.AddOnceToken = addOnceToken;
 }
开发者ID:Brad-Christie,项目名称:Habitat,代码行数:8,代码来源:Asset.cs


示例20: request_OnComplete

 void request_OnComplete(TransferRequest request, AssetType type, UUID assetID, byte[] data)
 {
     AssetType = type;
     AssetID = assetID;
     AssetData = data;
     Status = StatusCode.Done;
     completeEvent.Set();
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:8,代码来源:PrintAssetCommand.cs



注:本文中的AssetType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Assignment类代码示例发布时间:2022-05-24
下一篇:
C# AssetRetrieved类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap