From 27c938b77b203929d16088984f8defdbbbf9b001 Mon Sep 17 00:00:00 2001 From: huyulong <1838407198@qq.com> Date: Wed, 20 Nov 2024 03:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E7=81=AD=E7=81=AB?= =?UTF-8?q?=E7=81=AD=E4=B8=80=E5=8D=8A=E9=80=83=E8=B7=91=E8=A2=AB=E5=8D=A1?= =?UTF-8?q?=E4=BD=8F=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Scenes/Tmap.unity | 14 +++++++++++++- xiaofang/Assets/Script/Item/Fire.cs | 5 +++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/xiaofang/Assets/Scenes/Tmap.unity b/xiaofang/Assets/Scenes/Tmap.unity index c0d8dbb5..d4be5df6 100644 --- a/xiaofang/Assets/Scenes/Tmap.unity +++ b/xiaofang/Assets/Scenes/Tmap.unity @@ -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 diff --git a/xiaofang/Assets/Script/Item/Fire.cs b/xiaofang/Assets/Script/Item/Fire.cs index f92b59c4..a39cd634 100644 --- a/xiaofang/Assets/Script/Item/Fire.cs +++ b/xiaofang/Assets/Script/Item/Fire.cs @@ -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(); } }