35 lines
721 B
C#
35 lines
721 B
C#
using System;
|
|
using BrewMonster.Network;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace BrewMonster
|
|
{
|
|
public class HUDMainGamePlay : MonoBehaviour
|
|
{
|
|
#region Fields
|
|
|
|
[SerializeField]private Button _escapeBtn;
|
|
|
|
#endregion
|
|
|
|
private void OnEnable()
|
|
{
|
|
_escapeBtn.onClick.AddListener(OnEscapeClicked);
|
|
}
|
|
|
|
private void OnDisable()
|
|
{
|
|
_escapeBtn.onClick.RemoveListener(OnEscapeClicked);
|
|
}
|
|
|
|
private void OnEscapeClicked()
|
|
{
|
|
if(EC_Game.GetGameRun()?.GetHostPlayer() != null)
|
|
{
|
|
EC_Game.GetGameRun()?.GetHostPlayer().OnClickBtnEscape();
|
|
}
|
|
}
|
|
}
|
|
}
|