chenxin
2020-12-12 9e0ad4beb3ec784d54e42b013af20b0f1924ae81
Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs
@@ -166,20 +166,22 @@
        int guide = PlayerPrefs.GetInt("GemBattleGuide");
        GameConfig.IsNewbie = guide == 0;
        //GameConfig.IsNewbie = true;
        //GameConfig.IsNewbie = false;
        GameConfig.IsNewbieStart = GameConfig.IsNewbie;
        if (GameConfig.IsNewbie)
        {
            EndlessRandomTower.instance.SetCountDown(false);
            Debug.Log("开始新手引导");
            GameConfig.CanDragTower = false;
            Pause();
            HideUIMask();
            countDownTextNew.text = "";
            countDownTextNew.gameObject.SetActive(false);
            //GameObject go = Resources.Load<GameObject>("UI/Guide/GuidePanel");
            GameObject guideObj = Instantiate(Resources.Load<GameObject>("UI/Guide/GuidePanel"), transform.Find("Panel"));
            GameObject prefab = Resources.Load<GameObject>("UI/Guide/GuidePanel");
            GameObject guideObj = Instantiate(prefab, transform.Find("Panel"));
            guideObj.GetComponent<RectTransform>().offsetMin += tmpOffect;
            AddGuideEvent();
        }
@@ -509,6 +511,10 @@
            AgentInsManager.instance.ExecAllWavelineAttack(fireSkillID, GameConfig.SkillLevel, false);
            ++GameConfig.EndlessPortUseSkillTowerCount;
        }
        else
        {
            AudioSourceManager.Ins.Play(AudioEnum.UIDisable);
        }
    }
    public void GuideEnergyUp(int count)
@@ -534,7 +540,7 @@
            if (GameConfig.EnergyCount == energyMax)
            {
                Debug.Log("能量已满");
                //Debug.Log("能量已满");
                if (fireSkillBgImg.color != disColor)
                {
                    fireSkillBgImg.color = disColor;
@@ -544,7 +550,7 @@
            }
            else
            {
                Debug.Log("能量达到一次使用");
                //Debug.Log("能量达到一次使用");
                if (fireSkillBgImg.color != normalColor)
                {
                    fireSkillBgImg.color = normalColor;
@@ -555,6 +561,7 @@
        }
        else
        {
            //Debug.Log("能量不够");
            if (fireSkillBgImg.color != normalColor)
            {
                fireSkillBgImg.color = normalColor;
@@ -612,6 +619,8 @@
    public bool IsGameRunning { get { return !isPause; } }
    private bool isUpgradeTowerLevel;
    // Update is called once per frame
    void Update()
    {
@@ -630,6 +639,13 @@
        if (bGameStart)
        {
            startTime += Time.deltaTime;
            if (!isUpgradeTowerLevel && startTime >= JsonDataCenter.DOUBLE_GEM_TIME)
            {
                EndlessRandomTower.instance.UpdateDescDisplay();
                isUpgradeTowerLevel = true;
            }
            timeTextNew.text = ConvertTime((float)Math.Ceiling(startTime));
        }