本文整理汇总了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);
}
}
示例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);
}
示例3: AssetsGroup
public AssetsGroup( AssetType assetType )
{
InitializeComponent( );
_assets = new AssetsPool( );
_assetType = assetType;
}
示例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+".");
}
示例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;
}
}
示例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);
}
示例7: MissingItemInfo
public MissingItemInfo(MemberInfo name,UUID id)
{
MemberName = name;
MissingID = id;
key = MemberName.DeclaringType.Name + "." + MemberName.Name + "=" + MissingID;
AssetType = GuessType(name);
}
示例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;
}
示例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));
}
示例10: Asset
public Asset(string text, AssetType type)
{
if (text == null) throw new ArgumentNullException("text");
Text = text;
Type = type;
}
示例11: AssetRequirement
public AssetRequirement(AssetType type, string file, string inline = null, string addOnceToken = null)
{
Type = type;
File = file;
Inline = inline;
AddOnceToken = addOnceToken;
}
示例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;
}
示例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);
}
}
示例14: GetImage
public Image GetImage(AssetType type)
{
return new Image()
{
Source = this.LoadImage(type)
};
}
示例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.");
}
}