12345678910111213141516171819202122232425262728 |
- using System;
- using UnityEngine;
- using UnityEngine.EventSystems;
- public class SChooseItem : MonoBehaviour,IPointerClickHandler
- {
- /// <summary>
- /// 当选择场景时触发事件
- /// </summary>
- public event Action<SceneValue, bool> OnSelectScene;
- private SceneValue m_SceneData;
- public SceneValue SceneData
- {
- get { return m_SceneData; }
- set { m_SceneData = value; }
- }
- public GameObject sceneChoose_go;
- private SceneChoose mSceneChoose;
- public void OnPointerClick(PointerEventData eventData)
- {
- mSceneChoose = sceneChoose_go.GetComponent<SceneChoose>();
- OnSelectScene?.Invoke(m_SceneData, true);
- mSceneChoose.OnClickOKBtn(m_SceneData);
- }
- }
|