Example #1
0
    void OnBoxClick()
    {
        if (false == m_BoxCanGet.activeInHierarchy)
        {
            return;
        }

        Tab_StoryCopySceneChapter tabChapter = TableManager.GetStoryCopySceneChapterByID(m_ChapterId, 0);

        if (tabChapter == null)
        {
            return;
        }

        if (m_AwardIndex < 0 || m_AwardIndex >= JuQingCopySceneData.ChapterAwardStarReq.Length)
        {
            return;
        }

        GameManager.gameManager.PlayerDataPool.JuQingCopySceneData.ReqChapterAward(m_ChapterId, m_AwardIndex);

        if (JuQingWindow.Instance() != null && JuQingWindow.Instance().NewPlayerGuideIndex == 2)
        {
            JuQingWindow.Instance().NewPlayerGuideIndex = GlobeVar.INVALID_ID;
            if (NewPlayerGuidLogic.Instance())
            {
                NewPlayerGuidLogic.CloseWindow();
            }
        }
    }
Example #2
0
    void OnEnable()
    {
        UpdatePVPInfo();
        PVPData.delUpdateMyData += UpdatePVPInfo;

        if (NewPlayerGuidLogic.Instance())
        {
            NewPlayerGuidLogic.CloseWindow();
        }
    }
Example #3
0
    public void CloseWindow()
    {
        m_Item = null;
        //gameObject.SetActive(false);

        // 新手指引如果还在 直接干掉
        if (m_NewPlayerGuideFlag_Step != 0 && NewPlayerGuidLogic.Instance())
        {
            m_NewPlayerGuideFlag_Step = GlobeVar.INVALID_ID;
            NewPlayerGuidLogic.CloseWindow();
        }

        UIManager.CloseUI(UIInfo.ItemTooltipsRoot);
    }
 void OnCloseClick()
 {
     if (m_NewPlayerGuide_Step == 2)
     {
         if (MenuBarLogic.Instance())
         {
             MenuBarLogic.Instance().NewPlayerGuide(101);
         }
     }
     UIManager.CloseUI(UIInfo.Restaurant);
     if (NewPlayerGuidLogic.Instance() != null)
     {
         NewPlayerGuidLogic.CloseWindow();
     }
 }
Example #5
0
 public void NewPlayerGuide(int nIndex)
 {
     if (NewPlayerGuidLogic.Instance() != null ||
         NewItemGetLogic.Instance() != null)
     {
         return;
     }
     // 新手指引已打开
     if (NewPlayerGuidLogic.IsOpenFlag == false)
     {
         switch (nIndex)
         {
         case 1:
             NewPlayerGuidLogic.OpenWindow(m_EquipButton.gameObject, 180, 80, "", "left", 0, true, true);
             break;
         }
         m_NewPlayerGuide_Step = nIndex;
     }
 }
    void HandleMission()
    {
        NewPlayerGuideIndex = 0;
        if (NewPlayerGuidLogic.Instance())
        {
            NewPlayerGuidLogic.CloseWindow();
        }

        bool isHaveMission = GameManager.gameManager.MissionManager.IsHaveMission(m_nMissionID);

        if (isHaveMission)
        {
            MissionState misState = (MissionState)GameManager.gameManager.MissionManager.GetMissionState(m_nMissionID);
            if (MissionState.Mission_Accepted == misState)
            {
                GameManager.gameManager.MissionManager.SetMissionParam(m_nMissionID, 0, 1);
                GameManager.gameManager.MissionManager.SetMissionState(m_nMissionID, 2);
            }
        }
    }
Example #7
0
    public void PlayerFrameHeadOnClick()
    {
        if (GameManager.gameManager.RunningScene == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FB_CABALINTRO)
        {
            return;
        }

        if (MenuBarLogic.Instance())
        {
            MenuBarLogic.Instance().PlayTween(m_bFold);
        }
        PlayTween();
        SwitchAllWhenPopUIShow(!m_bFold);
        if (!m_bFold)
        {
            if (MenuBarLogic.Instance() != null && MenuBarLogic.Instance().NewButtonEffectFlag == true)
            {
                MenuBarLogic.Instance().StopNewButtonEffect();
            }
        }

        m_bFold = !m_bFold;
        if (NewPlayerGuidLogic.Instance())
        {
            NewPlayerGuidLogic.CloseWindow();
        }

        if (m_RemindNum.activeSelf)
        {
            m_CurRemindNum = 0;
            //m_RemindNum.SetActive(false);
            //m_RemindNumLabel.text = "";
            UpdateRemainNum();

            if (MenuBarLogic.Instance() != null)
            {
                MenuBarLogic.Instance().PlayNewButtonEffect();
            }
        }
    }
