本文整理汇总了C#中FMOD.getNumEvents方法的典型用法代码示例。如果您正苦于以下问题:C# FMOD.getNumEvents方法的具体用法?C# FMOD.getNumEvents怎么用?C# FMOD.getNumEvents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FMOD
的用法示例。
在下文中一共展示了FMOD.getNumEvents方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public void Initialize(FMOD.EventGroup eventgroup, FmodEventGroup parentGroup, FmodEventAsset asset)
{
FMOD.EventGroup childEventgroup = null;
FMOD.RESULT result = FMOD.RESULT.OK;
FmodEventGroup child = null;
int numChildrenGroups = 0;
int numEvents = 0;
FMOD.Event e = null;
FmodEvent toAdd = null;
hideFlags = HideFlags.HideInHierarchy;
m_projectName = asset.getProjectName();
m_parent = parentGroup;
_getName(eventgroup);
result = eventgroup.loadEventData();
ERRCHECK(result);
result = eventgroup.getNumEvents(ref numEvents);
ERRCHECK(result);
for (int j = 0; j < numEvents; j++) {
e = null;
result = eventgroup.getEventByIndex(j, FMOD.EVENT_MODE.DEFAULT | FMOD.EVENT_MODE.ERROR_ON_DISKACCESS, ref e);
ERRCHECK(result);
if (result != FMOD.RESULT.OK) {
result = FMOD.RESULT.OK;
}
toAdd = FmodEvent.CreateInstance("FmodEvent") as FmodEvent;
if (e != null) {
toAdd.Initialize(e, this, j, asset);
e.release();
} else {
toAdd.Initialize(this, j, asset);
}
m_events.Add (toAdd);
}
result = eventgroup.freeEventData(false);
ERRCHECK(result);
result = eventgroup.getNumGroups(ref numChildrenGroups);
for (int k = 0; k < numChildrenGroups; k++) {
result = eventgroup.getGroupByIndex(k, false, ref childEventgroup);
ERRCHECK(result);
child = FmodEventGroup.CreateInstance("FmodEventGroup") as FmodEventGroup;
child.Initialize(childEventgroup, this, asset);
m_children.Add(child);
}
name = getFullName();
}