private void OnPlay() { m_bIsPaused = false; if (null == m_FileData) { return; } if (!m_bPlay) { m_bPlay = true; m_ActionId = ActionManager.Instance.InsertAction(m_FileData.ID, m_FileData, m_RuntimeParam.GetRuntimeActionParam(), m_AffectedObjects); m_RuntimeParam.GetRuntimeActionParam().Id = m_ActionId; } ActionPlayer action = ActionManager.Instance.GetAction(m_ActionId); if (null == action || action.IsFinish()) { return; } action.SetActionRunTime(m_fAniTimeValue); action.Play(); }
private void OnPaused() { m_bIsPaused = true; ActionPlayer action = ActionManager.Instance.GetAction(m_ActionId); if (null == action || action.IsFinish()) { return; } action.Pause(); }
private void Update() { if (!m_bPlay) { return; } ActionPlayer action = ActionManager.Instance.GetAction(m_ActionId); if (null == action || action.IsFinish()) { m_bPlay = false; Repaint(); return; } m_fAniTimeValue = action.GetActionRunTime(); Repaint(); }
public void Update() { if (null == m_lstAction || m_lstAction.Count <= 0) { return; } int nCount = m_lstAction.Count; for (int i = nCount - 1; i >= 0; i--) { ActionPlayer action = m_lstAction[i]; if (null == action) { m_lstAction.RemoveAt(i); AddToEndPlayList(action.GetActionId()); continue; } action.Update(); ActionPlayer.EActionState eState = action.GetActionState(); if (eState == ActionPlayer.EActionState.Stop) { action.Destory(); m_lstAction.RemoveAt(i); AddToEndPlayList(action.GetActionId()); continue; } if (action.IsFinish()) { action.Destory(); m_lstAction.RemoveAt(i); AddToEndPlayList(action.GetActionId()); continue; } } }