123456789101112131415161718192021222324252627282930313233 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class SaomiaoView : MonoBehaviour {
- [SerializeField]
- private Button btn;
- void Start () {
- MessageCenterController.Instance.Register(GameEnum.MESSAGE_VUFORIA_SYNC_POS, Refresh);
- }
- private void Update()
- {
- btn.gameObject.SetActive(GamePlayerData.Instance.IsInRoom);
- }
- private void OnDestroy()
- {
- MessageCenterController.Instance.UnRegister(GameEnum.MESSAGE_VUFORIA_SYNC_POS, Refresh);
- }
- private void Refresh(System.Object datas)
- {
- Transform trans = datas as Transform;
- //ExperimentUIManager.Instance.UIParentPoint.transform.rotation = trans.rotation;
- //ExperimentUIManager.Instance.UIParentPoint.transform.position = trans.position;
- UIParentPoint.Instance.transform.rotation = trans.rotation;
- UIParentPoint.Instance.transform.position = trans.position;
- }
- }
|