예제 #1
0
    void OnGUI()
    {
        if (GUI.Button(new Rect(10, 10, 150, 50), _campaignsAvailable ? "Open Zone 1" : "Waiting..."))
        {
            if (_campaignsAvailable)
            {
                ApplifierImpactMobileExternal.Log("Open Zone 1 -button clicked");
                ApplifierImpactMobile.showImpact("16-default");
            }
        }

        if (GUI.Button(new Rect(10, 70, 150, 50), _campaignsAvailable ? "Open Zone 2" : "Waiting..."))
        {
            if (_campaignsAvailable)
            {
                ApplifierImpactMobileExternal.Log("Open Zone 2 -button clicked");
                ApplifierImpactMobile.showImpact("16-default", "ship", new Dictionary <string, string> {
                    { "openAnimated", "true" },
                    { "noOfferScreen", "true" },
                    { "sid", "testiSid" },
                    { "muteVideoSounds", "true" },
                    { "useDeviceOrientationForVideo", "true" }
                });
            }
        }
    }
예제 #2
0
    public void onVideoStarted()
    {
        if (_videoStartedDelegate != null)
        {
            _videoStartedDelegate();
        }

        ApplifierImpactMobileExternal.Log("onVideoStarted");
    }
예제 #3
0
    public void onCampaignsFetchFailed()
    {
        _campaignsAvailable = false;
        if (_campaignsFetchFailedDelegate != null)
        {
            _campaignsFetchFailedDelegate();
        }

        ApplifierImpactMobileExternal.Log("onCampaignsFetchFailed");
    }
예제 #4
0
    public void onCampaignsAvailable()
    {
        _campaignsAvailable = true;
        if (_campaignsAvailableDelegate != null)
        {
            _campaignsAvailableDelegate();
        }

        ApplifierImpactMobileExternal.Log("onCampaignsAvailable");
    }
예제 #5
0
    /* Events */

    public void onImpactClose()
    {
        _impactOpen          = false;
        AudioListener.pause  = false;
        AudioListener.volume = _savedAudioVolume;
        Time.timeScale       = _savedTimeScale;

        if (_impactCloseDelegate != null)
        {
            _impactCloseDelegate();
        }

        ApplifierImpactMobileExternal.Log("onImpactClose");
    }
예제 #6
0
    public void onVideoCompleted(string parameters)
    {
        if (parameters != null)
        {
            List <string> splittedParameters = new List <string>(parameters.Split(';'));
            string        rewardItemKey      = splittedParameters.ToArray().GetValue(0).ToString();
            bool          skipped            = splittedParameters.ToArray().GetValue(1).ToString() == "true" ? true : false;

            if (_videoCompletedDelegate != null)
            {
                _videoCompletedDelegate(rewardItemKey, skipped);
            }

            ApplifierImpactMobileExternal.Log("onVideoCompleted: " + rewardItemKey + " - " + skipped);
        }
    }
예제 #7
0
    public static Dictionary <string, string> getRewardItemDetailsWithKey(string rewardItemKey)
    {
        Dictionary <string, string> retDict = new Dictionary <string, string>();
        string rewardItemDataString         = "";

        if (_campaignsAvailable)
        {
            rewardItemDataString = ApplifierImpactMobileExternal.getRewardItemDetailsWithKey(rewardItemKey);

            if (rewardItemDataString != null)
            {
                List <string> splittedData = new List <string>(rewardItemDataString.Split(';'));
                ApplifierImpactMobileExternal.Log("UnityAndroid: getRewardItemDetailsWithKey() rewardItemDataString=" + rewardItemDataString);

                if (splittedData.Count == 2)
                {
                    retDict.Add(getRewardItemNameKey(), splittedData.ToArray().GetValue(0).ToString());
                    retDict.Add(getRewardItemPictureKey(), splittedData.ToArray().GetValue(1).ToString());
                }
            }
        }

        return(retDict);
    }
예제 #8
0
 public void onImpactOpen()
 {
     ApplifierImpactMobileExternal.Log("onImpactOpen");
 }