调整
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Cielonos.MainGame.Characters
|
||||
public CinemachineStateDrivenCamera stateDrivenCamera;
|
||||
public CinemachineCamera freeLookCamera;
|
||||
public CinemachineCamera lockOnCamera;
|
||||
public bool isLockedOn = false;
|
||||
[FormerlySerializedAs("isLockedOn")] public bool isLockingTarget = false;
|
||||
public bool isLockedSetRoot;
|
||||
public CharacterBase testEnemy;
|
||||
public Transform testEnemyTarget;
|
||||
@@ -43,7 +43,7 @@ namespace Cielonos.MainGame.Characters
|
||||
{
|
||||
if (Keyboard.current.tabKey.wasPressedThisFrame)
|
||||
{
|
||||
if (!isLockedOn)
|
||||
if (!isLockingTarget)
|
||||
{
|
||||
SwitchToLockTarget( testEnemyTarget );
|
||||
}
|
||||
@@ -56,9 +56,11 @@ namespace Cielonos.MainGame.Characters
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
if (!isLockedOn)
|
||||
cameraRotationSm.Update();
|
||||
|
||||
if (!isLockingTarget)
|
||||
{
|
||||
cameraRotationSm.Update();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -72,7 +74,7 @@ namespace Cielonos.MainGame.Characters
|
||||
void SwitchToLockTarget(Transform target)
|
||||
{
|
||||
testEnemyTarget = target;
|
||||
isLockedOn = true;
|
||||
isLockingTarget = true;
|
||||
isLockedSetRoot = false;
|
||||
|
||||
// --- CM3 核心操作 ---
|
||||
@@ -91,7 +93,7 @@ namespace Cielonos.MainGame.Characters
|
||||
{
|
||||
cameraRotationSm.SyncRotationWithCamera(playerCamera);
|
||||
|
||||
isLockedOn = false;
|
||||
isLockingTarget = false;
|
||||
|
||||
// --- CM3 核心操作 ---
|
||||
// 1. 重置 LookAt 目标
|
||||
|
||||
Reference in New Issue
Block a user