void receivedAdEvent() { #if UNITY_ANDROID StartCoroutine(ADSController.hideBanner()); #endif StartCoroutine(ADSController.showBanner()); }
void Update() { if (Input.GetMouseButtonDown(0)) { RaycastHit _hit; Ray _ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(_ray, out _hit, 100.0f)) { if (_hit.collider.name == "MENU") { ADSController.instance.StartCoroutine(ADSController.hideBanner()); CheckPoint.reset(); Director.sharedDirector().LoadLevelWithFade(LevelManager.getLevelID(Level.menu)); } else if (_hit.collider.name == "CONTINUE") { ADSController.instance.StartCoroutine(ADSController.hideBanner()); Director.sharedDirector().restartScene(); } } } }
void Awake() { #if UNITY_ANDROID AdMobAndroid.init(""); #endif StartCoroutine(ADSController.createBanner()); }
public static void canCreateFullBanner() { if (!fullBannerLocked) { if ((ADSController.lastTimeShowedFullBanner + maxTimeShowFullBanner) < Time.time) { fullBannerLocked = true; instance.StartCoroutine(ADSController.createFullBanner()); } } }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
private void Start() { _rectTransform = GetComponent <RectTransform>(); standartWidth = _rectTransform.rect.width; standartHeight = _rectTransform.rect.height; adsController = GameObject.Find("ADS Controller").GetComponent <ADSController>(); if (gameObject.CompareTag("WatchVideoShop")) { adsController.noAdsNowParentShop = gameObject; } else if (gameObject.CompareTag("WatchVideoGameOver")) { adsController.noAdsNowParentGameOver = gameObject; } }
void Update() { if (Inventory.getPoints() == 0 && Inventory.getEnemyDead() == 0) { this.active = true; } if (Inventory.getPoints() != 0 && Inventory.getEnemyDead() != 0 && !this.active) { StartCoroutine(countingBone(2)); } if (Input.GetMouseButtonDown(0) && this.active) { RaycastHit _hit; Ray _ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(_ray, out _hit, 100.0f)) { if (_hit.collider.name == "MENU") { ADSController.instance.StartCoroutine(ADSController.hideBanner()); Director.sharedDirector().LoadLevelWithFade(LevelManager.getLevelID(Level.menu)); } else if (_hit.collider.name == "PROXIMO") { ADSController.instance.StartCoroutine(ADSController.hideBanner()); Director.sharedDirector().nextLevel(); } else if (_hit.collider.name == "VOLTAR") { ADSController.instance.StartCoroutine(ADSController.hideBanner()); Director.sharedDirector().restartScene(); } } } }
public void endScene(SceneEndedStatus status) { if (ADSController.isFullBannerReady()) { ADSController.instance.StartCoroutine(ADSController.showFullBanner()); } else { ADSController.instance.StartCoroutine(ADSController.showBanner()); } this.sceneEndedState = status; switch (this.sceneEndedState) { case SceneEndedStatus.won: { this.playEffect(wonAudio); PlayerStateControl.sharePlayer().setState(PlayerState.Winner); break; } case SceneEndedStatus.lost: { this.audioBackground.Stop(); PlayerStateControl.sharePlayer().setState(PlayerState.Dead); this.playEffect(lostAudio); Inventory.reset(); break; } } this.endScene(); }
void Start() { instance = GameObject.Find(this.gameObject.name).GetComponent <ADSController>(); }
void interstitialLeavingApplicationEvent() { StartCoroutine(ADSController.showBanner()); }
void interstitialFailedToReceiveAdEvent(string error) { StartCoroutine(ADSController.createFullBanner()); }
void interstitialDismissingScreenEvent() { StartCoroutine(ADSController.refresh()); StartCoroutine(ADSController.hideBanner()); }
void leavingApplicationEvent() { StartCoroutine(ADSController.refresh()); }
void failedToReceiveAdEvent(string error) { StartCoroutine(ADSController.createBanner()); }
public void restartScene() { ADSController.canCreateFullBanner(); this.LoadLevel(LevelManager.currentLevel); }
void receivedAdEvent() { StartCoroutine(ADSController.hideBanner()); }
void Start() { instance = Camera.main.GetComponent <ADSController>(); }
void Awake() { Instance = this; }