public void Paused() { Admanager.CheckForAd(); camPosition = transform.position; camRotation = transform.rotation; rotate = true; }
public void Callmap() { if (Datamanager.i().stage % 10 == 0) { Admanager.instance().ShowRewardedAd(); } SceneManager.LoadScene("2_Map"); }
void Start() { if (_instance == null) { _instance = this; } Initialize(); DontDestroyOnLoad(gameObject); }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(this); } }
public void LevelChooserBtn(string level) { if (level == "Default") { Admanager.Reset(); } SceneManager.LoadSceneAsync(level, LoadSceneMode.Single); Animator anim = loadFade.GetComponent <Animator>(); anim.SetBool("Fade", true); }
void Update() { if (SceneManager.GetActiveScene().name == "levelChooser") { if (Input.GetKey("escape")) { Admanager.Reset(); SceneManager.LoadScene("Default", LoadSceneMode.Single); } } }
private void Start() { Instance = this; DontDestroyOnLoad(gameObject); Admob.Instance().initAdmob(bannerId, videoId); //folosim set testing pt a afisa o reclama dummy Admob.Instance().setTesting(true); Admob.Instance().loadInterstitial(); }
// Use this for initialization void Start() { Instance = this; DontDestroyOnLoad(gameObject); #if UNITY_EDITOR Debug.Log("i wont run under unity Console"); #elif UNITY_ANDROID Admob.Instance().initAdmob(bannerID, VideoID); Admob.Instance().loadInterstitial(); ShowBanner(); #endif }
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); } }
private void Awake() { DontDestroyOnLoad(this); if (instance == null) { instance = this; } else { Destroy(this); } }
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; }