// Start is called before the first frame update
 void Start()
 {
     if (Monetization.isSupported)
     {
         Monetization.Initialize(gameId, true); //출시전에는 false, 출시 후에는 true
     }
 }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     if (Monetization.isSupported)
     {
         Monetization.Initialize(gameId, true); // <- 테스트 모드. 실제로 출시할 때 false로 하자
     }
 }
Пример #3
0
 protected override void Start()
 {
     if (Monetization.isSupported)
     {
         Monetization.Initialize(gameId, true);
     }
 }
Пример #4
0
    // Start is called before the first frame update
    void Start()
    {
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            m_gameID = "3487812";
        }
        else if (Application.platform == RuntimePlatform.Android)
        {
            m_gameID = "3487813";
        }

        Monetization.Initialize(m_gameID, m_testMode);
        ShowBannerAd();

        //==========Load Pref==========
        if (world.RESET)
        {
            PlayerPrefs.DeleteAll();
        }

        m_refillNormalRewardLeft  = PlayerPrefs.GetInt("UnityAdsManager.m_refillNormalRewardLeft", m_fixedRefillNormalRewardLeft);
        m_refillCrystalRewardLeft = PlayerPrefs.GetInt("UnityAdsManager.m_refillCrystalRewardLeft", m_fixedRefillCrystalRewardLeft);

        InitRewardButton();
        if (m_refillNormalRewardLeft == 0)
        {
            StartCoroutine(NormalMinuteCounter());
        }
        if (m_refillCrystalRewardLeft == 0)
        {
            StartCoroutine(CrystalMinuteCounter());
        }
    }
Пример #5
0
 void Start()
 {
     if (Monetization.isSupported)
     {
         Monetization.Initialize(store_id, true);
     }
 }
 void Start()
 {
     if (Monetization.isSupported)
     {
         Monetization.Initialize("3205205", false);
     }
 }
    private void Start()
    {
        if (Monetization.isSupported)
        {
            Monetization.Initialize(ADS_GAMEID, ADS_TESTMODE);
        }
#if UNITY_IOS
        ISN_GKLocalPlayer.Authenticate((SA_Result result) =>
        {
            if (result.IsSucceeded)
            {
                _localPlayer = ISN_GKLocalPlayer.LocalPlayer;
            }
            else
            {
                _localPlayer = null;
            }
        });
#elif UNITY_ANDROID
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();
        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();
        Social.localUser.Authenticate((bool success) =>
        {
            if (success)
            {
                _localPlayer = Social.localUser;
            }
        });
#endif
    }
Пример #8
0
    void Start()
    {
        sceneTransition.Play("SceneIntro");
        Monetization.Initialize(gameId, false);

        isGameOver              = false;
        reviveAd                = false;
        disappearCounter        = 0;
        spikeDisappearCounter   = 0;
        bombSpawnCounter        = 0;
        poisonCloudSpawnCounter = 0;
        levelNum                = 1; //used to choose the sub level, chooses each and then randomly after playing all

        bulletRef.speed    = 15f;
        bullet2Ref.speed   = 15f;
        laserBeamRef.speed = 20f;

        coinsValue       = 0;
        scoreValue       = 0;
        min              = 3f;
        max              = 6f;
        coinSpawnCounter = Random.Range(min, max);
        InvokeRepeating("UpdateScore", 0.2f, 0.2f);
        InvokeRepeating("SpawnCoins", coinSpawnCounter, coinSpawnCounter);
    }
Пример #9
0
 public void Start()
 {
     if (Monetization.isSupported)
     {
         Monetization.Initialize(gameId, false);
     }
 }
