Пример #1
0
        private void Awake()
        {
            currPubData = GeneralManager.GetPubSelected();

#if UNITY_EDITOR
            if (currPubData == null)
            {
                currPubData = GeneralManager.SelectPub(testPubName);
            }
#endif
            LoadSceneTrackers();
        }
Пример #2
0
        public void GoConcursos()
        {
            PubDataContainer.PubData pubData = GeneralManager.GetPubSelected();

            if (pubData != null && pubData.hasDefinedPrizeScene)
            {
                SceneManager.LoadScene(pubData.definedPrizeScene);
            }
            else if (pubData != null && !pubData.hasDefinedARScene)
            {
                SceneManager.LoadScene(GeneralManager.ScenePrizeIndex);
            }
        }
Пример #3
0
 public void CameraMode()
 {
     PubDataContainer.PubData pubData = GeneralManager.GetPubSelected();
     if (pubData != null && pubData.hasDefinedARScene)
     {
         Debug.Log("scene index pubdata: " + pubData.definedARScene);
         SceneManager.LoadScene(pubData.definedARScene);
     }
     else if (pubData != null && !pubData.hasDefinedARScene)
     {
         Debug.Log("scene index general: " + GeneralManager.SceneARIndex);
         SceneManager.LoadScene(GeneralManager.SceneARIndex);
     }
 }
Пример #4
0
        public void OpenCLYCme()
        {
            PubDataContainer.PubData pubData = GeneralManager.GetPubSelected();


            if (pubData != null && pubData.definedConstestUrl && pubData.pubConstestButtonUrl.CompareTo("") != 0)
            {
                Debug.Log(pubData.pubConstestButtonUrl);
                Application.OpenURL(pubData.pubConstestButtonUrl);
            }
            else if (pubData != null && (!pubData.definedConstestUrl || pubData.pubConstestButtonUrl.CompareTo("") == 0))
            {
                Debug.Log(GeneralManager.Instance.pubData.ContestButtonURL);
                Application.OpenURL(GeneralManager.Instance.pubData.ContestButtonURL);
            }
        }
Пример #5
0
        void SetPubSelection(string pubName = "")
        {
            PubDataContainer.PubData pubData = GeneralManager.GetPubSelected();

            // on Enter scene first time
            if (pubName.CompareTo("") == 0 && pubData == null)
            {
            } // on Set for first time or next times
            else if (
                (pubName.CompareTo("") != 0 && pubData == null) ||
                (pubName.CompareTo("") != 0 && pubData != null)
                )
            {
                pubData = GeneralManager.SelectPub(pubName);
                if (pubData != null)
                {
                    selectedPubText.text    = pubData.pubName;
                    selectedPubImage.sprite = pubData.pubLogo;
                }
                else
                {
                    Debug.Log("Error pub not found " + pubName);
                }
            } // on Set from saved data
            else if (pubName.CompareTo("") == 0 && pubData != null)
            {
                Debug.Log("Load from saved data");
                if (pubData != null)
                {
                    selectedPubText.text    = pubData.pubName;
                    selectedPubImage.sprite = pubData.pubLogo;
                }
                else
                {
                    Debug.Log("Error pub not found");
                }
            }
        }