<commit_before>(function() {

    if (window.cordova && typeof require !== 'undefined') {
        cordova.require('com.ludei.social.common.Social'); //force dependency load
    }
    var Cocoon = window.Cocoon;

    /**
     * This namespace represents all the basic functionalities available in the CocoonJS extension API.
     *
     * <div class="alert alert-success">
     *   Here you will find a demo about this namespace: <a href="https://github.com/ludei/cocoonjs-demos/tree/Multiplayer">Multiplayer demo</a>.
     *</div>
     *
     * <div class="alert alert-warning">
     *    <strong>Warning!</strong> This JavaScript extension requires some configuration parameters on the <a href="https://ludei.zendesk.com/hc/en-us">cloud compiler</a>!
     * </div>
     * @namespace Cocoon.Social.GameCenter
     */
    Cocoon.define("Cocoon.Social", function(extension) {

        extension.GameCenterExtension = function() {

            this.serviceName = "LDGameCenterPlugin";
            this.onGameCenterLoginStateChanged = new Cocoon.Signal();
            this.on = this.onGameCenterLoginStateChanged.expose();
            document.addEventListener('deviceready', function() {
                this.init();
            }.bind(this));
            return this;
        };

        extension.GameCenterExtension.prototype = {

            _currentPlayer: null,

            init: function() {
                var me = this;
                Cocoon.exec(this.serviceName, "setListener", [], function(player) {
                    me._currentPlayer = player;
                    me.onGameCenterLoginStateChanged.emit("loginStatusChanged", [player]);
                });
            },

            /**
             * This namespace represents all the basic functionalities available in the CocoonJS extension API.
             * <div class="alert alert-warning">
             *    <strong>Warning!</strong> This JavaScript extension requires some configuration parameters on the <a href="https://ludei.zendesk.com/hc/en-us">cloud compiler</a>!.
             * </div>
             */<commit_msg>Game Center doc updated<commit_after>(function() {

    if (window.cordova && typeof require !== 'undefined') {
        cordova.require('com.ludei.social.common.Social'); //force dependency load
    }
    var Cocoon = window.Cocoon;

    /**
     * Cocoon Social Interface for the Game Center Extension.
     * @namespace Cocoon.Social.GameCenter
     */
    Cocoon.define("Cocoon.Social", function(extension) {

        extension.GameCenterExtension = function() {

            this.serviceName = "LDGameCenterPlugin";
            this.onGameCenterLoginStateChanged = new Cocoon.Signal();
            this.on = this.onGameCenterLoginStateChanged.expose();
            document.addEventListener('deviceready', function() {
                this.init();
            }.bind(this));
            return this;
        };

        extension.GameCenterExtension.prototype = {

            _currentPlayer: null,

            init: function() {
                var me = this;
                Cocoon.exec(this.serviceName, "setListener", [], function(player) {
                    me._currentPlayer = player;
                    me.onGameCenterLoginStateChanged.emit("loginStatusChanged", [player]);
                });
            },
{'fraction_non_alphanumeric': 0.11844484629294756, 'fraction_numerical': 0.0, 'mean_word_length': 2.163965681601525, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5871799', 'n_tokens_mistral': 888, 'n_tokens_neox': 836, 'n_words': 181}