调整linkdoor
This commit is contained in:
@@ -179,6 +179,18 @@ namespace BaseGames.Player
|
||||
transform.localScale = new Vector3(dir, 1f, 1f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 强制设定朝向,并同步清零速度,确保传送/出生后不被旧速度立即覆盖。
|
||||
/// dir:+1 = 朝右,-1 = 朝左。
|
||||
/// </summary>
|
||||
public void SetFacingImmediate(int dir)
|
||||
{
|
||||
if (dir == 0) return;
|
||||
_facingDirection = dir;
|
||||
transform.localScale = new Vector3(dir, 1f, 1f);
|
||||
_rb.velocity = Vector2.zero;
|
||||
}
|
||||
|
||||
// ── 取消窗口 ──────────────────────────────────────────────────────────
|
||||
public void SetCancelWindowOpen(bool open) => _cancelWindowOpen = open;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user