Skip to content
Permalink
Browse files

Merge pull request #24 from gameeapp/gameejs2_3

Gameejs 2.3
  • Loading branch information...
miroslavchmelka committed Jun 6, 2019
2 parents a678bc0 + 8d28ded commit 0c9a14904a671019e8c20c2a3b532cebe5cb4ed0
Showing with 24 additions and 5 deletions.
  1. +2 −2 gamee/dist/gamee-js.min.js
  2. +1 −1 gamee/dist/gamee-js.min.js.map
  3. +7 −1 gamee/src/core.js
  4. +13 −0 gamee/src/gameeAPI.js
  5. +1 −1 package.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -107,7 +107,7 @@ export var core = (function () {

/** internal variables/constants (uppercase) coupled inside separate object for potential easy referencing */
var internals = {
VERSION: "2.2.2", // version of the gamee library
VERSION: "2.3.0", // version of the gamee library
CAPABILITIES: ["ghostMode", "saveState", "replay", "socialData","rewardedAds","coins","logEvents","playerData","share"], // supported capabilities
variant: 0, // for automating communication with server
soundUnlocked: false,
@@ -368,6 +368,12 @@ export var core = (function () {

};

core.requestBattleData = function (cb) {
this.native.createRequest("requestBattleData", undefined, function (responseData) {
cb(null, responseData);
});
};

core.requestPlayerReplay = function (userID, cb) {

if(!cache.capabilities.replay)
@@ -162,6 +162,7 @@ Gamee.prototype = (function () {
* @memberof Gamee
* @param {Gamee~ReplayData} [opt_replayData]
* @param {Gamee~voidCallback} [opt_cb]
* @param {Gamee~object} [opt_saveState]
*/
gameOver: function (opt_replayData, opt_cb, opt_saveState) {
if (typeof opt_replayData === "function")
@@ -221,6 +222,18 @@ Gamee.prototype = (function () {
core.logEvent(eventName,eventValue);
},

/**
* requestBattleData
*
* @memberof Gamee
* @param {Gamee~requestBattleDataDataCallback} cb
*/
requestBattleData: function (cb) {
validateDataType(cb, "function", "cb", "gamee.requestBattleData");

core.requestBattleData(cb);
},

/**
* requestPlayerReplay
*
@@ -1,6 +1,6 @@
{
"name": "gamee-js",
"version": "2.2.2",
"version": "2.3.0",
"description": "Gamee JS SDK",
"main": "gamee/src/index.js",
"scripts": {

0 comments on commit 0c9a149

Please sign in to comment.
You can’t perform that action at this time.