private void Awake() { currPubData = GeneralManager.GetPubSelected(); #if UNITY_EDITOR if (currPubData == null) { currPubData = GeneralManager.SelectPub(testPubName); } #endif LoadSceneTrackers(); }
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); } }
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); } }
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); } }
private void Awake() { pubSelected = null; if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); string pubSaved = PlayerPrefs.GetString(savedPubString); } else { DestroyImmediate(gameObject); } }
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"); } } }
void BuildPubWindow() { PubDataContainer.PubData[] pubsData = GeneralManager.GetPubList(); List <string> pubsNames = new List <string>(); List <Sprite> pubSprites = new List <Sprite>(); int index = 0; foreach (PubDataContainer.PubData currPub in pubsData) { //Debug.Log(currPub.pubName); if (currPub.hidePubInList) { continue; } pubsNames.Add(currPub.pubName); pubSprites.Add(currPub.pubLogo); //Debug.Log(currPub.pubName); index++; } locationMenuRef.SetLocations(pubsNames.ToArray(), pubSprites.ToArray(), this); }