private void Awake() { quizManager = GameObject.Find("QuizManager").GetComponent <QuizManager>(); panelUserInfo = GameObject.Find("PanelUserInfo").GetComponent <PanelUserInfo>(); uiScript = GameObject.Find("GameObjectUI").GetComponent <UIScript>(); audioSource = quizManager.GetComponent <AudioSource>(); }
private void Awake() { panelUserInfo = GameObject.Find("PanelUserInfo").GetComponent <PanelUserInfo>(); gameManagerScript = GameObject.Find("GameManager").GetComponent <GameManagerScript>(); result = panelNextScene.GetComponentInChildren <Text>(); levelData = gameManagerScript.LevelData; audioSource = gameObject.GetComponent <AudioSource>(); }
private void Awake() { gameManagerScript = GameObject.Find("GameManager").GetComponent <GameManagerScript>(); panelUserInfo = GameObject.Find("PanelUserInfo").GetComponent <PanelUserInfo>(); uiScript = GameObject.Find("GameObjectUI").GetComponent <UIScript>(); panel = GameObject.Find("Panel").gameObject; childrens = panel.GetComponentsInChildren <Button>(); emptyBtn = GameObject.Find("16").gameObject.transform; levelData = gameManagerScript.LevelData; audioSource = gameObject.GetComponent <AudioSource>(); initGame(); }
private void Awake() { //removing unnecessary GameManagerScript int numGameManager = FindObjectsOfType <GameManagerScript>().Length; if (numGameManager != 1) { Destroy(this.gameObject); } else { DontDestroyOnLoad(gameObject); } //init music if (!GameObject.FindGameObjectWithTag("Music")) { Instantiate(music); } //Caching objects panelUserInfo = GameObject.Find("PanelUserInfo").GetComponent <PanelUserInfo>(); soundManager = GameObject.FindGameObjectWithTag("Music").GetComponent <SoundManager>(); //PlayerPrefs.DeleteAll(); //Testing if this is the player first connexion if (string.IsNullOrEmpty(PlayerPrefs.GetString("RewardClaimDatetime"))) { PlayerPrefs.SetString("RewardClaimDatetime", DateTime.Now.ToString()); PlayerPrefs.SetInt("NextLevel", 1); PlayerPrefs.SetInt("HeartsNumber", 10); PlayerPrefs.SetInt("CoinsNumber", 100); PlayerPrefs.SetInt("NumberLostLevels", 0); PlayerPrefs.SetInt("NumberWonLevels", 0); PlayerPrefs.SetInt("mute", 0); } }
private void Awake() { gameManagerScript = GameObject.Find("GameManager").GetComponent <GameManagerScript>(); panelUserInfo = GameObject.Find("PanelUserInfo").GetComponent <PanelUserInfo>(); }
private void Awake() { panelUserInfo = GameObject.Find("PanelUserInfo").GetComponent <PanelUserInfo>(); }
void Start() { Advertisement.Initialize(gameId, testMode); Advertisement.AddListener(this); panelUserInfo = GameObject.Find("PanelUserInfo").GetComponent <PanelUserInfo>(); }