修复了灭火灭一半逃跑被卡住的bug

This commit is contained in:
huyulong 2024-11-20 03:42:04 +08:00
parent 35427a2b78
commit 27c938b77b
2 changed files with 16 additions and 3 deletions

View File

@ -2482,9 +2482,21 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 7104765112034955984, guid: 6815aad4cd6cb734a9d63a7210677333, type: 3}
propertyPath: m_Size.x
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 7104765112034955984, guid: 6815aad4cd6cb734a9d63a7210677333, type: 3}
propertyPath: m_Size.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 7104765112034955984, guid: 6815aad4cd6cb734a9d63a7210677333, type: 3}
propertyPath: m_Center.x
value: 0.03
objectReference: {fileID: 0}
- target: {fileID: 7104765112034955984, guid: 6815aad4cd6cb734a9d63a7210677333, type: 3}
propertyPath: m_Center.y
value: 0
value: -0.24
objectReference: {fileID: 0}
- target: {fileID: 7104765112034955984, guid: 6815aad4cd6cb734a9d63a7210677333, type: 3}
propertyPath: m_Center.z

View File

@ -41,7 +41,8 @@ public class Fire : MonoBehaviour
if (isPlayerInRange && Input.GetMouseButton(0))
{
// 禁用玩家控制器,防止玩家移动
//if (!isExtinguishing) DisablePlayerControl();
if (!isExtinguishing)
DisablePlayerControl();
holdTime += Time.deltaTime;
Debug.Log("灭火计时:" + holdTime);
@ -60,7 +61,7 @@ public class Fire : MonoBehaviour
holdTime = 0f;
isExtinguishing = false;
// 恢复玩家控制器
//if (!Input.GetMouseButton(0)) EnablePlayerControl();
if (!Input.GetMouseButton(0)) EnablePlayerControl();
}
}