Commit 801c7a3d authored by 范雪寒's avatar 范雪寒

feat: 新增接口

parent 10f562d2
import { initAir } from './air'; import { initAir } from './air';
cc.Class({ cc.Class({
extends: cc.Component, extends: cc.Component,
...@@ -316,6 +315,14 @@ cc.Class({ ...@@ -316,6 +315,14 @@ cc.Class({
callback('关卡未解锁!'); callback('关卡未解锁!');
} }
break; break;
case 'NS_select_event':
this.showLog('选择活动:' + data.eventId);
callback('选择活动:' + data.eventId);
break;
case 'NS_select_game':
this.showLog('选择游戏: ' + data.gameId);
callback('选择游戏: ' + data.gameId);
break;
default: default:
this.showLog('未定义接口: ' + apiName); this.showLog('未定义接口: ' + apiName);
break; break;
...@@ -717,9 +724,9 @@ cc.Class({ ...@@ -717,9 +724,9 @@ cc.Class({
const laodingLayer = cc.find('middleLayer/loadingLayer'); const laodingLayer = cc.find('middleLayer/loadingLayer');
laodingLayer.active = true; laodingLayer.active = true;
const loading = cc.find('middleLayer/loadingLayer/loading'); // const loading = cc.find('middleLayer/loadingLayer/loading');
const anim = loading.getComponent(cc.Animation) // const anim = loading.getComponent(cc.Animation)
anim.play('loading') // anim.play('loading')
const script = cc.find('middleLayer/loadingLayer/progress').getComponent('progressScript'); const script = cc.find('middleLayer/loadingLayer/progress').getComponent('progressScript');
script.setProgress(0); script.setProgress(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment