// Use this for initialization void Start() { gp = GameObject.Find("GooglePlay"); gpScript = gp.GetComponent <Googleplay>(); bool status = gpScript.ReturnSignInStatus(); signButtonText = signOut.transform.FindChild("Text").GetComponent <Text>(); if (status == true) { signButtonText.text = "Signed Out"; } else { signButtonText.text = "Signed In"; } }
// Use this for initialization void Start() { gp = GameObject.Find("GooglePlay"); gpScript = gp.GetComponent <Googleplay>(); bool status = gpScript.ReturnSignInStatus(); }
// Update is called once per physics time unit void FixedUpdate() { //update day count txtDayCount.text = "Day " + sundial.day.ToString(); if (player.activeSelf) { if (dayTime != sundial.isDayTime()) // if daytime has changed, update display msg { dayTime = sundial.isDayTime(); fade = true; displayMsg = true; if (dayTime) { txtDayMsg.text = "Day " + sundial.day + "\n" + "Run!"; } else { txtDayMsg.text = "Night " + sundial.day + "\n" + "Hunt!"; } } if (fade) { Fade(); } } if (preCarrots != carrots) { preCarrots = carrots; carrotsCount.text = carrots.ToString(); if (googlePlayScript != null) { if (googlePlayScript.ReturnSignInStatus() == true) { googlePlayScript.CarrotsAchievement(carrots); } } } if (preHunters != hunters) { preHunters = hunters; huntersCount.text = hunters.ToString(); if (googlePlayScript != null) { if (googlePlayScript.ReturnSignInStatus() == true) { googlePlayScript.HunterAchievement(hunters); } } } if (preDay != sundial.day) { preDay = sundial.day; if (googlePlayScript != null) { if (googlePlayScript.ReturnSignInStatus() == true) { googlePlayScript.DaysAchievement(sundial.day); } } } }