From 6d841802410cff9f5488387c634bfcb62add49cd Mon Sep 17 00:00:00 2001
From: zhangaotian <8474238@qq.com>
Date: Fri, 23 Aug 2024 13:23:22 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90Bug=E3=80=91=E9=92=89=E5=AD=90?=
=?UTF-8?q?=E7=A7=BB=E5=8A=A8=E6=97=B6=E6=9A=82=E5=81=9C=E6=B8=B8=E6=88=8F?=
=?UTF-8?q?bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Forest/Assets/Scripts/Gameplay/LevelState.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Forest/Assets/Scripts/Gameplay/LevelState.cs b/Forest/Assets/Scripts/Gameplay/LevelState.cs
index 36ca39b..d17f411 100644
--- a/Forest/Assets/Scripts/Gameplay/LevelState.cs
+++ b/Forest/Assets/Scripts/Gameplay/LevelState.cs
@@ -153,6 +153,7 @@ namespace Gameplay.Level
{
try
{
+ PutThumbtack();
if (_isMoving)
{
_curThumbtack.Obj.layer = 13;
@@ -171,8 +172,6 @@ namespace Gameplay.Level
RecoverPlankStatus();
}
}
-
- PutThumbtack();
}
catch (Exception e)
{
@@ -180,13 +179,14 @@ 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;
+ _curThumbtack.Obj.transform.position = _target.position;
}
}