From 1067ca27bff23992482742b9fe81a3ed2720f05b Mon Sep 17 00:00:00 2001 From: zhangaotian <8474238@qq.com> Date: Wed, 21 Aug 2024 16:24:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90Bug=E3=80=91=E6=92=A4=E5=9B=9Ebug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Forest/Assets/Scripts/Gameplay/LevelState.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Forest/Assets/Scripts/Gameplay/LevelState.cs b/Forest/Assets/Scripts/Gameplay/LevelState.cs index f53dc40..36ca39b 100644 --- a/Forest/Assets/Scripts/Gameplay/LevelState.cs +++ b/Forest/Assets/Scripts/Gameplay/LevelState.cs @@ -171,6 +171,8 @@ namespace Gameplay.Level RecoverPlankStatus(); } } + + PutThumbtack(); } catch (Exception e) { @@ -178,6 +180,16 @@ namespace Gameplay.Level } } + private void PutThumbtack() + { + if ((LevelManager.Instance.IsPause || LevelManager.Instance.IsOver) && _curThumbtack != null) + { + _curThumbtack.Obj.GetComponent().color = _defaultColor; + LevelManager.Instance.CurUndoState.PreModifiedKong.LevelThumbtack = _curThumbtack; + _curThumbtack = null; + } + } + private void AddorRemoveHj2D() { try