From fd532186615feb24633d4f3f147a5e85e6aee8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=8F=B7=E6=95=AC?= <153802103@qq.com> Date: Tue, 24 Dec 2024 16:35:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E5=93=81=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Script/Character/Skills/UseSkill.cs | 8 +++++++- xiaofang/Assets/Script/XFS.cs | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/xiaofang/Assets/Script/Character/Skills/UseSkill.cs b/xiaofang/Assets/Script/Character/Skills/UseSkill.cs index 416c0f49..5a3fdc3d 100644 --- a/xiaofang/Assets/Script/Character/Skills/UseSkill.cs +++ b/xiaofang/Assets/Script/Character/Skills/UseSkill.cs @@ -50,9 +50,15 @@ public class UseSkill : MonoBehaviour if (Input.GetKeyDown(KeyCode.F)) { Debug.LogError("F"); + //Debug.LogError(skill_Pick.Pick()); + if (currentItem != null) + { + currentItem = _skill_Pick.Drop(currentItem); + currentItem=null; + } currentItem = _skill_Pick.Pick(); - if(currentItem==null) return; + if(currentItem.transform.name == "NoFire") { currentItem.transform.Rotate(180f, -80f, -30f); diff --git a/xiaofang/Assets/Script/XFS.cs b/xiaofang/Assets/Script/XFS.cs index 7c55677c..605d8079 100644 --- a/xiaofang/Assets/Script/XFS.cs +++ b/xiaofang/Assets/Script/XFS.cs @@ -37,7 +37,7 @@ public class XFS : MonoBehaviour public void connectGun() { - UseSkill.Initgun(Gun); + CharacterControl.enabled = true; }