示例#1
0
    public static void HideDisplayAd()
    {
        if (Application.isEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.HideDisplayAd();
    }
示例#2
0
    //========================================================================================================================
    // MULTIPLE CURRENCY (currency cannot be managed by Tapjoy)
    //========================================================================================================================
    /// <summary>
    /// Shows the offer wall with a specified currencyID.  The selector is whether
    /// the offer wall should allow toggling between the app's currencies.
    /// </summary>
    /// <param name="currencyID">
    /// A <see cref="System.String"/>
    /// </param>
    /// <param name="selector">
    /// A <see cref="System.Boolean"/>
    /// </param>
    public static void ShowOffersWithCurrencyID(string currencyID, bool selector)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.ShowOffersWithCurrencyID(currencyID, selector);
    }
示例#3
0
    /// <summary>
    /// Initiates a request to get the full screen ad with a specified currencyID.
    /// </summary>
    /// <param name="currencyID">
    /// A <see cref="System.String"/>
    /// </param>
    public static void GetFullScreenAdWithCurrencyID(string currencyID)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.GetFullScreenAdWithCurrencyID(currencyID);
    }
示例#4
0
    /// <summary>
    /// Shows a full screen  ad. This should be called after full screen ad data is retrieved from the server.
    /// </summary>
    public static void ShowFullScreenAd()
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.ShowFullScreenAd();
    }
示例#5
0
    /// <summary>
    /// Shows a daily reward ad. This should be called after daily reward ad data is retrieved from the server.
    /// </summary>
    public static void ShowDailyRewardAd()
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.ShowDailyRewardAd();
    }
示例#6
0
    /// <summary>
    /// Updates the Display ad with a new one or disables auto-refresh.
    /// </summary>
    /// <param name="enable">
    /// A <see cref="System.Boolean"/>
    /// </param>
    public static void EnableDisplayAdAutoRefresh(bool enable)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.EnableDisplayAdAutoRefresh(enable);
    }
示例#7
0
    /// <summary>
    /// IOS ONLY
    /// Sets the transition effect.
    /// </summary>
    /// <param name='transition'>
    /// Transition.
    /// </param>
    public static void SetTransitionEffect(int transition)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.SetTransitionEffect(transition);
    }
示例#8
0
    public static void GetReEngagementAdWithCurrencyID(string currencyID)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.GetDailyRewardAdWithCurrencyID(currencyID);
    }
示例#9
0
    /// <summary>
    /// Sets the callback handler.
    /// </summary>
    /// <param name='handlerName'>
    /// Handler name. Must match a Unity GameObject name, for the native code
    /// to utilize UnitySendMessage() properly.
    /// </param>
    public static void SetCallbackHandler(string handlerName)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.SetCallbackHandler(handlerName);
    }
示例#10
0
    public static void ShowEvent(string guid)
    {
        if (Application.isEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.ShowEvent(guid);
    }
示例#11
0
    /// <summary>
    /// Set a multiplier for virtual currency appearance on the offer wall, Display ads, etc.
    /// </summary>
    /// <param name="multiplier">
    /// A <see cref="System.Single"/>
    /// </param>
    public static void SetCurrencyMultiplier(float multiplier)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.SetCurrencyMultiplier(multiplier);
    }
示例#12
0
    /// <summary>
    /// Initiates a request to get a Tapjoy Display ad with a specified currencyID.
    /// </summary>
    /// <param name="currencyID">
    /// A <see cref="System.String"/>
    /// </param>
    public static void GetDisplayAdWithCurrencyID(string currencyID)
    {
        if (Application.isEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.GetDisplayAdWithCurrencyID(currencyID);
    }
示例#13
0
    public static void ShowFullScreenAd()
    {
        if (Application.isEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.ShowFullScreenAd();
    }
示例#14
0
    public static void SetTransitionEffect(int transition)
    {
        if (Application.isEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.SetTransitionEffect(transition);
    }
示例#15
0
    /// <summary>
    /// Shows the default earned currency alert in iOS.
    /// </summary>
    public static void ShowDefaultEarnedCurrencyAlert()
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.ShowDefaultEarnedCurrencyAlert();
    }
示例#16
0
    /// <summary>
    /// This method is called to initialize the TapjoyConnect system.
    /// This method should be called upon app initialization and must
    /// not have logic to prevent it from being called in any case.
    /// </summary>
    /// <param name="appID">
    /// A <see cref="System.String"/>
    /// </param>
    /// <param name="secretKey">
    /// A <see cref="System.String"/>
    /// </param>
    /// <param name="flags">
    /// A <see cref="System.Collections.Hashtable" />
    /// </param>
    public static void RequestTapjoyConnect(string appID, string secretKey, Dictionary <string, string> flags)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.RequestTapjoyConnect(appID, secretKey, flags);
    }
示例#17
0
    /// <summary>
    /// Hides the Display ad.
    /// </summary>
    public static void HideDisplayAd()
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.HideDisplayAd();
    }
示例#18
0
    /// <summary>
    /// Enables Tapjoy library logging to the console.
    /// </summary>
    /// <param name="enable">
    /// A <see cref="System.Boolean"/>
    /// </param>
    public static void EnableLogging(bool enable)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.EnableLogging(enable);
    }
