From fe4457c2ff07dcea1cccd6886188a334ef9c196b Mon Sep 17 00:00:00 2001 From: chenxin <chenxin6991@163.com> Date: Fri, 06 Nov 2020 01:54:23 +0800 Subject: [PATCH] 无尽模式上阵宝石位置互换 火技能特效销毁时间调整 --- Assets/Scripts/TowerDefense/Towers/Tower.cs | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/Assets/Scripts/TowerDefense/Towers/Tower.cs b/Assets/Scripts/TowerDefense/Towers/Tower.cs index a7b21a7..7585261 100644 --- a/Assets/Scripts/TowerDefense/Towers/Tower.cs +++ b/Assets/Scripts/TowerDefense/Towers/Tower.cs @@ -124,6 +124,8 @@ /// </summary> protected int progressOffset = 0; + public bool PlayWaveLineFlash { get; set; } = true; + /// <summary> /// 塔防数据的局内升级 /// </summary> @@ -242,7 +244,7 @@ else if (EndlessLevelManager.instanceExists) { EndlessLevelManager.instance.SetTowerAttID(gridPosition.x, attributeId, this.currentLevel); - EndlessWaveLineManager.instance.AttackTowerFixed(gridPosition.x); + EndlessWaveLineManager.instance.AttackTowerFixed(gridPosition.x, PlayWaveLineFlash); } } @@ -460,6 +462,15 @@ /// </summary> public Action towerDestroyed; + /// <summary> + /// 放置到目标位置 + /// </summary> + /// <param name="destination"></param> + public virtual void SetToDestination(IntVector2 destination) + { + gridPosition = destination; + transform.position = placementArea.GridToWorld(destination, dimensions); + } /// <summary> /// Provide the tower with data to initialize with -- Gitblit v1.9.1