新手引导适配
判断是否新手放在JsonData中
注释新手引导首次塔受伤的事件广播
5 files modified
13 ■■■■■ changed files
Assets/Scripts/Guide/GuidePanel.cs 2 ●●● patch | view | raw | blame | history
Assets/Scripts/Json/JsonDataCenter.cs 2 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/Agents/HomeBaseAttacker.cs 2 ●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/Level/EndlessWaveManager.cs 2 ●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs 5 ●●●●● patch | view | raw | blame | history
Assets/Scripts/Guide/GuidePanel.cs
@@ -527,7 +527,7 @@
        }
        else if (target.gameObject.name == "FireSkillBtn")
        {
            image_Rim_Rect.anchoredPosition = skillBtnPos;
            image_Rim_Rect.anchoredPosition = skillBtnPos - tmpOffect;
        }
        else
        {
Assets/Scripts/Json/JsonDataCenter.cs
@@ -261,6 +261,8 @@
        /// </summary>
        private static void InitData()
        {
            int guide = PlayerPrefs.GetInt("GemBattleGuide");
            GameConfig.IsNewbie = guide == 0;
            // 必须在EndlessPortData初始化之前
            EndlessEnemyData.Init();
            EndlessPortData.Init();
Assets/Scripts/TowerDefense/Agents/HomeBaseAttacker.cs
@@ -79,7 +79,7 @@
                        {
                            GameConfig.TowerFirstTakeDamage = false;
                            EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessLoseHeart, 1);
                            EndlessLevelManager.instance.StopSecondWave();
                            //EndlessLevelManager.instance.StopSecondWave();
                        }
                        else
                        {
Assets/Scripts/TowerDefense/Level/EndlessWaveManager.cs
@@ -388,7 +388,7 @@
                }
                else if (EndlessUIStart.instance.guideThirdWaveStep)
                {
                    Debug.Log($"当前波次是木属性的 总怪物数量:{TotalEnemies}  当前已经生成了:{SpawnedTotalEnemies * 2}");
                    //Debug.Log($"当前波次是木属性的 总怪物数量:{TotalEnemies}  当前已经生成了:{SpawnedTotalEnemies * 2}");
                    if (TotalEnemies - (SpawnedTotalEnemies * 2) <= 0)
                    {
                        Debug.Log("第三波生成完毕");
Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs
@@ -64,6 +64,7 @@
    protected override void Awake()
    {
        base.Awake();
        //这里为了方便直接使用Endless2D
        GameObject root = GameObject.Find("ManagerRoot");
        if (root == null)
@@ -105,6 +106,7 @@
        Vector2 tmpOffect = new Vector2(0, offect);
        transform.Find("Panel/Bottom").GetComponent<RectTransform>().anchoredPosition += tmpOffect;
        transform.Find("Panel/TowerBuyBtn").GetComponent<RectTransform>().anchoredPosition += tmpOffect;
        transform.Find("Panel/SwitchSpeed").GetComponent<RectTransform>().anchoredPosition += tmpOffect;
        transform.Find("Panel/BossHPBar").GetComponent<RectTransform>().anchoredPosition -= tmpOffect * 0.5f;
        transform.Find("Panel/Score").GetComponent<RectTransform>().anchoredPosition -= tmpOffect * 0.5f;
@@ -118,8 +120,7 @@
        darkGroundImg.SetActive(false);
        //查询是否已经做过了新手引导
        int guide = PlayerPrefs.GetInt("GemBattleGuide");
        GameConfig.IsNewbie = guide == 0;
        // cx test
        //GameConfig.IsNewbie = false;
        if (GameConfig.IsNewbie)