32 lines
575 B
C#
Raw Normal View History

2024-12-16 17:25:10 +08:00
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DrawingWapenItem : ItemObj
{
[SerializeField] private Button _button;
public DrawingPanel panel;
private void Awake()
{
_button = GetComponent<Button>();
}
public void OnEnable()
{
_button.onClick.AddListener(ButtonEvent);
}
public void OnDisable()
{
_button.onClick.RemoveListener(ButtonEvent);
}
public void ButtonEvent()
{
panel.OpenFree(itemId);
}
}