Fix the score order
This commit is contained in:
parent
9faee5f9d8
commit
5b4db62137
1 changed files with 11 additions and 7 deletions
|
@ -149,18 +149,22 @@ ig.module(
|
||||||
|
|
||||||
loadScores: function() {
|
loadScores: function() {
|
||||||
ig.global.scores = undefined;
|
ig.global.scores = undefined;
|
||||||
$.post('https://www.scoreoid.com/api/getScores', this.scoreoid, function(data) {
|
data = $.extend({}, {
|
||||||
|
order: 'desc',
|
||||||
|
order_by: 'score',
|
||||||
|
limit: 10
|
||||||
|
}, this.scoreoid);
|
||||||
|
$.post('https://www.scoreoid.com/api/getBestScores', data, function(data) {
|
||||||
ig.global.scores = data;
|
ig.global.scores = data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
saveScore: function(username, score, cb) {
|
saveScore: function(username, score, cb) {
|
||||||
$.post('https://www.scoreoid.com/api/createScore', {
|
data = $.extend({}, {
|
||||||
api_key: this.scoreoid.api_key,
|
score: score,
|
||||||
game_id: this.scoreoid.game_id,
|
username: username
|
||||||
score: score,
|
}, this.scoreoid);
|
||||||
username: username
|
$.post('https://www.scoreoid.com/api/createScore', data, cb(this));
|
||||||
}, cb(this));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
draw: function() {
|
draw: function() {
|
||||||
|
|
Loading…
Reference in a new issue