Merge branch 'main' into iOS_release

iOS_release
zhangaotian 2024-08-23 13:25:26 +08:00
commit 6f51f8417e
1 changed files with 5 additions and 5 deletions

View File

@ -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
}
}
/// <summary>
/// 暂停时提前放置钉子
/// </summary>
private void PutThumbtack()
{
if ((LevelManager.Instance.IsPause || LevelManager.Instance.IsOver) && _curThumbtack != null)
{
_curThumbtack.Obj.GetComponent<SpriteRenderer>().color = _defaultColor;
LevelManager.Instance.CurUndoState.PreModifiedKong.LevelThumbtack = _curThumbtack;
_curThumbtack = null;
_curThumbtack.Obj.transform.position = _target.position;
}
}