本文整理汇总了C#中EventData.GenerateHashtable方法的典型用法代码示例。如果您正苦于以下问题:C# EventData.GenerateHashtable方法的具体用法?C# EventData.GenerateHashtable怎么用?C# EventData.GenerateHashtable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventData
的用法示例。
在下文中一共展示了EventData.GenerateHashtable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlayActionSequence
protected void PlayActionSequence ( ArrayList p_actionSequence )
{
// check here if cueueble or action is uninteractibe.
if( !this.IsInteractible() )
{
if( m_bEventIsCueable )
{
// Sanity check..
// 1. Should not Add ActionSequence that is currently playing
// 2. Should not Add ActionSequence that is already in cue
foreach( string action in p_actionSequence )
{
bool containsAction = false;
foreach( string cuedAction in m_cuedActions )
{
if( action.Equals(cuedAction) )
containsAction = true;
}
if( !containsAction ) { m_cuedActions.Add(action); }
#if DEBUG_CUEABLES
if( containsAction ) Debug.LogError("Dragon::PlayActionSequence Dragon is not Interactible. adding "+action+" to cue.");
else Debug.LogError("Dragon::PlayActionSequence Dragon is not Interactible and already contains cueable "+action+" action.");
#else
if( containsAction ) Log("Dragon::PlayActionSequence Dragon is not Interactible. adding "+action+" to cue.");
else Log("Dragon::PlayActionSequence Dragon is not Interactible and already contains cueable "+action+" action.");
#endif
}
return;
}
#if DEBUG_CUEABLES
Debug.LogError("Dragon::PlayActionSequence Cannot Play this Action because Action is not Interactibe.");
//Debug.Break();
#else
//Log("Dragon::PlayActionSequence Cannot Play this Action:"+MiniJSON.jsonEncode(p_actionSequence)+" because Action is not Interactibe.");
Debug.LogWarning("Dragon::PlayActionSequence Cannot Play this Action:"+MiniJSON.jsonEncode(p_actionSequence)+" because Action is not Interactibe. \n");
#endif
return;
}
// clear actions
DragonAnimationQueue.getInstance().ClearAll();
SoundManager.Instance.StopAnimationSound( PettingMain.Instance.HeadSoundContainer );
SoundManager.Instance.StopAnimationSound( PettingMain.Instance.BodySoundContainer );
SoundManager.Instance.StopAnimationSound( PettingMain.Instance.HeadAndBodySoundContainer );
foreach( string action in p_actionSequence )
{
// Body Animations
ArrayList bodyActionSequence = SequenceReader.GetInstance().ReadBodySequence(action);
Log("----------- Playing Reaction:"+action+" -----------");
//LogWarning(">>>>>>> Checking action: \""+action+"\"\n");
if( bodyActionSequence != null )
{
// +KJ:06132013 Shared Parameter. this supports the same random value that a cue is sharing
foreach( object actionData in bodyActionSequence )
{
ArrayList actionDataList = actionData as ArrayList;
BodyData bodyData = new BodyData();
bodyData.Action = action;
bodyData.Start = Utility.ParseToInt(actionDataList[0]);
bodyData.ActionKey = actionDataList[1].ToString();
bodyData.Duration = float.Parse(actionDataList[2].ToString());
if( actionDataList.Count > 3 )
{
bodyData.Param = actionDataList[3] as Hashtable;
}
bodyData.ExtractHashtableValues( bodyData.Param );
bodyData.EventTrigger = this.FormulateEventTriggers( bodyData.Param );
DragonAnimationQueue.getInstance().AddBodyCue( bodyData.GenerateHashtable() );
}
}
// Head Animations
ArrayList headActionSequence = SequenceReader.GetInstance().ReadHeadSequence(action);
if( headActionSequence != null )
{
foreach( object actionData in headActionSequence )
{
ArrayList actionDataList = actionData as ArrayList;
HeadData headData = new HeadData();
headData.Action = action;
headData.Start = Utility.ParseToInt(actionDataList[0]);
headData.ActionKey = actionDataList[1].ToString();
headData.Duration = float.Parse(actionDataList[2].ToString());
if( actionDataList.Count > 3 )
{
//.........这里部分代码省略.........