Пример #1
0
 void OnGUI()
 {
     if (GUI.Button(new Rect(50, 50, 200, 50), "<-"))
     {
         Application.LoadLevel("MainScene");
     }
     if (GUI.Button(new Rect(50, 150, 200, 50), "SignupWithBaseName"))
     {
         LobiCoreAPIBridge.SignupWithBaseName(name, "SignupWithBaseNameCallback", "LobiUnity");
     }
     if (GUI.Button(new Rect(50, 250, 200, 50), "SetAccountBaseName"))
     {
         LobiCoreBridge.SetAccountBaseName("LobiUnity");
     }
     if (GUI.Button(new Rect(50, 350, 200, 50), "PresentProfile"))
     {
         LobiCoreBridge.PresentProfile();
     }
     if (GUI.Button(new Rect(50, 450, 200, 50), "PresentAdWall"))
     {
         LobiCoreBridge.PresentAdWall();
     }
     if (GUI.Button(new Rect(50, 550, 200, 50), "BindToLobiAccount"))
     {
         LobiCoreBridge.BindToLobiAccount();
     }
     if (GUI.Button(new Rect(50, 650, 200, 50), "IsBoundWithLobiAccount"))
     {
         LobiCoreAPIBridge.IsBoundWithLobiAccount();
     }
 }
 public void ButtonPush()
 {
     //Debug.Log("Button Push !!");
     if (LobiCoreBridge.IsSignedIn())
     {
         Debug.Log("アカウント作成済み");
         /* アカウントが作成済みかチェック */
         int val = (int)(10000.0f * Random.value);
         LobiRankingAPIBridge.SendRanking("Button", "SendRankingCallback", "test01", val);
     }
     else
     {
         Debug.Log("アカウント作成がまだ");
         LobiCoreAPIBridge.SignupWithBaseName("Button", "SendAccountCallBack", "PlayerName");
     }
 }