private void LoadVideo()
        {
            if (null == Player || null == WndRctTransform)
            {
                return;
            }

            videoPathList = ScreenREC.GetInstance().GetWarGloryMomentVideoPathList();

            if (videoPathList == null || videoPathList.Count == 0)
            {
                return;
            }

            videoIndex = 0;
            string path = videoPathList[videoIndex];

            if (path != "")
            {
                if (System.IO.File.Exists(path))
                {
                    Player.OpenVideoFromFile(MediaPlayer.FileLocation.AbsolutePathOrURL, path, false);
                }
                else
                {
                    PlayerNextVideo();
                }
            }
        }
Beispiel #2
0
        //切换REC录制
        public void SwitchRecOpenState(bool bOpen)
        {
            bRecOpen = bOpen;
            SliderObj.SetActive(!bRecOpen);
            int nValue = bRecOpen ? 1 : 0;

            GameSettingConfig.Instance.ModifyGameSetting(GameSettingIndex.OpenScrenRec, nValue.ToString());
            ScreenREC.GetInstance().OpenREC = bRecOpen;
            RefreshTipPart();
        }
Beispiel #3
0
        /// <summary>
        /// 卸载本账号数据
        /// </summary>
        public void UnLoad()
        {
            if (!bInit)
            {
                return;
            }

            ClearData();
            ScreenREC.GetInstance().WarVideoCount   = 0;
            CaptureScreen.GetInstance().WarImgCount = 0;
        }
Beispiel #4
0
        public override void Start()
        {
            base.Start();

            int redPointCount = CaptureScreen.GetInstance().WarImgCount + ScreenREC.GetInstance().WarVideoCount;

            if (null == gloryMomentRedPoint)
            {
                gloryMomentRedPoint = URedPointTip.CreateRedPointObject(MomentBtnObj.GetComponent <RectTransform>(), 100.0f, 20.0f);
                if (gloryMomentRedPoint != null)
                {
                    gloryMomentRedPoint.SetTipCount(redPointCount);
                }
            }
            //m_PlayerFrameWnd.GetSubWnd(PlayerSubWndType.WND_CROWN).SetContainer(UISystem.Instance.GetWndLayerTrans(WndLayerDef.WND_LAYER_FILL));//(this.transform.parent);
        }
Beispiel #5
0
        public override bool Init(IUISubWnd wnd)
        {
            m_timeAxisMap      = new List <string>();
            m_timeAxisItemList = new List <GloryMomentTimeAxisItem>();
            m_videoDataList    = new List <CaptureVideoData>();
            m_ImgDataList      = new List <CaptureImgData>();

            m_currentPageType     = EMGloryMomentPageType.EMPage_Image;
            m_currentDataShowType = EMGloryMomentDataShowType.EMType_All;

            //侦听列表滚动事件,不能用 OnEndScrolling 因为这个是在延迟一定时间后发出的,数据对不上
            GloryMomentList.OnStartScrolling.AddListener(OnGloryMomentListStartScrolling);

            TimeAxisHandle.Init(this);
            ImgShareView.Init(this);
            VideoPlayView.Init(this);

            LogicDataCenter.screenCaptureDataManager.ReLoad();
            bRecOpen       = GameSettingConfig.Instance.GetGameSettingBoolValue(GameSettingIndex.OpenScrenRec);
            RecToggle.isOn = bRecOpen;
            SliderObj.SetActive(!bRecOpen);

            if (PageBtnList.Count() >= 2)
            {
                imgRedPoint = URedPointTip.CreateRedPointObject(PageBtnList[(int)EMGloryMomentPageType.EMPage_Image], RedPointOffset_x, RedPointOffset_y);
                if (imgRedPoint != null)
                {
                    imgRedPoint.SetTipCount(CaptureScreen.GetInstance().WarImgCount);
                }
                videoRedPoint = URedPointTip.CreateRedPointObject(PageBtnList[(int)EMGloryMomentPageType.EMPage_Video], RedPointOffset_x, RedPointOffset_y);
                if (videoRedPoint != null)
                {
                    videoRedPoint.SetTipCount(ScreenREC.GetInstance().WarVideoCount);
                }
            }

            RefreshTimeAxis();
            RefreshDataList();
            RefreshTipPart();

            return(base.Init(wnd));
        }
