_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/Battle_Royale/IchorBtn.cs

32 lines
591 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class IchorBtn : MonoBehaviour
{
public Button btn;
public IchorPanel ichorPanel;
public bool isShow;
// Start is called before the first frame update
void Start()
{
btn.onClick.AddListener(OnClickBtn);
}
void OnClickBtn()
{
if (!isShow)
{
ichorPanel.ShowPanel();
isShow = true;
}
else
{
ichorPanel.HidePanel();
isShow = false;
}
}
}