Example #1
0
    static public void MessageFromC(string wrapperClass, string msg)
    {
        Debug.Log("Unity: ATUnityCBridge::MessageFromC(" + wrapperClass + "," + msg + ")");
        Dictionary <string, object> msgDict = Json.Deserialize(msg) as Dictionary <string, object>;

        if (wrapperClass.Equals("ATRewardedVideoWrapper"))
        {
            Debug.Log("Unity: ATUnityCBridge::MessageFromC(), hit rv");
            ATRewardedVideoWrapper.InvokeCallback((string)msgDict["callback"], (Dictionary <string, object>)msgDict["msg"]);
        }
        else if (wrapperClass.Equals("ATNativeAdWrapper"))
        {
            ATNativeAdWrapper.InvokeCallback((string)msgDict["callback"], (Dictionary <string, object>)msgDict["msg"]);
        }
        else if (wrapperClass.Equals("ATInterstitialAdWrapper"))
        {
            ATInterstitialAdWrapper.InvokeCallback((string)msgDict["callback"], (Dictionary <string, object>)msgDict["msg"]);
        }
        else if (wrapperClass.Equals("ATBannerAdWrapper"))
        {
            ATBannerAdWrapper.InvokeCallback((string)msgDict["callback"], (Dictionary <string, object>)msgDict["msg"]);
        }
        else if (wrapperClass.Equals("ATNativeBannerAdWrapper"))
        {
            ATNativeBannerAdWrapper.InvokeCallback((string)msgDict["callback"], (Dictionary <string, object>)msgDict["msg"]);
        }
    }
Example #2
0
 public void loadAd(string placementId, string mapJson)
 {
     Debug.Log("ATNativeBannerAdClient::loadAd()");
     ATNativeBannerAdWrapper.setClientForPlacementID(placementId, this);
     Debug.Log("ATNativeBannerAdClient::loadAd(), after set client");
     ATNativeBannerAdWrapper.loadAd(placementId, mapJson);
     Debug.Log("ATNativeBannerAdClient::loadAd(), after invoke load ad");
 }
Example #3
0
 public void removeAd(string placementId)
 {
     Debug.Log("ATNativeBannerAdClient::removeAd()");
     ATNativeBannerAdWrapper.removeAd(placementId);
 }
Example #4
0
 public void showAd(string placementId, ATRect rect, Dictionary <string, string> pairs)
 {
     Debug.Log("ATNativeBannerAdClient::showAd()");
     ATNativeBannerAdWrapper.showAd(placementId, rect, pairs);
 }
Example #5
0
 public bool adReady(string placementId)
 {
     Debug.Log("ATNativeBannerAdClient::adReady()");
     return(ATNativeBannerAdWrapper.adReady(placementId));
 }