Beispiel #6
0
    ///// <summary>
    ///// 死亡前的碰撞层
    ///// </summary>
    //private int nOldCollisionLayer = -1;
    // 进入状态
    public bool OnEnter(IntPtr lParam)
    {
        //退出假死状态
        if (m_pFSM != null && m_pFSM.animatorCtrl != null)
        {
            m_pFSM.animatorCtrl.Dying = false;
        }

        Debug.Log("on OnEnter CreaturePosture_Dead " + this.m_pFSM.name);
        if (m_pFSM.showLog)
        {
            Trace.Log(m_pFSM.name + "=======OnEnter CreaturePosture_Dead======");
        }

        cmd_creature_die context = IntPtrHelper.toData <cmd_creature_die>(lParam);

        if (m_pFSM.showLog)
        {
            Trace.Log("DeadInterval:" + context.nDeadInterval);
            Trace.Log("reborn second:" + context.nInterval);
        }



        m_pFSM.rebornTick = context.nInterval - context.nDeadInterval;
        if (m_pFSM.rebornTick <= 0)
        {
            Trace.Log("rebornTick <= 0!");
            //return false;                   吃鸡地图,这个时差是0,所以先不要返回
        }
        m_nDeadInterval = context.nDeadInterval;

        //暂时让角色死亡不让射线检测该层
        //if (!m_pFSM.isHero)
        //{
        //    nOldLayer = m_pFSM.gameObject.layer;
        //    if (m_pFSM.gameObject.layer != LayerMask.NameToLayer(Config.LayerTransparentFX))
        //    {
        //        GameUtil.SetLayer(LayerMask.NameToLayer(Config.LayerNeutrality), m_pFSM.gameObject, true);
        //    }

        //    //m_pFSM.gameObject.layer = LayerMask.NameToLayer(Config.LayerPlayerFriend);
        //    //if (m_pFSM.SkinConfig.ScreenCastObject != null)
        //    //{
        //    //    m_pFSM.SkinConfig.ScreenCastObject.layer = LayerMask.NameToLayer(Config.LayerPlayerFriend);
        //    //}
        //}

        SkillCtrl sk = m_pFSM.GetComponent <SkillCtrl>();

        if (sk)
        {
            sk.enabled = false;
        }

        SoldierController sco = m_pFSM.GetComponent <SoldierController>();

        if (sco)
        {
            sco.dead = true;
        }

        if (m_pFSM.animator)
        {
            m_pFSM.animator.SetTrigger("Dead");

            m_pFSM.animator.ResetTrigger("Reborn");
        }

        //关闭死亡时要求关闭的光效
        LightingEffectManager light = m_pFSM.GetComponent <LightingEffectManager>();

        if (light)
        {
            light.CloseLightingWhenDead();
        }

        startTick = GameLogicAPI.getSyncTickCount(); // GameLogicAPI.getTickCount();
        endTick   = startTick + (uint)m_pFSM.rebornTick;
        tick_cameraSwitchAfterDead = startTick + m_pFSM.cameraSwitchAfterDead;

        if (m_pFSM.isHero)
        {
            //GFxGameHud hud = SFGFxMovieManager.GetWindow<GFxGameHud>();
            //if (SFGFxMovieManager.CheckTheMovieCanUse(hud))
            //{
            //    hud.ShowReliveTime(((float)m_pFSM.rebornTick));
            //}
            ScreenREC.GetInstance().SwitchRECState(ScreenREC.EMRECState.EMREC_STOP);

            //ImageEffects.ImageEffectManager.API_EnableImageEffect<ImageEffects.FullScreenGray>();
            if (ImageSetting.GetData().currImageQuality == ImageQuality.Fastest)
            {
                LightingEffectFactory.EnableDeadEffect();
                ImageEffects.ImageEffectManager.API_DisableImageEffect <ImageEffects.FullScreenSaturation>();
                ImageEffects.ImageEffectManager.API_DisableImageEffect <ImageEffects.DepthOfFieldScatter>();
            }
            else
            {
                LightingEffectFactory.DisableDeadEffect();
                ImageEffects.ImageEffectManager.API_EnableImageEffect <ImageEffects.FullScreenSaturation>();
                ImageEffects.ImageEffectManager.API_DisableImageEffect <ImageEffects.DepthOfFieldScatter>();
            }
        }

        //死亡不碰撞
        if (m_pFSM.controller)
        {
            //nOldCollisionLayer = m_pFSM.gameObject.layer;
            //m_pFSM.gameObject.layer = LayerMask.NameToLayer(Config.LayerIngoreRayCast);
            m_pFSM.pickableCount = 0;
        }

        int nEntityID = m_pFSM.entityID;

        U3D_Render.EntityView ev = EntityFactory.getPlayerViewByID(nEntityID);

        //添加金币掉落光效
        if (GameLogicAPI.isInWarScene() > 0)
        {
            addMoneyEffect(ev, context.uMurderID);
        }

        USpeedUI.Blood.UBloodManager.Instance.OnEntityDead(m_pFSM.entityID, ENTITY_TYPE.TYPE_PLAYER_ROLE);
        // 小地图隐藏
//         U3D_Render.EntityView objev = EntityFactory.getEntityViewByID(m_pFSM.entityID);
//         if (objev != null && GFxMinimapManager.Instance != null)
//         {
//             GFxMinimapManager.Instance.SetObjectVisible(m_pFSM.entityID, objev.createinfo.nMinimapIcon, 0);
//         }
        return(true);
    }