物品替换

This commit is contained in:
杨号敬 2024-12-24 16:35:05 +08:00
parent 80dcd6533e
commit fd53218661
2 changed files with 8 additions and 2 deletions

View File

@ -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);

View File

@ -37,7 +37,7 @@ public class XFS : MonoBehaviour
public void connectGun()
{
UseSkill.Initgun(Gun);
CharacterControl.enabled = true;
}