Exemple #1
0
    private void SetUI()
    {
        ClearUI();
        int leftPoints         = UserDC.GetLeftSkillPoints();
        int maxLeftSkillPoints = ConfigM.GetMaxLeftSkillPoints(UserDC.GetVIPLevel());

        NGUIUtil.SetActive(MyHead.SkillPointsFull, false);
        NGUIUtil.SetActive(MyHead.SkillPointsNotFull, false);
        NGUIUtil.SetActive(MyHead.SkillPointsEmpty, false);
        if (leftPoints >= maxLeftSkillPoints)   //技能点数满
        {
            m_wndType = 0;
            NGUIUtil.SetActive(MyHead.SkillPointsFull, true);
        }
        else if (leftPoints < maxLeftSkillPoints && leftPoints > 0)     //技能点数未满
        {
            m_wndType = 1;
            NGUIUtil.SetActive(MyHead.SkillPointsNotFull, true);
        }
        else if (leftPoints == 0)     //技能点数为0
        {
            m_wndType      = 2;
            m_iTotalSecond = ConfigM.GetResumeSkillTime() + GlobalTimer.GetNowTimeInt();
            NGUIUtil.SetActive(MyHead.SkillPointsEmpty, true);
        }

        SetLeftSkillPoint(leftPoints);
        CreateList();
        NGUIUtil.RepositionTable(MyHead.Parent);
    }
Exemple #2
0
    /// <summary>
    /// 刷新计时器变量
    /// </summary>
    private void RefreshCounter()
    {
        PhysicsResumeCounter = PhysicsResumeEnd - GlobalTimer.GetNowTimeInt();
        if (PhysicsResumeCounter < 0)
        {
            ResetPhysicsResume();
        }

        SkillResumeCounter = SkillResumeTotal - GlobalTimer.GetNowTimeInt();
        if (SkillResumeCounter < 0)
        {
            SkillResumeTotal   = ConfigM.GetResumeSkillTime() + GetNowTimeInt();
            SkillResumeCounter = ConfigM.GetResumeSkillTime();
        }

        if (AthleticsTotal > 0)
        {
            AthleticsChallengeCD = AthleticsTotal - GetNowTimeInt();
            if (AthleticsChallengeCD <= 0)
            {
                AthleticsTotal = 0;
            }
        }

        if (GnomeShopCloseTotal > 0)
        {
            GnomeShopCloseCounter = GnomeShopCloseTotal - GetNowTimeInt();
            if (GnomeShopCloseCounter <= 0)
            {
                GnomeShopCloseTotal = 0;
            }
        }

        if (BlackShopCloseTotal > 0)
        {
            BlackShopCloseCounter = BlackShopCloseTotal - GetNowTimeInt();
            if (BlackShopCloseCounter <= 0)
            {
                BlackShopCloseTotal = 0;
            }
        }
    }
Exemple #3
0
    public static void SetServerTime(int seconds)
    {
        if (seconds == -1 || bInit == true)
        {
            return;
        }

        if (bInit == false)
        {
            ServerTimeSeconds = seconds;
            ClientTimeSceonds = Time.realtimeSinceStartup;
            bInit             = true;
        }
        UserInfo info = UserDC.GetPlayer();

        PhysicsResumeEnd = info.Physical_time + ConfigM.GetResumePhysicsTime() - seconds + GetNowTimeInt();
        SkillResumeTotal = info.SkillPointTime + ConfigM.GetResumeSkillTime() - seconds + GetNowTimeInt();

        instance.InvokeRepeating("RefreshCounter", 0f, 1f);
    }
Exemple #4
0
 public static void ResetSkillResume()
 {
     SkillResumeTotal   = ConfigM.GetResumeSkillTime() + GetNowTimeInt();
     SkillResumeCounter = ConfigM.GetResumeSkillTime();
 }