2022-02-09 08:35:01 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
using UnityEngine.Events;
|
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
|
|
public static class UIUtils
|
|
|
|
|
|
{
|
2022-02-16 09:00:22 +00:00
|
|
|
|
public static void BindBtn(Button pBtn, UnityAction pDel, AudioClipType pSound = AudioClipType.None)
|
2022-02-09 08:35:01 +00:00
|
|
|
|
{
|
|
|
|
|
|
pBtn.onClick.AddListener(pDel);
|
2022-02-14 09:14:06 +00:00
|
|
|
|
|
|
|
|
|
|
pBtn.onClick.AddListener(() => { AudioManager.Instance.PlaySound(pSound); });
|
2022-02-09 08:35:01 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|