Button_LikeUs.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Learn cc.Class:
  2. // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/class.html
  3. // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/class.html
  4. // Learn Attribute:
  5. // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
  6. // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/reference/attributes.html
  7. // Learn life-cycle callbacks:
  8. // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
  9. // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/life-cycle-callbacks.html
  10. cc.Class({
  11. extends: cc.Component,
  12. properties: {
  13. button:cc.Button,
  14. },
  15. // LIFE-CYCLE CALLBACKS:
  16. onLoad () {
  17. this.button.node.on('click', this.callback, this);
  18. },
  19. start () {
  20. },
  21. // update (dt) {},
  22. callback: function (event) {
  23. //激活关卡列表页面
  24. var self = this;
  25. //跳转到google play 商店详情页
  26. jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "launchAppDetail","(Ljava/lang/String;Ljava/lang/String;)V","com.feipeng.dreamgame.emojilink", "com.android.vending");
  27. }
  28. });