Пример #10
0
    // Use this for initialization
    void Start()
    {
        // スコアのテキストオブジェクトを取ってくる
        scoreText = GameObject.FindGameObjectWithTag("Score");

        score = PlayerPrefs.GetInt("maxScore", 0); // セーブされた値、セーブが無い時は0
        // 文字を初期化
        scoreText.GetComponent <Text>().text = " MaxScore:" + score.ToString();

        // コインのテキストを書いてるオブジェクトを取って来る
        coinText = GameObject.FindGameObjectWithTag("Coin");

        coinChange();

        /*
         * dialog = GameObject.FindGameObjectWithTag("Dialog");
         * dialog.SetActive(false);
         */

        //canvas = GameObject.FindGameObjectWithTag("canvas");

        //asobikata_active = false;

        suta = this.gameObject.GetComponent <sutamina>(); // スタミナ処理用

        // エラー処理用
        errorText = errordialog.transform.Find("Text").gameObject.GetComponent <Text>();

        // 広告の設定
        Monetization.Initialize(_gameId, testMode);
    }
Пример #11
0
        private void Start()
        {
            if (settings == null)
            {
                Debug.LogError("[AdMob]: Settings don't exist!");

                Destroy(this);
            }

#if MODULE_ADMOB
            // Initialize the Google Mobile Ads SDK.
            MobileAds.Initialize(settings.GetAppID());

            // Get singleton reward based video ad reference.
            rewardBasedVideo = RewardBasedVideoAd.Instance;

            // RewardBasedVideoAd is a singleton, so handlers should only be registered once.
            rewardBasedVideo.OnAdLoaded             += HandleRewardBasedVideoLoaded;
            rewardBasedVideo.OnAdFailedToLoad       += HandleRewardBasedVideoFailedToLoad;
            rewardBasedVideo.OnAdOpening            += HandleRewardBasedVideoOpened;
            rewardBasedVideo.OnAdStarted            += HandleRewardBasedVideoStarted;
            rewardBasedVideo.OnAdRewarded           += HandleRewardBasedVideoRewarded;
            rewardBasedVideo.OnAdClosed             += HandleRewardBasedVideoClosed;
            rewardBasedVideo.OnAdLeavingApplication += HandleRewardBasedVideoLeftApplication;
#endif

#if MODULE_UNITYADS
            string unityAdsAppID = settings.GetUnityAdsAppID();

            Monetization.Initialize(unityAdsAppID, settings.testMode);
            Advertisement.Initialize(unityAdsAppID, settings.testMode);
#endif
        }
Пример #12
0
    void Start()
    {
        Monetization.Initialize(gameID, test);
        //Advertisement.Initialize(gameID, test);

        if (Monetization.isInitialized)
        {
            Debug.Log("Ads on");
            GameMaster.instance.UI.notifactionText.text = "Ads on";
            if (!GameMaster.instance.GetComponent <Stats>().InitialAD)
            {
                //ShowAd(placementId);

                GameMaster.instance.GetComponent <Stats>().InitialAD = true;
                //GameMaster.instance.UI.inputAllowed = true;
                //SceneManager.LoadScene(SceneManager.GetActiveScene().name);
                GameMaster.instance.GetComponent <Stats>().Save();
            }
        }
        else
        {
            GameMaster.instance.UI.notifactionText.text = "adds failed";
        }
        Debug.Log("Active? " + gameObject.activeInHierarchy);
        //Advertisement.Banner.Show("MainBanner");
        StartCoroutine(ShowBannerWhenReady());
    }
Пример #13
0
 void Start()
 {
     if (!Monetization.isInitialized && Monetization.isSupported)
     {
         Monetization.Initialize(gameID, TestMode);
     }
 }
 public void LoadVideoAds()
 {
     if (Monetization.isInitialized == false)
     {
         Monetization.Initialize(unityAdsId, showTestAd);
     }
 }
