Пример #1
0
    private IEnumerator PerformSocialShare(Dictionary <string, string> shareDetail)
    {
        // fake sending a social share
        yield return(new WaitForSeconds(0.5f));

        FuelSDK.SdkSocialShareCompleted();
    }
Пример #2
0
    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 );
    }
Пример #3
0
    public void GetEvents()
    {
        Debug.Log("FuelSDKGrooveIntegration - GetEvents called.");
        List <object> tags = GetEventTags();

        FuelSDK.GetEvents(tags);
    }
Пример #4
0
    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
        }
    }
Пример #5
0
    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);
    }
Пример #6
0
    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);
    }
Пример #7
0
    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);
    }
Пример #8
0
    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);
    }
Пример #9
0
    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
        }
    }
Пример #10
0
    public void GetEventsWithTags()
    {
        ResetEventsRecieved();

        List <object> eventFiltertags = GetEventFilterTags();

        FuelSDK.GetEvents(eventFiltertags);

        List <object> sampleEventFiltertags = GetSampleEventFilterTags();

        FuelSDK.GetSampleEvents(sampleEventFiltertags);

        StartCreateEventListCoroutine();
    }
Пример #11
0
    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);
        }
    }
Пример #12
0
    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);
        }
    }
Пример #13
0
    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);
        }
    }
Пример #14
0
    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);
        }
    }
Пример #15
0
    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;
         */
    }
Пример #16
0
    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();
    }
Пример #17
0
    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);
    }
Пример #18
0
    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);
        }
    }
Пример #19
0
 public void GetChallengeCount()
 {
     FuelSDK.SyncChallengeCounts();
 }
Пример #20
0
 public void LaunchMultiplayer()
 {
     FuelSDK.Launch();
 }
Пример #21
0
	public override void OnNotificationDisabled (FuelSDK.NotificationType notificationType)
	{
		m_fuelExample.OnNotificationDisabled (notificationType);
	}
Пример #22
0
    /// <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);
    }
Пример #23
0
    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);
    }
Пример #24
0
	public abstract  void SetOrientationUIIgnite (FuelSDK.ContentOrientation orientation);
Пример #25
0
 public void GetUserValues()
 {
     FuelSDK.SyncUserValues();
 }
Пример #26
0
	public abstract bool DisableNotification (FuelSDK.NotificationType notificationType);
Пример #27
0
 public void GetLeaderBoard(string boardID)
 {
     Debug.Log("FuelSDKGrooveIntegration - GetLeaderBoard. boardID: " + boardID);
     FuelSDK.GetLeaderBoard(boardID);
 }
Пример #28
0
 public void GetMission(string missionID)
 {
     Debug.Log("FuelSDKGrooveIntegration - GetMission. missionID: " + missionID);
     FuelSDK.GetMission(missionID);
 }
Пример #29
0
 public void GetQuest(string questID)
 {
     Debug.Log("FuelSDKTripleTownIntegration - GetQuest. questID: " + questID);
     FuelSDK.GetQuest(null);
 }
Пример #30
0
    /*--------------------------------------------------------------------------------------------*/
    #region ------------------------------------- NON Ignite Stuff --------------------------------
    //debug, for changing the user.  Launch compete, change user, exit.


    public void ChangeUser()
    {
        FuelSDK.Launch();
    }
Пример #31
0
    void Start()
    {
        FuelSDK.setListener(new GroovePlanetFuelSDKListener());

        GetEvents();
    }
Пример #32
0
	public override void OnImplicitLaunch (FuelSDK.ApplicationState applicationState)
	{
		m_fuelExample.OnImplicitLaunch(applicationState);
	}
Пример #33
0
 public void GetTournamentInfo()
 {
     FuelSDK.SyncTournamentInfo();
 }
Пример #34
0
 public void GetVirtualGoods()
 {
     FuelSDK.SyncVirtualGoods();
 }
Пример #35
0
	public override bool IsNotificationEnabled (FuelSDK.NotificationType notificationType) {
		return iOSIsNotificationEnabled(notificationType);
	}
Пример #36
0
	private static extern bool iOSDisableNotification(FuelSDK.NotificationType notificationType);
Пример #37
0
	public override bool EnableNotification (FuelSDK.NotificationType notificationType) {
		return iOSEnableNotification(notificationType);
	}
Пример #38
0
    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);
    }
Пример #39
0
	public override bool IsNotificationEnabled (FuelSDK.NotificationType notificationType) {
		return false;
	}
Пример #40
0
    /// <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);
    }
Пример #41
0
	public void OnNotificationDisabled(FuelSDK.NotificationType type) 
	{
		Debug.Log ("OnNotificationDisabled - disabled: " + type.ToString ());
		
		// update game notification UI widget for the given notification type
	}
Пример #42
0
	public abstract bool IsNotificationEnabled (FuelSDK.NotificationType notificationType);
Пример #43
0
	public virtual void OnImplicitLaunch (FuelSDK.ApplicationState applicationState) {}
Пример #44
0
	public override  void SetOrientationUIIgnite (FuelSDK.ContentOrientation orientation) {
		iOSSetOrientationuiIgnite(orientation.ToString());
	}
Пример #45
0
	public virtual void OnNotificationDisabled (FuelSDK.NotificationType notificationType) {}
Пример #46
0
	private static extern bool iOSIsNotificationEnabled(FuelSDK.NotificationType notificationType);
Пример #47
0
    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);
    }
Пример #48
0
	public override bool DisableNotification (FuelSDK.NotificationType notificationType) {
		return false;
	}
Пример #49
0
 private void Initialize()
 {
     m_listener = new FuelListenerExample(this);
     FuelSDK.setListener(m_listener);
 }
Пример #50
0
	public override void SetOrientationUICompete (FuelSDK.ContentOrientation orientation) {}
Пример #51
0
	public void OnImplicitLaunch(FuelSDK.ApplicationState applicationState)
	{
		Debug.Log ("OnImplicitLaunch - application state: " + applicationState.ToString ());

		// apply implicit launch policy based on the given application state
	}