25'ten fazla konu seçemezsiniz
Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
|
- using System;
- using UnityEngine;
- using UnityEngine.UI;
-
- public class OverlayButton : MonoBehaviour
- {
- public void EnableButton(Action onClick)
- {
- base.gameObject.SetActive(true);
- this._onClick = onClick;
- this._buttonComponent.enabled = true;
- }
-
- public void DisableButton()
- {
- this._buttonComponent.enabled = false;
- base.gameObject.SetActive(false);
- }
-
- public void OnClick()
- {
- if (this._onClick != null)
- {
- this._onClick();
- }
- }
-
- [SerializeField]
- private Button _buttonComponent;
-
- private Action _onClick;
- }
|