using System;
using UnityEngine;

public class BattleStageChoiceObject : MonoBehaviour
{
	[SerializeField]
	private UIButton _button;

	[SerializeField]
	private UITexture _texture;

	[SerializeField]
	private GameObject _offObject;

	public Action _onButton;

	public void Init()
	{
		UIEventListener.Get(_button.gameObject).onClick = null;
		UIEventListener uIEventListener = UIEventListener.Get(_button.gameObject);
		uIEventListener.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onClick, (UIEventListener.VoidDelegate)delegate
		{
			_onButton();
		});
	}

	public void SettingOffSelect(bool isOff)
	{
		_offObject.gameObject.SetActive(isOff);
	}

	public void SettingTexture(Texture texture)
	{
		_texture.mainTexture = texture;
	}
}
