I’m using cocos creator, after integrating plugin ‘PluginSdkboxPlay’, I’m using it to submit score… I’ve successfully build and compiled the project. But, I’m getting error while running… Both in simulator and browser. And installed apk isn’t breaking/crashing while playing the game.
Any help in resolving this is greatly appreciated! Thanks in advance.
Code Snippet:
gameOver () {
// Back ground Music stop. Game over & dead sound playback
cc.audioEngine.stopMusic();
cc.audioEngine.playEffect(this.dieAudio);
cc.audioEngine.playEffect(this.gameOverAudio);
// Stop Hurdles
D.HurdleBeamManager.reset();
this.state = State.Over;
// Showing GameOver Menu (With score and restart button)
this.gameOverMenu.active = true;
this.gameOverMenu.getComponent('GameOverMenu').score.string = this.score;
//**Error here: Uncaught ReferenceError: sdkbox is not defined
sdkbox.PluginSdkboxPlay.submitScore( leaderboard1, this.score );
}
Thanks for your reply. That explains…
My objective is to show leader board to my game.
Quick question: Does this call shows up the leader board in the native platforms?
i.e… when I install the apk on my android/iPhone??