From 40a2cbb83c4d0485ed52d4d87db78bb3c0e3fcbb Mon Sep 17 00:00:00 2001 From: River Jiang <546213258@qq.com> Date: Wed, 21 Oct 2020 19:35:55 +0800 Subject: [PATCH] 隐藏子弹条. --- Assets/Scripts/TowerDefense/UI/BulletUICtl.cs | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Assets/Scripts/TowerDefense/UI/BulletUICtl.cs b/Assets/Scripts/TowerDefense/UI/BulletUICtl.cs index 114c314..0e7f4ff 100644 --- a/Assets/Scripts/TowerDefense/UI/BulletUICtl.cs +++ b/Assets/Scripts/TowerDefense/UI/BulletUICtl.cs @@ -1,4 +1,5 @@ using DG.Tweening; +using Protobuf; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -31,10 +32,11 @@ /// </summary> public void resetToMaxBullet() { + if (this.curBulletNum == maxBulletNum) return; + this.curBulletNum = maxBulletNum; this.updateBulletUI(curBulletNum, maxBulletNum); } - /// <summary> /// 减少子弹,返回减少后的子弹数目。 -- Gitblit v1.9.1