1.0.5 • Published 8 years ago

playfabcocoscreator v1.0.5

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

PlayFab Cocos Creator Extension

  1. Overview:

Adds ability to use PlayFab in Cocos Creator without issues across platforms. Taken from the Playfab JS SDK.

  1. Example Usage

var PlayFab = require('playfabcocoscreator')
cc.Class({
    extends: cc.Component,

    properties: {
        label: {
            default: null,
            type: cc.Label
        },
        // defaults, set visually when attaching this script to the Canvas
        text: 'Hello, World!'
    },

    // use this for initialization
    onLoad: function () {
        //this.label.string = this.text;
        
        console.log(PlayFab);
        PlayFab.settings.titleId = "<titleId>";
        PlayFab.ClientApi.LoginWithCustomID(
            {
                CustomID:"<CustomID>"
            }, (res, err)=>{
                if(err){
                    console.log("Error", err);
                    return;
                }
                console.log("result:" , res);
            }

        );
        
        
        
    },

    // called every frame
    update: function (dt) {

    },
});
  1. Todo

Setup proper typing files and better examples maybe?

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago