public override void step(float deltaTime) { if (m_currentAction == null) { if (getNextAction()) { m_currentAction.start(getTarget()); m_currentAction.step(deltaTime); } else { stop(); } } else { m_currentAction.step(deltaTime); if (m_currentAction.isDone()) { m_currentAction.stop(); m_currentAction = null; } } }
public override void start(System.Object obj) { base.start(obj); m_currentIndex = -1; m_currentAction = null; m_isDone = false; }
private bool getNextAction() { int idx = m_currentIndex + 1; if (idx < m_actionList.Count) { m_currentAction = m_actionList [idx]; m_currentIndex = idx; return(true); } return(false); }
public void addAction(FAction action) { m_actionList.Add(action); }
/// <summary> /// Initializes a new instance of the <see cref="GRepeat"/> class. /// </summary> /// <param name="times">重复次数</param> /// <param name="action">需要重复播放的动画</param> public FRepeat(uint times, FAction action) { setTimes(times); m_innerAction = action; }
public FRepeatForever(FAction action) { m_innerAction = action; }
public static void runAction(this System.Object caller, FAction action) { FActionManager.getInstance().runAction(caller, action); }
public void runAction(System.Object caller, FAction action) { m_actionList.Add(action); action.start(caller); }