Ejemplo n.º 1
0
    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();
    }