private IEnumerator PerformSocialShare(Dictionary <string, string> shareDetail) { // fake sending a social share yield return(new WaitForSeconds(0.5f)); FuelSDK.SdkSocialShareCompleted(); }
public void SendProgress() { Debug.Log("FuelSDKGrooveIntegration - SendProgress called."); Dictionary <string, int> scoreDict = new Dictionary <string, int>(); scoreDict.Add("value", variable_inc); Dictionary <string, object> progressDict = new Dictionary <string, object>(); progressDict.Add("bronze", scoreDict); //these keys should match the variable names List <object> tags = new List <object>(); tags.Add("BronzeFilter"); tags.Add("bronzeSong1"); List <object> methodParams = new List <object>(); methodParams.Add(progressDict); methodParams.Add(tags); bool success = FuelSDK.ExecMethod("SendProgress", methodParams); if (success == true) { //Your progress has been successfully updated } //FuelSDK.SendProgress( progressDict , tags ); }
public void GetEvents() { Debug.Log("FuelSDKGrooveIntegration - GetEvents called."); List <object> tags = GetEventTags(); FuelSDK.GetEvents(tags); }
public void GetLeaderBoard(string Id) { bool success = FuelSDK.GetLeaderBoard(Id); if (success == true) { //Everything is good you can expect your data in the event callback } }
public void GetEventsViaExecMethod() { List <object> tags = new List <object> (); tags.Add("allowedMissions"); tags.Add("allowedQuests"); // invoke FuelSDK.GetEvents () via FuelSDK.ExecMethod () FuelSDK.ExecMethod("GetEvents", tags); }
public void GetEvents() { List <object> tags = new List <object> (); tags.Add("allowedMissions"); tags.Add("allowedQuests"); // retrieve events for the given fake tag set FuelSDK.GetEvents(tags); }
public override bool EnableNotification(FuelSDK.NotificationType notificationType) { AndroidJavaObject fuelSDKNotificationType = getFuelSDKNotificationType (notificationType); if (fuelSDKNotificationType == null) { FuelSDKCommon.Log (FuelSDKCommon.LogLevel.ERROR, "invalid notification type"); return false; } return m_jniFuelSDKUnity.CallStatic<bool> ("enableNotification", fuelSDKNotificationType); }
public void SendProgress() { Dictionary <string, object> progress = new Dictionary <string, object> (); progress.Add("score", "499"); List <object> tags = new List <object> (); tags.Add("wizard"); // send fake player progress FuelSDK.SendProgress(progress, tags); }
public void GetEvents() { List <object> tags = new List <object>(); tags.Add("BronzeFilter"); tags.Add("bronzeSong1"); tags.Add("bronzeSong2"); bool success = FuelSDK.GetEvents(tags); if (success == true) { //Everything is good you can expect your data in the event callback } }
public void GetEventsWithTags() { ResetEventsRecieved(); List <object> eventFiltertags = GetEventFilterTags(); FuelSDK.GetEvents(eventFiltertags); List <object> sampleEventFiltertags = GetSampleEventFilterTags(); FuelSDK.GetSampleEvents(sampleEventFiltertags); StartCreateEventListCoroutine(); }
public void GetLeaderBoards() { // request information on the leaderboards that // the player is eligible for if (m_leaderBoardIDs.Count == 0) { Debug.Log("GetLeaderBoards - no leaderboard events to retrieve"); return; } foreach (string leaderBoardID in m_leaderBoardIDs) { FuelSDK.GetLeaderBoard(leaderBoardID); } }
public void GetMissions() { // request information on the missions that // the player is eligible for if (m_missionIDs.Count == 0) { Debug.Log("GetMissions - no mission events to retrieve"); return; } foreach (string missionID in m_missionIDs) { FuelSDK.GetMission(missionID); } }
public void GetQuests() { // request information on the quests that // the player is eligible for if (m_questIDs.Count == 0) { Debug.Log("GetQuests - no quest events to retrieve"); return; } foreach (string questID in m_questIDs) { FuelSDK.GetQuest(questID); } }
public void JoinOptionalEvents() { // request joining optional events that // the player is eligible for if (m_optionalEventIDs.Count == 0) { Debug.Log("JoinOptionalEvents - no optional events to join"); return; } foreach (string optionalEventID in m_optionalEventIDs) { FuelSDK.JoinEvent(optionalEventID); } }
void Awake() { fuelSDKInstance = GetComponent <FuelSDK>(); /* Unused variables are errors in sonic * epochTicks = new TimeSpan(new DateTime(1970, 1, 1).Ticks); * start1 = new TimeSpan(DateTime.UtcNow.Ticks) - epochTicks; * end1 = new TimeSpan(DateTime.UtcNow.AddMinutes(1).Ticks) - epochTicks; * * start2 = new TimeSpan(DateTime.UtcNow.AddMinutes(1).Ticks) - epochTicks; * end2 = new TimeSpan(DateTime.UtcNow.AddMinutes(2).Ticks) - epochTicks; * * start3 = new TimeSpan(DateTime.UtcNow.AddMinutes(2).Ticks) - epochTicks; * end3 = new TimeSpan(DateTime.UtcNow.AddMinutes(3).Ticks) - epochTicks; */ }
private IEnumerator PerformMatch(Dictionary <string, object> matchInfo) { // fake obtaining match results yield return(new WaitForSeconds(0.5f)); Dictionary <string, object> matchResult = new Dictionary <string, object> (); matchResult.Add("matchID", m_matchID); matchResult.Add("tournamentID", m_tournamentID); matchResult.Add("score", "55"); FuelSDK.SubmitMatchResult(matchResult); // return back to multiplayer FuelSDK.Launch(); }
private IEnumerator PerformSocialLogin(bool allowCache) { // fake retrieval of social login info yield return(new WaitForSeconds(0.5f)); Dictionary <string, string> loginInfo = new Dictionary <string, string> (); loginInfo.Add("provider", "facebook"); loginInfo.Add("email", "*****@*****.**"); loginInfo.Add("id", "testguyid"); loginInfo.Add("nickname", "testguy445"); loginInfo.Add("token", "testguy445"); FuelSDK.SdkSocialLoginCompleted(loginInfo); // return null in the case of a failure to retrieve // social login info //FuelSDK.SdkSocialLoginCompleted(null); }
private void Awake() { if (!m_initialized) { GameObject.DontDestroyOnLoad(gameObject); if (!Application.isEditor) { // Initialize the Fuel SDK listener // reference for later use by the launch // methods. m_listener = new FuelListener(this); FuelSDK.setListener(m_listener); } m_initialized = true; } else { GameObject.Destroy(gameObject); } }
public void GetChallengeCount() { FuelSDK.SyncChallengeCounts(); }
public void LaunchMultiplayer() { FuelSDK.Launch(); }
public override void OnNotificationDisabled (FuelSDK.NotificationType notificationType) { m_fuelExample.OnNotificationDisabled (notificationType); }
/// <summary> /// Retrieves the AndroidJavaObject PropellerSDKNotificationType equivalent to the given NotificationType /// </summary> /// <returns> /// The AndroidJavaObject PropellerSDKNotificationType equivalent to the given notification type, null otherwise /// </returns> /// <param name='notificationType'> /// The notification type whose equivalent will be retrieved /// </param> private static AndroidJavaObject getFuelSDKOrientationType(FuelSDK.ContentOrientation orientation) { string orientationTypeValue = orientation.ToString(); AndroidJavaClass fuelSDKNotificationTypeClass = new AndroidJavaClass("com.fuelpowered.lib.fuelsdk.fuelorientationtype"); return fuelSDKNotificationTypeClass.CallStatic<AndroidJavaObject>("findByValue", orientationTypeValue); }
public override void SetOrientationUIIgnite(FuelSDK.ContentOrientation orientation) { AndroidJavaObject fuelSDKOrientationType = getFuelSDKOrientationType (orientation); if (fuelSDKOrientationType == null) { FuelSDKCommon.Log (FuelSDKCommon.LogLevel.ERROR, "invalid orientation type"); } m_jniFuelSDKUnity.CallStatic ("setOrientationuiIgnite", fuelSDKOrientationType); }
public abstract void SetOrientationUIIgnite (FuelSDK.ContentOrientation orientation);
public void GetUserValues() { FuelSDK.SyncUserValues(); }
public abstract bool DisableNotification (FuelSDK.NotificationType notificationType);
public void GetLeaderBoard(string boardID) { Debug.Log("FuelSDKGrooveIntegration - GetLeaderBoard. boardID: " + boardID); FuelSDK.GetLeaderBoard(boardID); }
public void GetMission(string missionID) { Debug.Log("FuelSDKGrooveIntegration - GetMission. missionID: " + missionID); FuelSDK.GetMission(missionID); }
public void GetQuest(string questID) { Debug.Log("FuelSDKTripleTownIntegration - GetQuest. questID: " + questID); FuelSDK.GetQuest(null); }
/*--------------------------------------------------------------------------------------------*/ #region ------------------------------------- NON Ignite Stuff -------------------------------- //debug, for changing the user. Launch compete, change user, exit. public void ChangeUser() { FuelSDK.Launch(); }
void Start() { FuelSDK.setListener(new GroovePlanetFuelSDKListener()); GetEvents(); }
public override void OnImplicitLaunch (FuelSDK.ApplicationState applicationState) { m_fuelExample.OnImplicitLaunch(applicationState); }
public void GetTournamentInfo() { FuelSDK.SyncTournamentInfo(); }
public void GetVirtualGoods() { FuelSDK.SyncVirtualGoods(); }
public override bool IsNotificationEnabled (FuelSDK.NotificationType notificationType) { return iOSIsNotificationEnabled(notificationType); }
private static extern bool iOSDisableNotification(FuelSDK.NotificationType notificationType);
public override bool EnableNotification (FuelSDK.NotificationType notificationType) { return iOSEnableNotification(notificationType); }
public void SendProgress() { ResetProgressDictionary(); //Rings Collected SetRingsCollectedProgress(100); //Red Rings Collected SetRedRingsCollectedProgress(100); //Distance Run Dictionary <string, int> distanceRunDict = new Dictionary <string, int>(); distanceRunDict ["value"] = 500; progressDictionary["DistanceRunDict"] = distanceRunDict; //Score Dictionary <string, int> scoreDict = new Dictionary <string, int>(); scoreDict ["value"] = 500; progressDictionary["ScoreDict"] = scoreDict; //Destroy Enemies Dictionary <string, int> destroyEnemiesDict = new Dictionary <string, int>(); destroyEnemiesDict ["value"] = 500; progressDictionary["DestroyEnemiesDict"] = destroyEnemiesDict; //Destroy Crabs Dictionary <string, int> destroyCrabsDict = new Dictionary <string, int>(); destroyCrabsDict ["value"] = 25; progressDictionary["DestroyCrabsDict"] = destroyCrabsDict; //Destroy Motor Bugs Dictionary <string, int> destroyMotorbugsDict = new Dictionary <string, int>(); destroyMotorbugsDict ["value"] = 25; progressDictionary["DestroyMotorbugsDict"] = destroyMotorbugsDict; //Lane Changes Dictionary <string, int> laneChangesDict = new Dictionary <string, int>(); laneChangesDict ["value"] = 25; progressDictionary["LaneChangesDict"] = laneChangesDict; //Dashes Used Dictionary <string, int> dashesUsedDict = new Dictionary <string, int>(); dashesUsedDict ["value"] = 9; progressDictionary["DashesUsedDict"] = dashesUsedDict; //Jump Obstacle Dictionary <string, int> jumpObstacleDict = new Dictionary <string, int>(); jumpObstacleDict ["value"] = 9; progressDictionary["JumpObstacleDict"] = jumpObstacleDict; //Jump Enemy Dictionary <string, int> jumpEnemyDict = new Dictionary <string, int>(); jumpEnemyDict ["value"] = 9; progressDictionary["JumpEnemyDict"] = jumpEnemyDict; //Roll Under Dictionary <string, int> rollUnderDict = new Dictionary <string, int>(); rollUnderDict ["value"] = 9; progressDictionary["RollUnderDict"] = rollUnderDict; //Roll Distance Dictionary <string, int> rollDistanceDict = new Dictionary <string, int>(); rollDistanceDict ["value"] = 9; progressDictionary["RollDistanceDict"] = rollDistanceDict; List <object> ruleFilterTags = new List <object>(); FuelSDK.SendProgress(progressDictionary, ruleFilterTags); }
public override bool IsNotificationEnabled (FuelSDK.NotificationType notificationType) { return false; }
/// <summary> /// Retrieves the AndroidJavaObject PropellerSDKNotificationType equivalent to the given NotificationType /// </summary> /// <returns> /// The AndroidJavaObject PropellerSDKNotificationType equivalent to the given notification type, null otherwise /// </returns> /// <param name='notificationType'> /// The notification type whose equivalent will be retrieved /// </param> private static AndroidJavaObject getFuelSDKNotificationType(FuelSDK.NotificationType notificationType) { int notificationTypeValue = (int)notificationType; AndroidJavaClass fuelSDKNotificationTypeClass = new AndroidJavaClass("com.fuelpowered.lib.fuelsdk.fuelnotificationtype"); return fuelSDKNotificationTypeClass.CallStatic<AndroidJavaObject>("findByValue", notificationTypeValue); }
public void OnNotificationDisabled(FuelSDK.NotificationType type) { Debug.Log ("OnNotificationDisabled - disabled: " + type.ToString ()); // update game notification UI widget for the given notification type }
public abstract bool IsNotificationEnabled (FuelSDK.NotificationType notificationType);
public virtual void OnImplicitLaunch (FuelSDK.ApplicationState applicationState) {}
public override void SetOrientationUIIgnite (FuelSDK.ContentOrientation orientation) { iOSSetOrientationuiIgnite(orientation.ToString()); }
public virtual void OnNotificationDisabled (FuelSDK.NotificationType notificationType) {}
private static extern bool iOSIsNotificationEnabled(FuelSDK.NotificationType notificationType);
public void OnVirtualGoodList(string transactionID, List <object> virtualGoods) { if (transactionID == null) { Debug.Log("OnVirtualGoodList - transaction ID: <undefined>"); return; } Debug.Log("OnVirtualGoodList - transaction ID: " + transactionID); m_transactionID = transactionID; if (virtualGoods == null) { Debug.Log("OnVirtualGoodList - virtual good: <undefined_list>"); return; } m_consumedVirtualGoodIDs.Clear(); if (virtualGoods.Count == 0) { Debug.Log("OnVirtualGoodList - virtual good: <empty_list>"); return; } string virtualGoodsString = FuelSDKCommon.Serialize(virtualGoods); if (virtualGoodsString == null) { Debug.Log("OnVirtualGoodList - unable to serialize the virtual good list"); return; } Debug.Log("OnVirtualGoodList - virtual goods: " + virtualGoodsString); bool consumed = true; foreach (object virtualGoodObject in virtualGoods) { Dictionary <string, object> virtualGood = virtualGoodObject as Dictionary <string, object>; if (virtualGood == null) { Debug.Log("OnVirtualGoodList - invalid virtual good data type: " + virtualGoodObject.GetType().Name); consumed = false; break; } object goodIDObject = virtualGood["goodId"]; if (goodIDObject == null) { Debug.Log("OnVirtualGoodList - missing expected virtual good ID"); consumed = false; break; } if (!(goodIDObject is string)) { Debug.Log("OnVirtualGoodList - invalid virtual good ID data type: " + goodIDObject.GetType().Name); consumed = false; break; } string goodID = (string)goodIDObject; // based on the virtual good ID, update the player // inventory with the received virtual good m_consumedVirtualGoodIDs.Add(goodID); } if (!consumed) { foreach (string goodID in m_consumedVirtualGoodIDs) { // revert the currently awarded virtual goods for // this transaction from the player inventory Debug.Log("OnVirtualGoodList - reverting consumed virtual good ID: " + goodID); } m_consumedVirtualGoodIDs.Clear(); } FuelSDK.AcknowledgeVirtualGoods(transactionID, consumed); }
public override bool DisableNotification (FuelSDK.NotificationType notificationType) { return false; }
private void Initialize() { m_listener = new FuelListenerExample(this); FuelSDK.setListener(m_listener); }
public override void SetOrientationUICompete (FuelSDK.ContentOrientation orientation) {}
public void OnImplicitLaunch(FuelSDK.ApplicationState applicationState) { Debug.Log ("OnImplicitLaunch - application state: " + applicationState.ToString ()); // apply implicit launch policy based on the given application state }