Beispiel #1
0
 public void Paused()
 {
     Admanager.CheckForAd();
     camPosition = transform.position;
     camRotation = transform.rotation;
     rotate      = true;
 }
Beispiel #2
0
 public void Callmap()
 {
     if (Datamanager.i().stage % 10 == 0)
     {
         Admanager.instance().ShowRewardedAd();
     }
     SceneManager.LoadScene("2_Map");
 }
Beispiel #3
0
 void Start()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     Initialize();
     DontDestroyOnLoad(gameObject);
 }
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Beispiel #5
0
    public void LevelChooserBtn(string level)
    {
        if (level == "Default")
        {
            Admanager.Reset();
        }
        SceneManager.LoadSceneAsync(level, LoadSceneMode.Single);
        Animator anim = loadFade.GetComponent <Animator>();

        anim.SetBool("Fade", true);
    }
Beispiel #6
0
 void Update()
 {
     if (SceneManager.GetActiveScene().name == "levelChooser")
     {
         if (Input.GetKey("escape"))
         {
             Admanager.Reset();
             SceneManager.LoadScene("Default", LoadSceneMode.Single);
         }
     }
 }
Beispiel #7
0
    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();
    }
Beispiel #8
0
    // 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
    }
Beispiel #9
0
 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);
     }
 }
Beispiel #10
0
    private void Awake()
    {
        DontDestroyOnLoad(this);


        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(this);
        }
    }
Beispiel #11
0
    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();
    }
Beispiel #12
0
 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;
     }
 }
Beispiel #13
0
 void LevelPassed()
 {
     Admanager.CheckForAd();
     allCollected = true;
 }