예제 #1
0
파일: NormalObstacle.cs 프로젝트: LynnPi/SS
 public override void OnTriggerEnter(Collider other)
 {
     if (other.tag == ClientConfig.TAG_PLAYER)
     {
         base.OnTriggerEnter(other);
         CurrPlayer.OnBlockedOff();
         CurrPlayer.CurrentRole.PlayAnimation(Role.AnimState.Any_To_Hit);
     }
 }
예제 #2
0
 public void FastVideo()
 {
     try
     {
         int speed = Framework.Container.Instance.VideoPlayService.SetPlaySpeedAdd(CurrPlayer.HWnd);
         CurrPlayer.SetStatusText(GetSpeedText(speed));
         UpdateButtonStatus(CurrPlayer.HWnd);
     }
     catch (SDKCallException ex)
     {
         Common.SDKCallExceptionHandler.Handle(ex, "视频快放", false);
     }
 }
예제 #3
0
 public void NextFrameVideo()
 {
     try
     {
         Framework.Container.Instance.VideoPlayService.VideoControl(CurrPlayer.HWnd, E_VDA_PLAYCTRL_TYPE.E_PLAYCTRL_STEP, 0);
         CurrPlayer.SetStatusText("下一帧");
         UpdateButtonStatus(CurrPlayer.HWnd);
     }
     catch (SDKCallException ex)
     {
         Common.SDKCallExceptionHandler.Handle(ex, "视频下一帧");
     }
 }
예제 #4
0
 public void StopVideo()
 {
     try
     {
         Framework.Container.Instance.VideoPlayService.VideoControl(CurrPlayer.HWnd, E_VDA_PLAYCTRL_TYPE.E_PLAYCTRL_STOP, 0);
         CurrPlayer.SetStatusText("停止");
         CurrPlayer.EnabledEx = false;
         UpdateButtonStatus(CurrPlayer.HWnd);
     }
     catch (SDKCallException ex)
     {
         Common.SDKCallExceptionHandler.Handle(ex, "停止播放视频");
     }
 }
예제 #5
0
 public void ContinueVideo()
 {
     try
     {
         VideoStatusInfo e = Framework.Container.Instance.VideoPlayService.GetPlayStatus(CurrPlayer.HWnd);
         Framework.Container.Instance.VideoPlayService.VideoControl(CurrPlayer.HWnd, E_VDA_PLAYCTRL_TYPE.E_PLAYCTRL_RESUME, 0);
         CurrPlayer.SetStatusText(GetSpeedText((int)e.PlaySpeed));
         UpdateButtonStatus(CurrPlayer.HWnd);
     }
     catch (SDKCallException ex)
     {
         Common.SDKCallExceptionHandler.Handle(ex, "恢复播放视频");
     }
 }
예제 #6
0
 public void CloseVideo()
 {
     try
     {
         Framework.Container.Instance.VideoPlayService.StopVideo(CurrPlayer.HWnd);
         CurrPlayer.PlayVideoName = "";
         CurrPlayer.EnabledEx     = false;
         CurrPlayer.SetStatusText("");
         TimeInfo = "00:00:00/00:00:00";
         UpdateButtonStatus(CurrPlayer.HWnd);
     }
     catch (SDKCallException ex)
     {
         Common.SDKCallExceptionHandler.Handle(ex, "关闭视频");
     }
 }
예제 #7
0
        public void PlayOrPauseVideo(bool canReplay = true)
        {
            try
            {
                VideoStatusInfo e
                    = Framework.Container.Instance.VideoPlayService.GetPlayStatus(CurrPlayer.HWnd);

                if (e.PlayState == VideoStatusType.E_NORMAL)
                {
                    Framework.Container.Instance.VideoPlayService.VideoControl(CurrPlayer.HWnd, E_VDA_PLAYCTRL_TYPE.E_PLAYCTRL_PAUSE, 0);
                    CurrPlayer.SetStatusText("暂停");
                }
                else if (e.PlayState == VideoStatusType.E_PAUSE)
                {
                    Framework.Container.Instance.VideoPlayService.VideoControl(CurrPlayer.HWnd, E_VDA_PLAYCTRL_TYPE.E_PLAYCTRL_RESUME, 0);
                    CurrPlayer.SetStatusText(GetSpeedText((int)e.PlaySpeed));
                }
                else if (e.PlayState == VideoStatusType.E_STOP)
                {
                    if (canReplay)
                    {
                        Framework.Container.Instance.VideoPlayService.VideoControl(CurrPlayer.HWnd, E_VDA_PLAYCTRL_TYPE.E_PLAYCTRL_START, 0);
                        CurrPlayer.EnabledEx = true;
                        CurrPlayer.SetStatusText("");
                    }
                }
                else if (e.PlayState == VideoStatusType.E_SPEED)
                {
                    Framework.Container.Instance.VideoPlayService.VideoControl(CurrPlayer.HWnd, E_VDA_PLAYCTRL_TYPE.E_PLAYCTRL_PAUSE, 0);
                    CurrPlayer.SetStatusText("暂停");
                }
                else if (e.PlayState == VideoStatusType.E_STEP || e.PlayState == VideoStatusType.E_STEP_BACK)
                {
                    Framework.Container.Instance.VideoPlayService.VideoControl(CurrPlayer.HWnd, E_VDA_PLAYCTRL_TYPE.E_PLAYCTRL_RESUME, 0);
                    CurrPlayer.SetStatusText(GetSpeedText((int)e.PlaySpeed));
                }

                VideoStatusInfo e1
                    = Framework.Container.Instance.VideoPlayService.GetPlayStatus(CurrPlayer.HWnd);
                SetPlayVideoBtnStatus(e1);
            }
            catch (SDKCallException ex)
            {
                Common.SDKCallExceptionHandler.Handle(ex, "播放或暂停视频");
            }
        }