예제 #1
0
    public override void OnActive()
    {
        time          = 0;
        proccessEvent = false;

        timer.PauseTimer();
        playGUI.SetActive(false);
        gameMenu.SetActive(false);
        finishWindow.SetActive(true);
        GameObject successMessage = GameObject.Find("SuccessMessage");
        GameObject failureMessage = GameObject.Find("FailureMessage");

        successMessage.GetComponent <Image> ().enabled = false;
        failureMessage.GetComponent <Image> ().enabled = true;
        successMessage.gameObject.GetComponentInChildren <Text> ().enabled = false;
        failureMessage.gameObject.GetComponentInChildren <Text> ().enabled = true;
        mapController.isHexDownBlock = true;

        Data data = ((StateController)StateManager.GetController()).GetData();

        if (data.numberOfGames > data.adPopupTime)
        {
            data.numberOfGames = 0;
            showAd             = true;

            adMob = new AdMob();
            adMob.StartInterstitial();
        }
    }
예제 #2
0
    public override void OnActive()
    {
        time = 0;
        proccessEvent = false;

        timer.PauseTimer ();
        playGUI.SetActive (false);
        gameMenu.SetActive (false);
        finishWindow.SetActive (true);
        GameObject successMessage = GameObject.Find ("SuccessMessage");
        GameObject failureMessage = GameObject.Find ("FailureMessage");
        successMessage.GetComponent<Image> ().enabled = false;
        failureMessage.GetComponent<Image> ().enabled = true;
        successMessage.gameObject.GetComponentInChildren<Text> ().enabled = false;
        failureMessage.gameObject.GetComponentInChildren<Text> ().enabled = true;
        mapController.isHexDownBlock = true;

        Data data = ((StateController)StateManager.GetController ()).GetData ();

        if (data.numberOfGames > data.adPopupTime) {
            data.numberOfGames = 0;
            showAd = true;

            adMob = new AdMob();
            adMob.StartInterstitial();
        }
    }