32 lines
575 B
C#
32 lines
575 B
C#
|
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);
|
||
|
}
|
||
|
}
|