1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- using UnityEngine.EventSystems;
- public class TextScripts : MonoBehaviour,IPointerClickHandler,IPointerEnterHandler,IPointerExitHandler
- {
- public Button btn;
- public void OnPointerClick(PointerEventData eventData)
- {
- string tag = eventData.pointerEnter.gameObject.tag;
- Debug.Log("enter Object and Begin Log"+ tag);
- //发送请求数据消息
- //SocketManager.Send(1001, dataByte);
- switch (tag)
- {
- case "Main":
- UIModule.OpenView(ViewID.Main);
- break;
- case "GF":
- UIModule.OpenView(ViewID.RY);
- break;
- case "GRZQ":
- UIModule.OpenView(ViewID.GRZQ);
- break;
- case "GS":
- UIModule.OpenView(ViewID.GS);
- break;
- case "PY":
- UIModule.OpenView(ViewID.PY);
- break;
- case "RY":
- UIModule.OpenView(ViewID.RY);
- break;
- case "SGT":
- UIModule.OpenView(ViewID.SGT);
- break;
- case "SMQ":
- UIModule.OpenView(ViewID.SMQ);
- break;
- case "CYQ":
- UIModule.OpenView(ViewID.CYQ);
- break;
- default:
- GameLog.LogWarning("该模型没有绑定页面");
- break;
- }
-
-
- }
- public void OnPointerEnter(PointerEventData eventData)
- {
- //todo 打开物体高亮
- //发送事件弹出提示窗口
- HighLightManager.Instance.ControllerHighLight(gameObject, true);
- }
- public void OnPointerExit(PointerEventData eventData)
- {
- //todo 关闭高亮
- HighLightManager.Instance.ControllerHighLight(gameObject, false);
- }
- // Start is called before the first frame update
- void Start()
- {
-
- }
- // Update is called once per frame
- void Update()
- {
-
- }
- }
|