Example #8
0
    void OnLevel1Clicked()
    {
        var chapterInfoList = GameManager.gameManager.PlayerDataPool.JuQingCopySceneData.GetChapterInfoList();

        if (chapterInfoList == null || currentSelectedChapterIdx <= 0 || currentSelectedChapterIdx > chapterInfoList.Count)
        {
            return;
        }
        StoryCopySceneChapterInfo currentChapterInfo = chapterInfoList[currentSelectedChapterIdx - 1];
        int levelID = currentChapterInfo._ContaindLevelList [0];

        if (GameManager.gameManager.PlayerDataPool.JuQingCopySceneData.IsStoryCopySceneLocked(levelID))
        {
            GUIData.AddNotifyData("#{11143}");
            return;
        }

        UIManager.ShowUI(UIInfo.StoryCopySceneInfoRoot, SetStoryCopySceneInfoWindowData, levelID);

        if (NewPlayerGuidLogic.Instance())
        {
            NewPlayerGuidLogic.CloseWindow();
        }
    }
Example #9
0
    void OpenChest()
    {
        if (m_juqingwindow != null)
        {
            m_juqingwindow.GetComponent <JuQingWindow>().m_nChapterId  = m_ChapterId;
            m_juqingwindow.GetComponent <JuQingWindow>().m_nAwardIndex = m_AwardIndex;
        }
        if (m_bCanGet)
        {
            btnClaim.GetComponent <UIImageButton>().isEnabled = true;
        }
        else
        {
            btnClaim.GetComponent <UIImageButton>().isEnabled = false;
        }
        Tab_StoryCopySceneAward tabAward = GetChapterAwardTab();

        UpdateChestRewards(tabAward);
        chestDialog.SetActive(true);
        if (NewPlayerGuidLogic.Instance())
        {
            NewPlayerGuidLogic.CloseWindow();
        }
    }
Example #10
0
    /// <summary>
    /// 按下/抬起响应
    /// </summary>
    /// <param name='bPressed'>
    /// 是否被按下
    /// </param>
    void OnPress(bool bPressed)
    {
        if (!ProcessInput.IsProcessInput)
        {
            return;
        }

#if UNITY_EDITOR
        if (m_NewPlayerStep == 1 &&
            NewPlayerGuidLogic.Instance() != null &&
            NewPlayerGuidLogic.Instance().gameObject.activeInHierarchy)
        {
            m_NewPlayerStep = 0;
            GameManager.gameManager.SoundManager.StopSoundEffect(226);
            if (SkillBarLogic.Instance() != null)
            {
                SkillBarLogic.Instance().NewPlayerGuide(2);
            }
        }
        if (m_NewPlayerStep == 2)
        {
            m_NewPlayerStep = 0;
            //GameManager.gameManager.SoundManager.StopSoundEffect(232);
            NewPlayerGuidLogic.CloseWindow();
        }
        if (m_NewPlayerStep == 3)
        {
            m_NewPlayerStep = 0;
            //GameManager.gameManager.SoundManager.StopSoundEffect(232);
            NewPlayerGuidLogic.CloseWindow();
        }
        if (!Singleton <ObjManager> .GetInstance().MainPlayer.IsDie() && !UIManager.IsSubUIShow())
        {
            if (!Singleton <ObjManager> .GetInstance().MainPlayer.BaseAttr.Die)
            {
                if (bPressed)
                {
                    // 重置移动后事件
                    if (Singleton <ObjManager> .GetInstance().MainPlayer)
                    {
                        Singleton <ObjManager> .GetInstance().MainPlayer.MoveOverEvent.Reset();
                    }

                    // 记录鼠标位置
                    m_MouseBuffer = Input.mousePosition;
                    // 拖动时重设精灵透明度
                    m_JoyStickSprite.alpha = 1.0f;
                    m_BackGround1.alpha    = 1.0f;
                    m_BackGround2.alpha    = 1.0f;
                    m_BackGround1.gameObject.transform.localScale = new Vector3(1.2f, 1.2f, 1.0f);
                    if (null != m_BackGround1.gameObject.GetComponent <Spin>())
                    {
                        m_BackGround1.gameObject.GetComponent <Spin>().enabled = true;
                    }

                    // 重置Tween动画
                    TweenPosition nTween = gameObject.GetComponent <TweenPosition>();
                    if (null != nTween)
                    {
                        nTween.from = gameObject.transform.localPosition;
                        nTween.Reset();
                    }
                }
                else
                {
                    // 恢复摇杆精灵透明度
                    m_JoyStickSprite.alpha = 0.5f;
                    m_BackGround1.alpha    = 0.5f;
                    m_BackGround2.alpha    = 0.5f;
                    m_BackGround1.gameObject.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
                    if (null != m_BackGround1.gameObject.GetComponent <Spin>())
                    {
                        m_BackGround1.gameObject.GetComponent <Spin>().enabled = false;
                    }
                    // 发送摇杆状态-复位 玩家不再移动
                    m_ProcessInput.ResetStickState();

                    // 播放Tween动画摇杆回归
                    TweenPosition nTween = gameObject.GetComponent <TweenPosition>();
                    if (null != nTween)
                    {
                        nTween.from = gameObject.transform.localPosition;
                        nTween.Play();
                    }
                }
            }
        }
#endif
    }
