chenxin
2020-11-20 09053388ef6d58a7de59fab450c11ee0affbceb2
Merge commit 'fafc11ad74601a1c4e4b2e28165af25bd19bb5a9' into master
6 files modified
65 ■■■■■ changed files
Assets/Scripts/TowerDefense/Agents/BubbleBombAgent.cs 7 ●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/Level/AgentInsManager.cs 33 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/Towers/Placement/TowerPlacementGridEndless.cs 8 ●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs 9 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/EndlessBossSkill/EndlessBossSkillManager.cs 6 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/EndlessSettlement.cs 2 ●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/Agents/BubbleBombAgent.cs
@@ -103,7 +103,7 @@
        protected override void LateUpdate()
        {
        }
        public override void Initialize()
@@ -117,5 +117,10 @@
            agentTweenSeq.Append(agScale);
            agentTweenSeq.AppendCallback(beDamageStart);
        }
        public override void PlayDeath()
        {
            Debug.LogError("---- BubbleBombAgent PlayDeath 正常逻辑不应该打印出这句话 ----");
        }
    }
}
Assets/Scripts/TowerDefense/Level/AgentInsManager.cs
@@ -865,21 +865,29 @@
        {
            Agent eag = listAg[ti];
            if (eag == ag) continue;
            Vector3 fpos = eag.transform.position;
            tpos.y = 0;
            fpos.y = 0;
            if (Vector3.Distance(tpos, fpos) < 8)
            if (eag.AgentType == SpawnAgentType.BubbleBomb)
            {
                eag.TakeDamage(damage, fpos, null);
                if (!eag.opponentAgent)
                EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessBossSkillBubbleBombGetHit, (eag as BubbleBombAgent).Id);
            }
            else
            {
                Vector3 fpos = eag.transform.position;
                tpos.y = 0;
                fpos.y = 0;
                if (Vector3.Distance(tpos, fpos) < 8)
                {
                    if (GameUI.instanceExists)
                        GameUI.instance.generateBloodText(fpos, damage, false, false);
                    else if (EndlessGameUI.instanceExists)
                        EndlessGameUI.instance.generateBloodText(fpos, damage, false, false);
                    eag.TakeDamage(damage, fpos, null);
                    if (!eag.opponentAgent)
                    {
                        if (GameUI.instanceExists)
                            GameUI.instance.generateBloodText(fpos, damage, false, false);
                        else if (EndlessGameUI.instanceExists)
                            EndlessGameUI.instance.generateBloodText(fpos, damage, false, false);
                    }
                    if (eag.isDead)
                        ++deathCount;
                }
                if (eag.isDead)
                    ++deathCount;
            }
        }
@@ -940,6 +948,7 @@
        // 每一个被链式攻击的怪物,飘血.
        foreach (Agent ag in listBlood)
        {
            if (ag.AgentType != SpawnAgentType.Normal) continue;
            int tid = ag.liveID;
            Damager damager = ag.GetComponent<Damager>();
            ag.TakeDamage(chainAttackHurt, ag.position, alignment);
Assets/Scripts/TowerDefense/Towers/Placement/TowerPlacementGridEndless.cs
@@ -16,7 +16,7 @@
    [RequireComponent(typeof(BoxCollider))]
    public class TowerPlacementGridEndless : MonoBehaviour, IPlacementArea
    {
        public static float GRID_OPENCASH = 100;
        public static float GRID_OPENCASH = 200;
        /// <summary>
        /// Prefab used to visualise the grid.
@@ -642,7 +642,7 @@
            m_arrTGO = new EndlessTowerGridOpen[dimensions.x, dimensions.y];
            GameObject container = GameObject.Find("BuyButtonContainer");
            TowerPlacementGridEndless.GRID_OPENCASH = 100;
            TowerPlacementGridEndless.GRID_OPENCASH = 200;
            //Debug.Log("修改了数值:" + TowerPlacementGridEndless.GRID_OPENCASH);
            //float[] xup = { -0.6f, -0.3f, 0, 0.3f, 0.6f };
            for (int x = 0; x < dimensions.x; ++x)
@@ -674,7 +674,7 @@
                    if (tgo)
                    {
                        tgo.SetBuyBtnInfo(x, y, this);
                        tgo.cashText.SetText(TowerPlacementGrid.GRID_OPENCASH_SELF.ToString());
                        tgo.cashText.SetText(TowerPlacementGridEndless.GRID_OPENCASH.ToString());
                        m_arrTGO[x, y] = tgo;
                    }
                }
@@ -812,7 +812,7 @@
        public void updateGridOpenCoin(int ix, int iy)
        {
            GRID_OPENCASH = Mathf.Floor(GRID_OPENCASH * 1.2f);
            GRID_OPENCASH = Mathf.Floor(GRID_OPENCASH * 1.25f);
            for (int x = 0; x < dimensions.x; x++)
            {
Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs
@@ -376,6 +376,8 @@
            {
                BubbleBombConfig config = bubbleBombList[i];
                if (config.Agent == null || config.obj == null) continue;
                // 泡泡炸弹已经触发了攻击,延时一会过后掉爱心
                if (config.IsAttack)
                {
@@ -420,7 +422,7 @@
                }
                // 更新移动
                if (config.Agent.CanMove)
                if (config.Agent != null && config.Agent.CanMove)
                {
                    Vector3 pos = config.obj.transform.position;
                    pos.z -= deltaTime * config.MoveSpeed;
@@ -432,11 +434,6 @@
                        config.IsAttack = true;
                        config.AttackTime = 0.65f;
                    }
                }
                else
                {
                    // cx test
                    Debug.LogError("---- 泡泡炸弹不能移动??? ----");
                }
            }
        }
Assets/Scripts/TowerDefense/UI/EndlessBossSkill/EndlessBossSkillManager.cs
@@ -206,13 +206,15 @@
        {
            if (isPaused) return;
            cdList.Clear();
            waitList.Clear();
            for (int i = 0; i < skillList.Count; ++i)
            {
                skillList[i].Reset();
                waitList.Add(skillList[i]);
            }
            cdList.Clear();
            waitList.Clear();
            isPaused = true;
            ChangeState(EndlessBossSkillState.Init);
            ClearEvent();
Assets/Scripts/TowerDefense/UI/EndlessSettlement.cs
@@ -62,7 +62,7 @@
            EndlessUIStart.bFirstLoaded = false;
            EndlessUIStart.bGameStart = false;
            TowerPlacementGridEndless.GRID_OPENCASH = 100;
            TowerPlacementGridEndless.GRID_OPENCASH = 200;
            SafelyUnsubscribe();
            SceneManager.LoadScene(menuSceneName);