_xiaofang/xiaofang/Assets/Script/PLayerBTn.cs

34 lines
650 B
C#
Raw Normal View History

2024-12-24 21:06:44 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PLayerBTn : MonoBehaviour
{
public Button PickButton;
public Button DropButton;
public UseSkill UseSkill;
// Start is called before the first frame update
void Start()
{
UseSkill=this.gameObject.GetComponent<UseSkill>();
DropButton.onClick.AddListener(() =>
{
UseSkill.Drop();
});
PickButton.onClick.AddListener(() =>
{
UseSkill.Pick();
});
}
// Update is called once per frame
void Update()
{
}
}