修复了灭火灭一半逃跑被卡住的bug
This commit is contained in:
parent
35427a2b78
commit
27c938b77b
@ -2482,9 +2482,21 @@ PrefabInstance:
|
|||||||
m_Modification:
|
m_Modification:
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
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}
|
- target: {fileID: 7104765112034955984, guid: 6815aad4cd6cb734a9d63a7210677333, type: 3}
|
||||||
propertyPath: m_Center.y
|
propertyPath: m_Center.y
|
||||||
value: 0
|
value: -0.24
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7104765112034955984, guid: 6815aad4cd6cb734a9d63a7210677333, type: 3}
|
- target: {fileID: 7104765112034955984, guid: 6815aad4cd6cb734a9d63a7210677333, type: 3}
|
||||||
propertyPath: m_Center.z
|
propertyPath: m_Center.z
|
||||||
|
@ -41,7 +41,8 @@ public class Fire : MonoBehaviour
|
|||||||
if (isPlayerInRange && Input.GetMouseButton(0))
|
if (isPlayerInRange && Input.GetMouseButton(0))
|
||||||
{
|
{
|
||||||
// 禁用玩家控制器,防止玩家移动
|
// 禁用玩家控制器,防止玩家移动
|
||||||
//if (!isExtinguishing) DisablePlayerControl();
|
if (!isExtinguishing)
|
||||||
|
DisablePlayerControl();
|
||||||
|
|
||||||
holdTime += Time.deltaTime;
|
holdTime += Time.deltaTime;
|
||||||
Debug.Log("灭火计时:" + holdTime);
|
Debug.Log("灭火计时:" + holdTime);
|
||||||
@ -60,7 +61,7 @@ public class Fire : MonoBehaviour
|
|||||||
holdTime = 0f;
|
holdTime = 0f;
|
||||||
isExtinguishing = false;
|
isExtinguishing = false;
|
||||||
// 恢复玩家控制器
|
// 恢复玩家控制器
|
||||||
//if (!Input.GetMouseButton(0)) EnablePlayerControl();
|
if (!Input.GetMouseButton(0)) EnablePlayerControl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user