本文整理汇总了C#中EZTransition.Start方法的典型用法代码示例。如果您正苦于以下问题:C# EZTransition.Start方法的具体用法?C# EZTransition.Start怎么用?C# EZTransition.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EZTransition
的用法示例。
在下文中一共展示了EZTransition.Start方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StartTransition
/// <summary>
/// Starts one of the panel's "bring in" or "dismiss" transitions.
/// </summary>
/// <param name="mode">The mode corresponding to the transition that should be played.</param>
public virtual void StartTransition(UIPanelManager.SHOW_MODE mode)
{
if (!m_started)
Start();
// Finish any pending transition:
if (prevTransition != null)
prevTransition.StopSafe();
prevTransIndex = (int)mode;
if (blockInput[prevTransIndex])
UIManager.instance.LockInput();
prevTransition = Transitions.list[prevTransIndex];
// Activate all children, if we were set to deactivate
// them on dismissal:
if (deactivateAllOnDismiss)
{
if (mode == UIPanelManager.SHOW_MODE.BringInBack ||
mode == UIPanelManager.SHOW_MODE.BringInForward)
{
#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
gameObject.SetActive(true);
#else
gameObject.SetActiveRecursively(true);
#endif
Start();
}
}
prevTransition.Start();
}
示例2: QueueTransition
// Queues a transition to play following the previous (currently-running) transition
protected void QueueTransition(int newState, int prevState, bool suppressTransition)
{
if (deleted)
return;
nextTransition = transitions[newState].list[DetermineNextTransition(newState, prevState)];
nextState = (CONTROL_STATE)newState;
if (suppressTransition)
{
prevTransition.End();
prevTransition = nextTransition;
prevTransition.Start();
prevTransition.End(); // Immediately place the transition into its "end state".
return;
}
// See if we've already queued to run a follow-up transition:
if (!transitionQueued)
prevTransition.AddTransitionEndDelegate(RunFollowupTrans);
transitionQueued = true;
}
示例3: StartTransition
// Starts the appropriate transition
protected void StartTransition(int newState, int prevState)
{
int transIndex = 0;
// What state are we now in?
switch(newState)
{
case 0: // Normal
// Where did we come from?
switch(prevState)
{
case 1: // Over
transIndex = 0;
break;
case 2: // Active
transIndex = 1;
break;
case 3: // Disabled
transIndex = 2;
break;
}
break;
case 1: // Over
// Where did we come from?
switch (prevState)
{
case 0: // Normal
transIndex = 0;
break;
case 2: // Active
transIndex = 1;
break;
}
break;
case 2: // Active
// Where did we come from?
switch (prevState)
{
case 0: // Normal
transIndex = 0;
break;
case 1: // Over
transIndex = 1;
break;
}
break;
case 3: // Disabled
// Where did we come from?
switch (prevState)
{
case 0: // Normal
transIndex = 0;
break;
case 1: // Over
transIndex = 1;
break;
case 2: // Active
transIndex = 2;
break;
}
break;
}
prevTransition = transitions[newState].list[transIndex];
prevTransition.Start();
}
示例4: StartTransition
// Starts the appropriate transition
protected void StartTransition(int newState, int prevState)
{
int transIndex = DetermineNextTransition(newState, prevState);
prevTransition = transitions[newState].list[transIndex];
prevTransition.Start();
}
示例5: RunFollowupTrans
// Runs a follow-up transition to the one which just completed
protected void RunFollowupTrans(EZTransition trans)
{
if (deleted)
{
trans.RemoveTransitionEndDelegate(RunFollowupTrans);
return;
}
prevTransition = nextTransition;
nextTransition = null;
trans.RemoveTransitionEndDelegate(RunFollowupTrans);
transitionQueued = false;
if(prevTransition != null)
prevTransition.Start();
}
示例6: RunFollowupTrans
// Runs a follow-up transition to the one which just completed
protected void RunFollowupTrans(EZTransition trans)
{
if (deleted)
{
trans.RemoveTransitionEndDelegate(RunFollowupTrans);
return;
}
prevTransition = transitions[(int)controlState].list[nextTransition];
prevTransition.Start();
transitionQueued = false;
trans.RemoveTransitionEndDelegate(RunFollowupTrans);
}