Merge commit 'fafc11ad74601a1c4e4b2e28165af25bd19bb5a9' into master
| | |
| | | |
| | | protected override void LateUpdate() |
| | | { |
| | | |
| | | |
| | | } |
| | | |
| | | public override void Initialize() |
| | |
| | | agentTweenSeq.Append(agScale); |
| | | agentTweenSeq.AppendCallback(beDamageStart); |
| | | } |
| | | |
| | | public override void PlayDeath() |
| | | { |
| | | Debug.LogError("---- BubbleBombAgent PlayDeath 正常逻辑不应该打印出这句话 ----"); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | |
| | |
| | | // 每一个被链式攻击的怪物,飘血. |
| | | 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); |
| | |
| | | [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. |
| | |
| | | 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) |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | |
| | | 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++) |
| | | { |
| | |
| | | { |
| | | BubbleBombConfig config = bubbleBombList[i]; |
| | | |
| | | if (config.Agent == null || config.obj == null) continue; |
| | | |
| | | // 泡泡炸弹已经触发了攻击,延时一会过后掉爱心 |
| | | if (config.IsAttack) |
| | | { |
| | |
| | | } |
| | | |
| | | // 更新移动 |
| | | if (config.Agent.CanMove) |
| | | if (config.Agent != null && config.Agent.CanMove) |
| | | { |
| | | Vector3 pos = config.obj.transform.position; |
| | | pos.z -= deltaTime * config.MoveSpeed; |
| | |
| | | config.IsAttack = true; |
| | | config.AttackTime = 0.65f; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // cx test |
| | | Debug.LogError("---- 泡泡炸弹不能移动??? ----"); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | 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(); |
| | |
| | | EndlessUIStart.bFirstLoaded = false; |
| | | EndlessUIStart.bGameStart = false; |
| | | |
| | | TowerPlacementGridEndless.GRID_OPENCASH = 100; |
| | | TowerPlacementGridEndless.GRID_OPENCASH = 200; |
| | | |
| | | SafelyUnsubscribe(); |
| | | SceneManager.LoadScene(menuSceneName); |