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();
    }
Beispiel #2
0
 public virtual void End()
 {
     State.SetState(ActionState.End);
     if (CurrentPlayer && CurrentPlayer.state == ActionPlayer.ActionPlayerState.Wait)
     {
         CurrentPlayer.Play();
     }
 }
Beispiel #3
0
        public void DoNoArgsNoResponse_Example()
        {
            ActionPlayer playerVoid = new ActionPlayer("System.Void AssemblyToProcess.SomeClient::DoNoArgsNoResponse()", (IRequestIdentifier)null);

            playerVoid.StartInvocation();
            switch (playerVoid.DetermineTestMode())
            {
            case TestModes.NoMock:
                playerVoid.CallOriginal(new Action(this.DoNoArgsNoResponse_ExampleClone));
                break;

            case TestModes.Record:
                playerVoid.Record(new Action(this.DoNoArgsNoResponse_ExampleClone));
                break;

            case TestModes.Play:
                playerVoid.Play();
                break;
            }
        }
Beispiel #4
0
        public void RecorderVoidWrapper_Example(SomeRequest req)
        {
            ActionPlayer <SomeRequest> player = new ActionPlayer <SomeRequest>("SomeResponse RecorderWrapper(SomeRequest)", new SomeRequestIdentifier());

            player.StartInvocation(req);

            switch (player.DetermineTestMode(req))
            {
            case TestModes.NoMock:
                player.CallOriginal(req, DoSome_ExampleClone);
                break;

            case TestModes.Record:
                player.Record(req, DoSome_ExampleClone);
                break;

            case TestModes.Play:
                player.Play(req);
                break;

            default:
                break;
            }
        }