Пример #15
0
    /*MONETIZATION INITIALIZE*/

    private void Start()
    {
        if (Monetization.isSupported)
        {
            Monetization.Initialize(gameId, true);
        }
    }
    void Start()
    {
        Monetization.Initialize("2943700", true);
        this.rzabkaGiver = GameObject.Find("RzabaSpawner").GetComponent <RzabaSpawner>();
        ZaboPodmieniarka(rzabkaGiver.ProszemDacRzabke(new Vector3(0, 0, 0)));
        this.flowerManager = new FlowerManager();
        this.lootSpawner   = GameObject.Find("LootSpawner").GetComponent <LootSpawner>();
        this.happyFrogs    = new List <GameObject>();
        this.currentFrog   = GameObject.Find("Frog");
        this.modifiers     = new List <FlowerModifier>();
        Screen.orientation = ScreenOrientation.Portrait;
        this.wybuch        = GameObject.Find("Wybuch").transform.Find("Explosion");
        this.wybuch.gameObject.SetActive(false);
        this.dymek = GameObject.Find("Dymek").transform.Find("Smoke");
        this.dymek.gameObject.SetActive(false);
        this.goToCollectionButton = GameObject.Find("GoToCollectionButton");
        this.trzepacz             = GameObject.Find("TrzepaczHajsu").GetComponent <TrzepaczHajsu>();

        this.trzepacz.rewarder = delegate(bool p)
        {
            modifiers.Add(new FlowerModifier(2, 60, p));
        };
        this.playerResourcesScript = GameObject.Find("PlayerResources").GetComponent <PlayerResourcesScript>();
        LoadData();


        GameObject.Find("Shop").GetComponent <ShopScript>().itemDatas.FindAll(x => x.isBought).ForEach(x => {
            modifiers.Add(new FlowerModifier(2, 60, true));
        });
    }
Пример #17
0
    private void InitializeAds()
    {
        // IOSとAndroid毎にゲームIDを指定する。
#if UNITY_IOS
        _gameId = appleAppStoreGameId;
#elif UNITY_ANDROID
        _gameId = googlePlayStoreGameId;
#endif

        // UnityAdsが対応していない場合は実行しない
        if (!Advertisement.isSupported)
        {
            return;
        }

        // UnityAdsの初期化(ゲーム起動中に一度だけ実行します)
        Monetization.Initialize(_gameId, testMode);

        // バナーの初期化処理
        unityAdsBanner.InitializeBanner(bannerPplacementId);

        // 動画リワードの初期化処理
        unityAdsVideoRewardResult.InitializeVideoReward(rewardVideoPplacementId);

        // 動画リワードの初期化処理
        unityAdsVideoRewardSkin.InitializeVideoReward(rewardVideoPplacementId2);

        // 動画リワードの初期化処理
        unityAdsVideoRewardTimer.InitializeVideoReward(rewardVideoPplacementId3);

        // インタースティシャルの初期化
        unityAdsInterstitial.InitializeVideoReward(interstitialPplacementId);
    }
Пример #18
0
 // Start is called before the first frame update
 void Start()
 {
     Monetization.Initialize(googleID, testMode);
     Monetization.Initialize(appleID, testMode);
     supportUsMenu.SetActive(false);
     supportOptionsMenu.SetActive(false);
     donateMenu.SetActive(false);
 }
Пример #19
0
 private void Awake()
 {
     Monetization.Initialize(gameId, isTestMode);
     if (!showAdButton)
     {
         Debug.LogError("UI Not Configured");
     }
 }
Пример #20
0
    void Start()
    {
        StartCoroutine(CallAd());



        Monetization.Initialize(store_id, false);
    }
Пример #21
0
 // Start is called before the first frame update
 void Start()
 {
     Application.runInBackground = false;
     if (Monetization.isSupported)
     {
         Monetization.Initialize("3205205", false);
     }
 }
