// Update is called once per frame void Update() { if (IsGameScene) { if (Screen.width > Screen.height) { IsLandscape = true; } else { IsLandscape = false; } if (LastFrameOrientation != IsLandscape) { //set the current popup to be active (so that it can be found again if the screen changes) achievementPopup.SetActive(true); //now find the new orientation popup SetAchievementPopup(true); achievementPopupHandler = achievementPopup.GetComponent <AchievementPopupHandler>(); //set the new popup to be hidden until an achievement is unlocked achievementPopup.SetActive(false); } CheckAchievements(); //not all triggers will be updated in the AchievementManager, money/mouse clicks etc will be done in whichever scripts handle that stuff //UpdateTriggerCurrentValue("TOTALTIMEPLAYED", Time.deltaTime); LastFrameOrientation = IsLandscape; } }
public void InitialiseAchievementPopup() { if (Screen.width > Screen.height) { IsLandscape = true; LastFrameOrientation = IsLandscape; } else { IsLandscape = false; LastFrameOrientation = IsLandscape; } SetAchievementPopup(); achievementPopupHandler = achievementPopup.GetComponent <AchievementPopupHandler>(); achievementPopup.SetActive(false); }
// Update is called once per frame void Update() { if (IsGameScene) { if (Screen.width > Screen.height) { IsLandscape = true; } else { IsLandscape = false; } if (LastFrameOrientation != IsLandscape) { //set the current popup to be active (so that it can be found again if the screen changes) achievementPopup.SetActive(true); //now find the new orientation popup SetAchievementPopup(true); achievementPopupHandler = achievementPopup.GetComponent<AchievementPopupHandler>(); //set the new popup to be hidden until an achievement is unlocked achievementPopup.SetActive(false); } CheckAchievements(); //not all triggers will be updated in the AchievementManager, money/mouse clicks etc will be done in whichever scripts handle that stuff //UpdateTriggerCurrentValue("TOTALTIMEPLAYED", Time.deltaTime); LastFrameOrientation = IsLandscape; } }
public void InitialiseAchievementPopup() { if (Screen.width > Screen.height) { IsLandscape = true; LastFrameOrientation = IsLandscape; } else { IsLandscape = false; LastFrameOrientation = IsLandscape; } SetAchievementPopup(); achievementPopupHandler = achievementPopup.GetComponent<AchievementPopupHandler>(); achievementPopup.SetActive(false); }