From ab62d3f64667ac544f4eece033ae7e3dcfb03995 Mon Sep 17 00:00:00 2001 From: huyulong <1838407198@qq.com> Date: Mon, 18 Nov 2024 17:19:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B9=8B=E5=89=8D=E9=81=97?= =?UTF-8?q?=E7=95=99=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Script/Character/CharacterControl.cs | 2 ++ xiaofang/Assets/Script/Character/Skills/UseSkill.cs | 5 ++++- xiaofang/Assets/Script/Item/Fire.cs | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/xiaofang/Assets/Script/Character/CharacterControl.cs b/xiaofang/Assets/Script/Character/CharacterControl.cs index 1677231a..0e912616 100644 --- a/xiaofang/Assets/Script/Character/CharacterControl.cs +++ b/xiaofang/Assets/Script/Character/CharacterControl.cs @@ -99,6 +99,8 @@ public class CharacterControl : MonoBehaviour } } + + //移动,走、奔跑,键盘or手柄控制 void Move() { diff --git a/xiaofang/Assets/Script/Character/Skills/UseSkill.cs b/xiaofang/Assets/Script/Character/Skills/UseSkill.cs index 31a0493e..2a26a3a9 100644 --- a/xiaofang/Assets/Script/Character/Skills/UseSkill.cs +++ b/xiaofang/Assets/Script/Character/Skills/UseSkill.cs @@ -18,7 +18,7 @@ public class UseSkill : MonoBehaviour private Skill_Pick skill_Pick; private Skill_Jump skill_Jump; private Skill_watering skill_Watering; - + //Fire fire = new Fire(); // Start is called before the first frame update void Start() @@ -66,7 +66,10 @@ public class UseSkill : MonoBehaviour } if (Input.GetMouseButtonDown(0)) { + skill_Watering.StartWatering(currentItem); + + } if (Input.GetMouseButtonUp(0)) { diff --git a/xiaofang/Assets/Script/Item/Fire.cs b/xiaofang/Assets/Script/Item/Fire.cs index 18e89cef..3b809e54 100644 --- a/xiaofang/Assets/Script/Item/Fire.cs +++ b/xiaofang/Assets/Script/Item/Fire.cs @@ -29,13 +29,13 @@ public class Fire : MonoBehaviour void Update() { - + MieFire(); } - void MieFire() + public void MieFire() { // 检查玩家是否在范围内且按住灭火键 if (isPlayerInRange && Input.GetMouseButton(0)) @@ -89,6 +89,7 @@ public class Fire : MonoBehaviour { isPlayerInRange = true; // 玩家进入范围 characterControl = other.GetComponent(); + } }