コード例 #1
0
ファイル: Push.cs プロジェクト: c4sh/unity3d-simple-push
    void Start()
    {
        GamedoniaUsers.Authenticate(OnLogin);
        printToConsole("Starting session with Gamedonia...");

        //Handle push
        GDPushService pushService = new GDPushService();

        pushService.RegisterEvent += new RegisterEventHandler(OnNotification);
        GamedoniaPushNotifications.AddService(pushService);
    }
コード例 #2
0
    private void OnFacebookMe(IDictionary data)
    {
        statusMsg  = "Initiating Gamedonia session...";
        fbUserId   = data ["id"] as string;
        fbUserName = data ["name"] as string;
        Debug.Log("AccessToken: " + FacebookBinding.GetAccessToken() + " fbuid: " + fbUserId);


        Dictionary <string, object> facebookCredentials = new Dictionary <string, object> ();

        facebookCredentials.Add("fb_uid", fbUserId);
        facebookCredentials.Add("fb_access_token", FacebookBinding.GetAccessToken());

        GamedoniaUsers.Authenticate(GamedoniaBackend.CredentialsType.FACEBOOK, facebookCredentials, OnFacebookLogin);
    }
コード例 #3
0
    void Start()
    {
        GamedoniaUsers.Authenticate(OnLogin);
        printToConsole("Starting session with Gamedonia...");

        //Register the callback
        GDInAppService reqService = new GDInAppService();

        reqService.RegisterEvent += new InAppEventHandler(OnProductsRequested);
        GamedoniaStoreInAppPurchases.AddRequestService(reqService);

        GDInAppService buyService = new GDInAppService();

        buyService.RegisterEvent += new InAppEventHandler(OnProductPurchased);
        GamedoniaStoreInAppPurchases.AddPurchaseService(buyService);
    }
コード例 #4
0
 void Start()
 {
     GamedoniaUsers.Authenticate(OnLogin);
     printToConsole("Starting session with Gamedonia...");
 }