From 9af945552ac077706c175c00ad99dc4dfc662e9d Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Thu, 26 Nov 2020 14:41:19 +0800 Subject: [PATCH] 增加特殊金币掉落 点击飞向左下角 增加技能充满特效 --- Assets/Scripts/UI/FlyImage.cs | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/UI/FlyImage.cs b/Assets/Scripts/UI/FlyImage.cs index 14fa3ca..d4692b0 100644 --- a/Assets/Scripts/UI/FlyImage.cs +++ b/Assets/Scripts/UI/FlyImage.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; using DG.Tweening; +using KTGMGemClient; +using TowerDefense.Level; using UnityEngine; using UnityEngine.UI; @@ -32,7 +34,8 @@ /// <param name="useBezier">是否使用贝塞尔</param> public void SetDestination(Sprite sp, Vector3 startP, Vector3 endP, bool useBezier) { - tmpImage.sprite = sp; + if (sp != null) + tmpImage.sprite = sp; transform.position = startP; ts.localPosition += RandomPos(); if (useBezier) @@ -104,9 +107,13 @@ private void Close() { - //Debug.Log("到终点了,可以消失了"); + Debug.Log("到终点了,可以消失了" + EndlessLevelManager.instance.DropCoin); - gameObject.SetActive(false); + //gameObject.SetActive(false); + + EndlessLevelManager.instance.Currency.AddCurrency(EndlessLevelManager.instance.DropCoin); + + Core.Utilities.Poolable.TryPool(gameObject); } /// <summary> -- Gitblit v1.9.1