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" } }); } } }
public void onVideoStarted() { if (_videoStartedDelegate != null) { _videoStartedDelegate(); } ApplifierImpactMobileExternal.Log("onVideoStarted"); }
public void onCampaignsFetchFailed() { _campaignsAvailable = false; if (_campaignsFetchFailedDelegate != null) { _campaignsFetchFailedDelegate(); } ApplifierImpactMobileExternal.Log("onCampaignsFetchFailed"); }
public void onCampaignsAvailable() { _campaignsAvailable = true; if (_campaignsAvailableDelegate != null) { _campaignsAvailableDelegate(); } ApplifierImpactMobileExternal.Log("onCampaignsAvailable"); }
/* Events */ public void onImpactClose() { _impactOpen = false; AudioListener.pause = false; AudioListener.volume = _savedAudioVolume; Time.timeScale = _savedTimeScale; if (_impactCloseDelegate != null) { _impactCloseDelegate(); } ApplifierImpactMobileExternal.Log("onImpactClose"); }
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); } }
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); }
public void onImpactOpen() { ApplifierImpactMobileExternal.Log("onImpactOpen"); }