Example #1
0
 void MakeInstance()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
    // Use this for initialization
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        //Request Ads
        RequestBanner();
        RequestInterstitial();
    }
    // Use this for initialization
    void Start()
    {
        game_started           = false;
        game_is_running        = false;
        player_rb.gravityScale = 0;
        score = -1;
        add_score();
        startText.text = "Tap to Play";

        Cursor.visible = false;

        GameObject admobObject = GameObject.FindWithTag("admob");

        if (admobObject != null)
        {
            admobScript = admobObject.GetComponent <AdmobScript>();
        }
    }
Example #4
0
    void Start()
    {
        if (instance != null)
        {
            Destroy(this.gameObject);
            return;
        }
        instance = this;
        GameObject.DontDestroyOnLoad(this.gameObject);

        Settings          = GetComponent <SettingsManager>();
        Admob             = GetComponent <AdmobScript>();
        Stages            = GetComponent <StagesAndLevels>();
        Audio             = GetComponent <AudioManager>();
        LevelCoins        = 0;
        TOTAL_LEVEL_COINS = 0;

        //Purchaser.Instance.BuyNoAds();
    }