Example #11
0
    void UpdateWithTouch()
    {
        // 特殊判断 如果新手指引开着 且有屏蔽 防止在设备上按到摇杆
        if (m_NewPlayerStep == 0 &&
            NewPlayerGuidLogic.Instance() != null &&
            NewPlayerGuidLogic.Instance().gameObject.activeInHierarchy&&
            NewPlayerGuidLogic.Instance().IsMaskEnable)
        {
            return;
        }

        if (m_FingerID == -1)
        {
            if (null == UICamera.mainCamera)
            {
                return;
            }

            for (int i = 0; i < Input.touchCount; i++)
            {
                Touch      touch       = Input.GetTouch(i);
                Vector3    vecTouchPos = touch.position;
                Ray        rayTouch    = UICamera.mainCamera.ScreenPointToRay(vecTouchPos);
                RaycastHit hitTouch;
                if (Physics.Raycast(rayTouch, out hitTouch))
                {
                    // 如果点中二级界面 拦截 打开二级菜单时摇杆隐藏 取消判断 防止出错
//                     if (hitTouch.collider.gameObject.tag == "SubUI")
//                     {
//                         return;
//                     }
                    // 点中摇杆
                    if (hitTouch.collider.gameObject.transform.parent == gameObject.transform.parent)
                    {
                        if (touch.phase == TouchPhase.Began)
                        {
                            if (m_NewPlayerStep == 1 &&
                                NewPlayerGuidLogic.Instance() != null &&
                                NewPlayerGuidLogic.Instance().gameObject.activeInHierarchy)
                            {
                                m_NewPlayerStep = 0;

                                if (SkillBarLogic.Instance() != null)
                                {
                                    SkillBarLogic.Instance().NewPlayerGuide(2);
                                }
                            }
                            if (m_NewPlayerStep == 2)
                            {
                                m_NewPlayerStep = 0;
                                //GameManager.gameManager.SoundManager.StopSoundEffect(232);
                                NewPlayerGuidLogic.CloseWindow();
                            }
                            if (m_NewPlayerStep == 3)
                            {
                                m_NewPlayerStep = 0;
                                //GameManager.gameManager.SoundManager.StopSoundEffect(232);
                                NewPlayerGuidLogic.CloseWindow();
                            }
                            // 记录fingerID
                            m_FingerID = touch.fingerId;
                            ProcessInput.Instance().SceneTouchFingerID = -1;
                            //m_JoyStickCamera.GetComponent<UICamera>().JoyStickFingerID = m_FingerID;
                            // 摇杆开始移动
                            JoyStickStartMove();

#if (UNITY_ANDROID || UNITY_WP8) && !UNITY_EDITOR
                            _differenceX = touch.position.x;
                            _differenceY = touch.position.y;
#endif
                        }
                    }
                }
            }
        }
        else
        {
            for (int i = 0; i < Input.touchCount; i++)
            {
                Touch touch = Input.GetTouch(i);
                if (touch.fingerId == m_FingerID && touch.phase == TouchPhase.Moved)
                {
#if (UNITY_ANDROID || UNITY_WP8) && !UNITY_EDITOR
                    JoyStickInMoving(touch.position);
#else
                    JoyStickInMoving(touch.deltaPosition);
#endif
                }
                else if (touch.fingerId == m_FingerID && touch.phase == TouchPhase.Ended)
                {
                    m_FingerID = -1;
                    //m_JoyStickCamera.GetComponent<UICamera>().JoyStickFingerID = m_FingerID;
                    JoyStickEndMove();
                }
            }
        }
    }