public void Paused() { Admanager.CheckForAd(); camPosition = transform.position; camRotation = transform.rotation; rotate = true; }
void GameOver() { isGameOver = true; uiAnim.SetTrigger("GameOver"); Admanager.CheckForAd(); if (score > recordScore) { gameOvertext.text = "NEW RECORD!"; bestScoreText.text = "Best : " + score; recordScore = score; LevelscoreManager.SavePlayer(allRecordStar, allRecordTime, recordScore); } }
public void LevelFinished() { am.PlayLevelPassed(); levelPassed = true; float timeCurrent; timeCurrent = Time.timeSinceLevelLoad; if (timeRecord == 0 || timeRecord > timeCurrent) { timeRecord = timeCurrent; levelFinishString = LevelFinishTextManager.RandLevelPassedText(); allRecordStar[sceneBuildIndex] = stars; allRecordTime[sceneBuildIndex] = timeRecord; LevelscoreManager.SavePlayer(allRecordStar, allRecordTime, recordScore); } timeTakenText.text = timeCurrent + " sec"; timeRecordText.text = timeRecord + " sec"; Admanager.CheckForAd(); }
void Update() { if (levelPassed) { anim.SetBool("LevelPassed", true); levelFinishText.text = levelFinishString; } if (!levelPassed && player.position.y < -4) { anim.SetBool("LevelFailed", true); am.PlayLevelFailed(); } if (player.position.y < -4) { if (!levelFailed) { Admanager.CheckForAd(); } levelFailed = true; } }
void LevelPassed() { Admanager.CheckForAd(); allCollected = true; }