PlayMaker Feedback > Action Requests

gamecenter actions

(1/3) > >>

dennisli168:
I have already finished my game and I'm desperately looking for help in gamecenter integration.
I purchased the Gamecenter plugin from unity asset store and I need help turning the scripts into unity actions.
This is the sample script that came with the plugin, which demonstrates what the plugin is supposed to do:

using UnityEngine;
using System.Collections;

public class Test : MonoBehaviour {

   // Use this for initialization
   void Start ()
   {
      // configure all events
      GameCenter.ConnectionState += new GameCenter.ConnectionStateDelegate(GameCenter_ConnectionState);
      
      // begin authenification
      GameCenter.Authenticate(true, true);
   }
   
   void OnGUI()
   {
      if (GUI.Button(new Rect(10,10,200,200), "Report achievement"))
         GameCenter.ReportAchievement("com.games4fun.ufohotseat.firstwin");
      
      if (GUI.Button(new Rect(10,220,200,200), "Show achievements"))
         GameCenter.ShowAchievements();
      
      if (GUI.Button(new Rect(10,430,200,200), "Show leaderboard"))
         GameCenter.ShowLeaderboard();
      
      if (GUI.Button(new Rect(220,10,200,200), "Post 100 scores to leaderbaord"))
         GameCenter.ReportScore(100, "you leaderboard id");      
      
      if (GUI.Button(new Rect(220,220,200,200), "Get all scores"))
         ShowScores("you leaderboard id");
   }
   
   void GameCenter_ConnectionState(bool _online)
   {
      Debug.Log(System.String.Format("{0} player is {1}", GameCenter.PlayerAlias, _online ? "online" : "offline"));
   }
   
   void ShowScores(string _categoryID)
   {
      Debug.Log(System.String.Format("{0} player have {1} scores in {2} table", GameCenter.PlayerAlias, GameCenter.GetScore(_categoryID), _categoryID));
   }
}

I have no experience in c# coding and I am not sure what I can do to get things started. Is there a tutorial for making custom actions? I know theres a custom action wizard, but I have no idea what to do with it. These methods dont look too complicated, is it possible for me to find similar actions already in playmaker, substitute their codes with these new methods and create new actions?

jeanfabre:
Hi,

 allow me few days, and I'll get back to you with something to get you up and running. If no one stepped in before and If you don't hear back next week, don't hesitate to remind me.

bye,

 Jean

Davision:
gamecenter actions would be sweet! I will have to get gamecenter implemented here too.

dennisli168:
Jean,

Words cannot express how much I appreciate your work!!!!
Cant wait to try those gamecenter acitons!

jeanfabre:
Hi,

 Ok, it's now available:

http://hutonggames.com/playmakerforum/index.php?topic=2191.0

Thanks again Dennis for your support, this has definitely speed up the development of these actions.

bye,

 Jean

Navigation

[0] Message Index

[#] Next page

Go to full version