本文整理汇总了C#中LWF.Movie.SearchMovieInstanceByInstanceId方法的典型用法代码示例。如果您正苦于以下问题:C# Movie.SearchMovieInstanceByInstanceId方法的具体用法?C# Movie.SearchMovieInstanceByInstanceId怎么用?C# Movie.SearchMovieInstanceByInstanceId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LWF.Movie
的用法示例。
在下文中一共展示了Movie.SearchMovieInstanceByInstanceId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlayAnimation
public void PlayAnimation(
int animationId, Movie movie, Button button = null)
{
int i = 0;
int[] animations = m_data.animations[animationId];
Movie target = movie;
for (;;) {
switch ((Animation)animations[i++]) {
case Animation.END:
return;
case Animation.PLAY:
target.Play();
break;
case Animation.STOP:
target.Stop();
break;
case Animation.NEXTFRAME:
target.NextFrame();
break;
case Animation.PREVFRAME:
target.PrevFrame();
break;
case Animation.GOTOFRAME:
target.GotoFrameInternal(animations[i++]);
break;
case Animation.GOTOLABEL:
target.GotoFrame(SearchFrame(target, animations[i++]));
break;
case Animation.SETTARGET:
{
target = movie;
int count = animations[i++];
if (count == 0)
break;
for (int j = 0; j < count; ++j) {
int instId = animations[i++];
switch ((Animation)instId) {
case Animation.INSTANCE_TARGET_ROOT:
target = m_rootMovie;
break;
case Animation.INSTANCE_TARGET_PARENT:
target = target.parent;
if (target == null)
target = m_rootMovie;
break;
default:
{
target = target.SearchMovieInstanceByInstanceId(
instId, false);
if (target == null)
target = movie;
break;
}
}
}
}
break;
case Animation.EVENT:
{
int eventId = animations[i++];
#if LWF_USE_LUA
CallEventFunctionLua(eventId, movie, button);
#endif
if (m_eventHandlers[eventId] != null) {
var handlers = new EventHandlerDictionary(
m_eventHandlers[eventId]);
foreach (var h in handlers)
h.Value(movie, button);
}
}
break;
case Animation.CALL:
#if LWF_USE_LUA
{
int stringId = animations[i++];
if (stringId < 0 || stringId >= data.strings.Length)
break;
CallFunctionLua(data.strings[stringId], target);
}
#else
i++;
#endif
break;
}
}
//.........这里部分代码省略.........