本文整理汇总了C#中AssetManager.FindPatch方法的典型用法代码示例。如果您正苦于以下问题:C# AssetManager.FindPatch方法的具体用法?C# AssetManager.FindPatch怎么用?C# AssetManager.FindPatch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetManager
的用法示例。
在下文中一共展示了AssetManager.FindPatch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Load
public override void Load(DescriptorList description, AssetManager assets)
{
intervalList = new PatchInterval[description.CustomDescriptions.Length];
for (int x = 0; x < intervalList.Length; x++)
{
if (!description.CustomDescriptions[x].ID.ToLower().Equals("mpat"))
throw new Exception(string.Format("The patch: {0} has an invalid descriptor with id {1}", this.patchName, description.CustomDescriptions[x].ID));
string patchName = (string)description.CustomDescriptions[x].Objects[0];
PatchAsset pAsset = assets.FindPatch(patchName);
if(pAsset == null)
throw new Exception(string.Format("The patch: {0} could not be found. For multi patches all sub patches must be loaded first.", patchName));
byte sChan = (byte)description.CustomDescriptions[x].Objects[1];
byte eChan = (byte)description.CustomDescriptions[x].Objects[2];
byte sKey = (byte)description.CustomDescriptions[x].Objects[3];
byte eKey = (byte)description.CustomDescriptions[x].Objects[4];
byte sVel = (byte)description.CustomDescriptions[x].Objects[5];
byte eVel = (byte)description.CustomDescriptions[x].Objects[6];
intervalList[x] = new PatchInterval(pAsset.Patch, sChan, eChan, sKey, eKey, sVel, eVel);
}
DetermineIntervalType();
}