示例#19
0
    /// <summary>
    /// Moves the location of the Display Ad.
    /// </summary>
    /// <param name="x">
    /// A <see cref="System.Int32"/>
    /// </param>
    /// <param name="y">
    /// A <see cref="System.Int32"/>
    /// </param>
    public static void MoveDisplayAd(int x, int y)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.MoveDisplayAd(x, y);
    }
示例#20
0
    /// <summary>
    /// This is called when an action is completed.
    /// Actions are much like connects, except that this method is
    /// only called when a user completes an in-game action.
    /// </summary>
    /// <param name="actionID">
    /// A <see cref="System.String"/>
    /// </param>
    public static void ActionComplete(string actionID)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.ActionComplete(actionID);
    }
示例#21
0
    public static void GetFeaturedApp()
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.GetFullScreenAd();
    }
示例#22
0
    /// <summary>
    /// Sets the user ID. The user ID defaults to the UDID.
    /// This is only changed when NOT using Tapjoy Managed Currency.
    /// </summary>
    /// <param name="userID">
    /// A <see cref="System.String"/>
    /// </param>
    public static void SetUserID(string userID)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.SetUserID(userID);
    }
示例#23
0
    public static void GetReEngagementAd()
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.GetDailyRewardAd();
    }
示例#24
0
    /// <summary>
    /// Initiates a request to get a user's Tap Points (Tapjoy Managed currency).
    /// </summary>
    public static void GetTapPoints()
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.GetTapPoints();
    }
示例#25
0
    /// <summary>
    /// Event when an In-App-Purchased occurs.
    /// </summary>
    /// <param name="name">
    /// A <see cref="System.String"/>
    /// </param>
    /// <param name="price">
    /// A <see cref="System.Single"/>
    /// </param>
    /// <param name="quantity">
    /// A <see cref="System.Int32"/>
    /// </param>
    /// <param name="currencyID">
    /// A <see cref="System.String"/>
    /// </param>
    public static void SendIAPEvent(string name, float price, int quantity, string currencyCode)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.SendIAPEvent(name, price, quantity, currencyCode);
    }
示例#26
0
    /// <summary>
    /// Updates the Tap Points for the user with the given awarded amount of currency.
    /// </summary>
    /// <param name="points">
    /// A <see cref="System.Int32"/>
    /// </param>
    public static void AwardTapPoints(int points)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.AwardTapPoints(points);
    }
示例#27
0
    public static void RefreshDisplayAdWithCurrencyID(string currencyID)
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return;
        }

        TapjoyPlatformPlugin.GetDisplayAdWithCurrencyID(currencyID);
    }
示例#28
0
    /// <summary>
    /// Returns the current amount of Tap Points that a user has.
    /// When using Tapjoy Managed currency, the user is determined by the UDID of the device.
    /// This can safely be called after Tap Points data is retrieved from the server.
    /// </summary>
    /// <returns>
    /// A <see cref="System.Int32"/>
    /// </returns>
    public static int QueryTapPoints()
    {
        if (Application.platform == RuntimePlatform.OSXEditor)
        {
            return(0);
        }

        return(TapjoyPlatformPlugin.QueryTapPoints());
    }
    // Use this for initialization
    void Awake()
    {
        //Set Static flags
        ChartBoostActiveStaticFlag = ChartBoostActiveFlag;
        RevMobActiveStaticFlag     = RevMobActiveFlag;
        AdMobActiveStaticFlag      = AdMobActiveFlag;
        PlayHavenActiveStaticFlag  = PlayHavenActiveFlag;
        IAdsActiveStaticFlag       = IAdsActiveFlag;
        TapJoyActiveStaticFlag     = TapJoyActiveFlag;
        FlurryActiveStaticFlag     = FlurryActiveFlag;

        //Initialize ChartBoost
        if (ChartBoostActiveFlag)
        {
            ChartBoostAndroid.init(ChartBoostID, ChartBoostSIG, false);
            ChartBoostAndroid.onStart();
            ChartBoostAndroid.cacheInterstitial(null);
            ChartBoostAndroid.cacheMoreApps();
        }

        //Initialize RevMob
        if (RevMobActiveFlag)
        {
            REVMOB_APP_IDS.Add("Android", RevMobID);
            revMobSession = RevMob.Start(REVMOB_APP_IDS);
        }

        //Initialize Admob
        if (AdMobActiveFlag)
        {
            AdMobAndroid.init(AdMobID);
        }

        //Initialize Playhaven
        if (PlayHavenActiveFlag)
        {
            gameObject.SendMessage("OpenNotification");
        }

        //Initialize iAds
        if (IAdsActiveFlag)
        {
        }

        //Initialize TapJoy
        if (TapJoyActiveFlag)
        {
            TapjoyPluginAndroid.RequestTapjoyConnect(TapJoyID, TapJoySecretKey);
        }

        //Initialize Flurry
        if (FlurryActiveFlag)
        {
            flurrySession = new FlurryAgent();
            flurrySession.onStartSession(FlurryID);
        }
    }
示例#30
0
    /// <summary>
    /// Returns the current amount of Tap Points that a user has.
    /// When using Tapjoy Managed currency, the user is determined by the UDID of the device.
    /// This can safely be called after Tap Points data is retrieved from the server.
    /// </summary>
    /// <returns>
    /// A <see cref="System.Int32"/>
    /// </returns>
    public static int QueryTapPoints()
    {
        if (Application.isEditor)
        {
            return(0);
        }

        return(TapjoyPlatformPlugin.QueryTapPoints());
    }