Пример #22
0
	private void Start()
	{
		UnityEngine.Debug.Log("No of retrys=  " + Global.noOfTries);
		try
		{
			Monetization.Initialize(stroreId, testMode: false);
			Invoke("UnityAdIsReady", 5f);
			IronSourceEvents.onInterstitialAdClosedEvent += OnIronInterstitialAdClosed;
			IronSource.Agent.loadInterstitial();
		}
		catch (Exception)
		{
		}
		rewardLoaded = false;
		gm = UnityEngine.Object.FindObjectOfType<GameManager>();
		try
		{
			if (Global.currentLevel >= Global.bannerLevel)
			{
				showBannerAd();
			}
		}
		catch (Exception)
		{
		}
		hasShownAdOneTime = false;
		hasShownReplayAd = false;
		string appId = "ca-app-pub-3411062052281263/5993459298";
		try
		{
			MobileAds.Initialize(appId);
		}
		catch (Exception)
		{
		}
		if (!Application.isEditor)
		{
			LoadInterstitial();
		}
		try
		{
			if (rewardBasedVideo == null || !rewardBasedVideo.IsLoaded())
			{
				rewardBasedVideo = RewardBasedVideoAd.Instance;
				rewardBasedVideo.OnAdLoaded += HandleRewardBasedVideoLoaded;
				rewardBasedVideo.OnAdFailedToLoad += HandleRewardBasedVideoFailedToLoad;
				rewardBasedVideo.OnAdOpening += HandleRewardBasedVideoOpened;
				rewardBasedVideo.OnAdStarted += HandleRewardBasedVideoStarted;
				rewardBasedVideo.OnAdRewarded += HandleRewardBasedVideoRewarded;
				rewardBasedVideo.OnAdClosed += HandleRewardBasedVideoClosed;
				rewardBasedVideo.OnAdLeavingApplication += HandleRewardBasedVideoLeftApplication;
				RequestRewardBasedVideo();
			}
		}
		catch (Exception)
		{
		}
	}
Пример #23
0
    public override void Start()
    {
        Pool.Instance.AddSystemListener(typeof(AdComponent), this);

        Monetization.Initialize(this._gameId, this._testMode);
        Advertisement.Initialize(this._gameId, this._testMode);
        //Advertisement.Banner.SetPosition(BannerPosition.BOTTOM_CENTER); // default
        Advertisement.Banner.Hide();
    }
Пример #24
0
 private void CreateAds()
 {
     if (Monetization.isSupported)
     {
         Monetization.Initialize(gameId, false);
     }
     //MobileAds.Initialize("ca-app-pub-9286235148771355~1073254772");
     //CreateAndLoadRewardedAd();
 }
Пример #25
0
 public static void Init()
 {
     if (initialized)
     {
         return;
     }
     Monetization.Initialize("2928078", true);
     initialized = true;
 }
Пример #26
0
 void Awake()
 {
     if (PlayerPrefs.GetInt("AdPlayed") != 0)
     {
         GameObject.Find("SaveScoreAd").GetComponent <Button>().interactable = false;
     }
     Monetization.Initialize(StoreIdAndroid, false); //kd ke se release game treba da e FALSE
     adNotLoaded.SetActive(false);
 }
Пример #27
0
 private void Start()
 {
     Player = GameObject.FindGameObjectWithTag("Player");
     mod    = Player.GetComponent <Player>().Mod;
     if (Monetization.isSupported)
     {
         Monetization.Initialize("3348235", false);
     }
 }
Пример #28
0
    void Awake()
    {
        started = false;

        Monetization.Initialize(StoreIdAndroid, false); //kd ke se release game treba da e FALSE
        Advertisement.Initialize(StoreIdAndroid, false);
        StartCoroutine(ShowBannerWhenReady());
        StartCoroutine(SkipWithTimer());
    }
Пример #29
0
    private void Start()
    {
        Monetization.Initialize(gameId, testMode);
#if UNITY_ANDROID
        // Android should not show ads for now
        showAdEveryXTimes = 100;
#else
        showAdEveryXTimes = 5;
#endif
    }
Пример #30
0
 private void Start()
 {
     if (GameSettings.settings.boughtRemoveAds)
     {
     }
     else
     {
         Monetization.Initialize(gameID, testMode);
     }
 }