Commit cc398941 authored by limingzhe's avatar limingzhe

fix: debug

parent c71b356e
No preview for this file type
import { asyncDelay, onHomeworkFinish } from "../script/util";
import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent";
const { ccclass, property } = cc._decorator;
@ccclass
export default class SceneComponent extends MyCocosSceneComponent {
addPreloadImage() {
// TODO 根据自己的配置预加载图片资源
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
}
addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: this.data.audio_url });
}
addPreloadAnima() {
}
async onLoadEnd() {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initData();
this.initView();
this.initListener();
}
_cantouch = null;
initData() {
// 所有全局变量 默认都是null
this._cantouch = true;
}
initView() {
this.initBg();
this.initPic();
this.initBtn();
this.initIcon();
}
initBg() {
const bgNode = cc.find('Canvas/bg');
bgNode.scale = this._mapScaleMax;
}
pic1 = null;
pic2 = null;
initPic() {
const canvas = cc.find('Canvas');
const maxW = canvas.width * 0.7;
this.getSprNodeByUrl(this.data.pic_url, (sprNode) => {
const picNode1 = sprNode;
picNode1.scale = maxW / picNode1.width;
picNode1.baseX = picNode1.x;
canvas.addChild(picNode1);
this.pic1 = picNode1;
const labelNode = new cc.Node();
labelNode.color = cc.Color.YELLOW;
const label = labelNode.addComponent(cc.Label);
label.string = this.data.text;
label.fontSize = 60;
label.lineHeight = 60;
label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent('cc.Label').font;
picNode1.addChild(labelNode);
});
this.getSprNodeByUrl(this.data.pic_url_2, (sprNode) => {
const picNode2 = sprNode;
picNode2.scale = maxW / picNode2.width;
canvas.addChild(picNode2);
picNode2.x = canvas.width;
picNode2.baseX = picNode2.x;
this.pic2 = picNode2;
const labelNode = new cc.Node();
const label = labelNode.addComponent(cc.RichText);
const size = 60
label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent(cc.Label).font;
label.string = `<outline color=#751e00 width=4><size=${size}><color=#ffffff>${this.data.text}</color></size></outline>`
label.lineHeight = size;
picNode2.addChild(labelNode);
});
}
initIcon() {
const iconNode = this.getSprNode('icon');
iconNode.zIndex = 5;
iconNode.anchorX = 1;
iconNode.anchorY = 1;
iconNode.parent = cc.find('Canvas');
iconNode.x = iconNode.parent.width / 2 - 10;
iconNode.y = iconNode.parent.height / 2 - 10;
iconNode.on(cc.Node.EventType.TOUCH_START, () => {
this.playAudioByUrl(this.data.audio_url);
})
}
curPage = null;
initBtn() {
this.curPage = 0;
const bottomPart = cc.find('Canvas/bottomPart');
bottomPart.zIndex = 5; // 提高层级
bottomPart.x = bottomPart.parent.width / 2;
bottomPart.y = -bottomPart.parent.height / 2;
const leftBtnNode = bottomPart.getChildByName('btn_left');
//节点中添加了button组件 则可以添加click事件监听
leftBtnNode.on('click', () => {
if (!this._cantouch) {
return;
}
if (this.curPage == 0) {
return;
}
this.curPage = 0
this.leftMove();
this.playLocalAudio('btn');
})
const rightBtnNode = bottomPart.getChildByName('btn_right');
//节点中添加了button组件 则可以添加click事件监听
rightBtnNode.on('click', () => {
if (!this._cantouch) {
return;
}
if (this.curPage == 1) {
return;
}
this.curPage = 1
this.rightMove();
// 游戏结束时需要调用这个方法通知系统作业完成
onHomeworkFinish();
this.playLocalAudio('btn');
})
}
leftMove() {
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, { x: this.pic1.baseX }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, { x: this.pic2.baseX }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
.start();
}
rightMove() {
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, { x: this.pic1.baseX - len }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, { x: this.pic2.baseX - len }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
.start();
}
// update (dt) {},
initListener() {
}
playLocalAudio(audioName) {
const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource);
return new Promise((resolve, reject) => {
const id = cc.audioEngine.playEffect(audio.clip, false);
cc.audioEngine.setFinishCallback(id, () => {
resolve(id);
});
})
}
}
import { defaultData } from "../script/defaultData";
export class MyCocosSceneComponent extends cc.Component {
// 生命周期 onLoad
onLoad() {
this.initSceneData();
this.initSize();
}
_imageResList = null;
_audioResList = null;
_animaResList = null;
initSceneData() {
this._imageResList = [];
this._audioResList = [];
this._animaResList = [];
}
_designSize = null; // 设计分辨率
_frameSize = null; // 屏幕分辨率
_mapScaleMin = null; // 场景中常用缩放(取大值)
_mapScaleMax = null; // 场景中常用缩放(取小值)
_cocosScale = null; // cocos 自缩放 (较少用到)
initSize() {
// 注意cc.winSize只有在适配后(修改fitHeight/fitWidth后)才能获取到正确的值,因此使用cc.getFrameSize()来获取初始的屏幕大小
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height
let f = screen_size >= design_size
cc.Canvas.instance.fitHeight = f
cc.Canvas.instance.fitWidth = !f
const frameSize = cc.view.getFrameSize();
this._frameSize = frameSize;
this._designSize = cc.view.getDesignResolutionSize();
let sx = cc.winSize.width / frameSize.width;
let sy = cc.winSize.height / frameSize.height;
this._cocosScale = Math.min(sx, sy);
sx = frameSize.width / this._designSize.width;
sy = frameSize.height / this._designSize.height;
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
this._mapScaleMax = Math.max(sx, sy) * this._cocosScale;
cc.director['_scene'].width = frameSize.width;
cc.director['_scene'].height = frameSize.height;
}
data = null;
// 生命周期 start
start() {
if (window && (<any>window).courseware && (<any>window).courseware.getData) {
(<any>window).courseware.getData((data) => {
this.log('data:' + data);
this.data = data || this.getDefaultData();
this.data = JSON.parse(JSON.stringify(this.data));
this.preloadItem();
})
} else {
this.data = this.getDefaultData();
this.preloadItem();
}
}
getDefaultData() {
return defaultData;
}
preloadItem() {
this.addPreloadImage();
this.addPreloadAudio();
this.addPreloadAnima();
this.preload();
}
addPreloadImage() {
}
addPreloadAudio() {
}
addPreloadAnima() {
}
preload() {
const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList);
cc.assetManager.preloadAny(preloadArr, null, null, async (err, data) => {
if (window && window["air"]) {
// window["air"].onCourseInScreen = (next) => {
// window["air"].isCourseInScreen = true;
// this.onLoadEnd();
// next();
// };
await this.onLoadEnd();
window["air"].hideAirClassLoading();
} else {
await this.onLoadEnd();
}
cc.debug.setDisplayStats(false);
});
}
log (str) {
const node = cc.find('middleLayer');
if(node){
node.getComponent('middleLayer').log(str);
}else{
console.log(str);
}
}
async onLoadEnd() {
}
// ------------------------------------------------
getSprNode(resName) {
const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame;
const node = new cc.Node();
node.addComponent(cc.Sprite).spriteFrame = sf;
return node;
}
getSpriteFrimeByUrl(url, cb) {
cc.loader.load({ url }, (err, img) => {
const spriteFrame = new cc.SpriteFrame(img)
if (cb) {
cb(spriteFrame);
}
})
}
getSprNodeByUrl(url, cb) {
const node = new cc.Node();
const spr = node.addComponent(cc.Sprite);
this.getSpriteFrimeByUrl(url, (sf) => {
spr.spriteFrame = sf;
if (cb) {
cb(node);
}
})
}
playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
});
}else{
cb && cb();
}
}
}
\ No newline at end of file
export const defaultData = {
"pic_url": "http://staging-teach.cdn.ireadabc.com/ed94332a503c31e0908bd4c6923a2665.png",
"pic_url_2": "http://staging-teach.cdn.ireadabc.com/5fb60317ade0195d35ad8034d5370a7f.png",
"text": "This is a test label.",
"audio_url": "http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3"
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d582359e-924e-4ee9-9964-1fc4bb417e71",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 61,
"height": 67,
"platformSettings": {},
"subMetas": {
"btn_right": {
"ver": "1.0.4",
"uuid": "e5a2dbaa-a677-4a32-90d7-a1b057d7fb59",
"rawTextureUuid": "d582359e-924e-4ee9-9964-1fc4bb417e71",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"trimX": 0,
"trimY": 0,
"width": 60,
"height": 66,
"rawWidth": 61,
"rawHeight": 67,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "18d07592-51a9-421e-8972-0f67b68d29e1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 144,
"height": 144,
"platformSettings": {},
"subMetas": {
"icon": {
"ver": "1.0.4",
"uuid": "6fbc30a8-3c49-44ae-8ba4-7f56f385b78a",
"rawTextureUuid": "18d07592-51a9-421e-8972-0f67b68d29e1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 3,
"trimY": 2,
"width": 138,
"height": 141,
"rawWidth": 144,
"rawHeight": 144,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "8ae763a6-0f46-461c-af30-e4cb3ddb9ec1",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "63b4e75f-857e-4577-9e2d-c86d4c05f53a",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "4251bacf-3f68-475f-b3b3-990fdbfc3991",
"subMetas": {}
}
\ No newline at end of file
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "9a79969a-0506-48d4-bc98-3c05d109b027", "uuid": "60d9c614-a077-45c2-b078-eb1979cda77b",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 61, "width": 68,
"height": 67, "height": 68,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"btn_left": { "icon_back": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "ce19457d-e8f3-4c38-ae3e-d4b99208ddb5", "uuid": "b9b71493-4476-48a6-9440-a9e1c0c247ac",
"rawTextureUuid": "9a79969a-0506-48d4-bc98-3c05d109b027", "rawTextureUuid": "60d9c614-a077-45c2-b078-eb1979cda77b",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 61, "width": 68,
"height": 67, "height": 68,
"rawWidth": 61, "rawWidth": 68,
"rawHeight": 67, "rawHeight": 68,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{
"ver": "1.1.2",
"uuid": "3a7066b3-5a2a-4982-a364-47370eb0227b",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "24910381-c329-4531-ad18-764b1cad9d6b",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_is3DNode": true,
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": false,
"_id": "782105f5-3081-436f-8651-71d5b076953a"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 15
},
{
"__id__": 16
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
960,
540,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a5esZu+45LA5mBpvttspPD"
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e1WoFrQ79G7r4ZuQE3HlNb"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": -1,
"_zoomRatio": 1,
"_targetTexture": null,
"_fov": 60,
"_orthoSize": 10,
"_nearClip": 1,
"_farClip": 4096,
"_ortho": true,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_renderStages": 1,
"_alignWithScreen": true,
"_id": "81GN3uXINKVLeW4+iKSlim"
},
{
"__type__": "cc.Node",
"_name": "button",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 6
}
],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 12
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 50
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
24,
-16,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a42xbxlqxAs4E853jyjtra"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 5
},
"_children": [
{
"__id__": 7
}
],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 10
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 50
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "41r3s4bUhKhZdZGSsUhXQJ"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 50
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "1bpK9pIEVDiav5nm3+UN1T"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "运行cocos中间层",
"_N$string": "运行cocos中间层",
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": false,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 1,
"_id": "bfN6BqCdxOJJbaYX0z3zoV"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "05TmZLi4FMcJwADxtJ6zgF"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 40,
"_id": "3d4Vdv/SVCG7jO9ar9ycIa"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 2,
"transition": 2,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 230,
"g": 230,
"b": 230,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 120,
"g": 120,
"b": 120,
"a": 200
},
"_N$normalSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 6
},
"_id": "24FTwrjKFHh5ee8XrSMZfm"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 13
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 2
},
"_id": "cb3c/+rvxATLTGUYxfMjI9"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "3f25568nOVFhpExgxOXPXqu",
"handler": "onRunGameCenter",
"customEventData": ""
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_fitWidth": false,
"_fitHeight": true,
"_id": "59Cd0ovbdF4byw5sbjJDx7"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "29zXboiXFBKoIV4PQ2liTe"
},
{
"__type__": "3f25568nOVFhpExgxOXPXqu",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_id": "23B6ZC1d5FNbFBgcutVko0"
}
]
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "782105f5-3081-436f-8651-71d5b076953a",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}
\ No newline at end of file
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start () {
}
onRunGameCenter() {
cc.director.loadScene('middleLayer_for_jxw_demo');
}
// update (dt) {}
}
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "f8b451ff-857c-4ca8-9870-866bc5154a29", "uuid": "3f255ebc-9ce5-4586-9131-8313973d7aae",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
"_children": [ "_children": [
{ {
"__id__": 2 "__id__": 2
},
{
"__id__": 7
} }
], ],
"_active": false, "_active": false,
...@@ -58,7 +61,7 @@ ...@@ -58,7 +61,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"autoReleaseAssets": true, "autoReleaseAssets": true,
"_id": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3" "_id": "f0dfe8f4-e6c5-43c7-a94e-70cbf68bf300"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -70,27 +73,15 @@ ...@@ -70,27 +73,15 @@
"_children": [ "_children": [
{ {
"__id__": 3 "__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 14
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 24 "__id__": 5
},
{
"__id__": 25
}, },
{ {
"__id__": 26 "__id__": 6
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -139,7 +130,7 @@ ...@@ -139,7 +130,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "a5esZu+45LA5mBpvttspPD" "_id": "b8usA60HRHGrwKW5ebHwBd"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -180,7 +171,7 @@ ...@@ -180,7 +171,7 @@
"array": [ "array": [
0, 0,
0, 0,
362.85545494732423, 0,
0, 0,
0, 0,
0, 0,
...@@ -201,7 +192,7 @@ ...@@ -201,7 +192,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "e1WoFrQ79G7r4ZuQE3HlNb" "_id": "5bnePyKwlA7bQnUwMTiQGc"
}, },
{ {
"__type__": "cc.Camera", "__type__": "cc.Camera",
...@@ -212,7 +203,7 @@ ...@@ -212,7 +203,7 @@
}, },
"_enabled": true, "_enabled": true,
"_cullingMask": 4294967295, "_cullingMask": 4294967295,
"_clearFlags": 7, "_clearFlags": 6,
"_backgroundColor": { "_backgroundColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 0, "r": 0,
...@@ -220,7 +211,7 @@ ...@@ -220,7 +211,7 @@
"b": 0, "b": 0,
"a": 255 "a": 255
}, },
"_depth": -1, "_depth": 0,
"_zoomRatio": 1, "_zoomRatio": 1,
"_targetTexture": null, "_targetTexture": null,
"_fov": 60, "_fov": 60,
...@@ -237,20 +228,83 @@ ...@@ -237,20 +228,83 @@
}, },
"_renderStages": 1, "_renderStages": 1,
"_alignWithScreen": true, "_alignWithScreen": true,
"_id": "81GN3uXINKVLeW4+iKSlim" "_id": "55rxTkiKNOpbHrLfa0A7Sl"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_fitWidth": true,
"_fitHeight": true,
"_id": "f08dFBNhJCro57P6uk+PYw"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "f9HWpJLh9F+IETl5OMPI0M"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "bg", "_name": "middleLayer",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 2 "__id__": 1
}, },
"_children": [], "_children": [
{
"__id__": 8
},
{
"__id__": 20
},
{
"__id__": 25
},
{
"__id__": 27
},
{
"__id__": 32
}
],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 6 "__id__": 34
},
{
"__id__": 35
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -276,8 +330,8 @@ ...@@ -276,8 +330,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 640,
0, 360,
0, 0,
0, 0,
0, 0,
...@@ -299,57 +353,35 @@ ...@@ -299,57 +353,35 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "32MJMZ2HRGF4BOf533Avyi" "_id": "94GaOQuf5JP5wI4nniIhvP"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8288e3d4-4c75-4b27-8f01-f7014417f4dd"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "97/S6HDq9MeqgmV1Zwnhbb"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "bottomPart", "_name": "info",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 2 "__id__": 7
}, },
"_children": [ "_children": [
{ {
"__id__": 8 "__id__": 9
}, },
{ {
"__id__": 11 "__id__": 12
},
{
"__id__": 15
}
],
"_active": false,
"_components": [
{
"__id__": 18
},
{
"__id__": 19
} }
], ],
"_active": true,
"_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -361,8 +393,8 @@ ...@@ -361,8 +393,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 1030,
"height": 0 "height": 110.88
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -373,8 +405,8 @@ ...@@ -373,8 +405,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
635.132, 125,
-356.326, -304.56,
0, 0,
0, 0,
0, 0,
...@@ -396,23 +428,23 @@ ...@@ -396,23 +428,23 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "8c7k8ep/ZFNpO263+1QHz9" "_id": "5bzmi8f05Bz7AXuM/O3MRQ"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "btn_left", "_name": "domain",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 7 "__id__": 8
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 9 "__id__": 10
}, },
{ {
"__id__": 10 "__id__": 11
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -426,8 +458,8 @@ ...@@ -426,8 +458,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 61, "width": 1030,
"height": 67 "height": 30.240000000000002
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -438,8 +470,8 @@ ...@@ -438,8 +470,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-148.464, 0,
34, 40.31999999999999,
0, 0,
0, 0,
0, 0,
...@@ -461,14 +493,14 @@ ...@@ -461,14 +493,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "5ad2wLQLxIN5Eg7OHecSH6" "_id": "83iBMpc2BHu7qjE8rNEERR"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 8 "__id__": 9
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -478,106 +510,66 @@ ...@@ -478,106 +510,66 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_string": "domain: -",
"__uuid__": "ce19457d-e8f3-4c38-ae3e-d4b99208ddb5" "_N$string": "domain: -",
}, "_fontSize": 24,
"_type": 0, "_lineHeight": 24,
"_sizeMode": 1, "_enableWrapText": true,
"_fillType": 0, "_N$file": null,
"_fillCenter": { "_isSystemFontUsed": true,
"__type__": "cc.Vec2", "_spacingX": 0,
"x": 0, "_batchAsBitmap": false,
"y": 0 "_styleFlags": 0,
}, "_underlineHeight": 0,
"_fillStart": 0, "_N$horizontalAlign": 0,
"_fillRange": 0, "_N$verticalAlign": 0,
"_isTrimmedMode": true, "_N$fontFamily": "Arial",
"_atlas": null, "_N$overflow": 1,
"_id": "84mqOgJ3JNqZrYVTEU8CjE" "_N$cacheMode": 0,
"_id": "ec7S/rO7hFIqHUKQ6QYKX8"
}, },
{ {
"__type__": "cc.Button", "__type__": "cc.Widget",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 8 "__id__": 9
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "alignMode": 1,
"_grayMaterial": null, "_target": null,
"duration": 0.1, "_alignFlags": 40,
"zoomScale": 1.2, "_left": 0,
"clickEvents": [], "_right": 0,
"_N$interactable": true, "_top": 0,
"_N$enableAutoGrayEffect": false, "_bottom": 0,
"_N$transition": 0, "_verticalCenter": 0,
"transition": 0, "_horizontalCenter": 0,
"_N$normalColor": { "_isAbsLeft": true,
"__type__": "cc.Color", "_isAbsRight": true,
"r": 255, "_isAbsTop": true,
"g": 255, "_isAbsBottom": true,
"b": 255, "_isAbsHorizontalCenter": true,
"a": 255 "_isAbsVerticalCenter": true,
}, "_originalWidth": 166.74,
"_N$pressedColor": { "_originalHeight": 0,
"__type__": "cc.Color", "_id": "dfhed2RzZJWoFt+jQxFKen"
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "bcYN/4EKBJhbIAfovo9Ah1"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "btn_right", "_name": "baseUrl",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 7 "__id__": 8
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 12 "__id__": 13
}, },
{ {
"__id__": 13 "__id__": 14
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -591,8 +583,8 @@ ...@@ -591,8 +583,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 1030,
"height": 66 "height": 30.240000000000002
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -603,8 +595,8 @@ ...@@ -603,8 +595,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-47.164, 0,
34, 10.079999999999991,
0, 0,
0, 0,
0, 0,
...@@ -626,14 +618,14 @@ ...@@ -626,14 +618,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "46i3stdzpHX6zQHTGnRsNE" "_id": "e1s35T+DpJYIgdVojfFXw6"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 11 "__id__": 12
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -643,111 +635,68 @@ ...@@ -643,111 +635,68 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_string": "base url: -",
"__uuid__": "e5a2dbaa-a677-4a32-90d7-a1b057d7fb59" "_N$string": "base url: -",
}, "_fontSize": 24,
"_type": 0, "_lineHeight": 24,
"_sizeMode": 1, "_enableWrapText": true,
"_fillType": 0, "_N$file": null,
"_fillCenter": { "_isSystemFontUsed": true,
"__type__": "cc.Vec2", "_spacingX": 0,
"x": 0, "_batchAsBitmap": false,
"y": 0 "_styleFlags": 0,
}, "_underlineHeight": 0,
"_fillStart": 0, "_N$horizontalAlign": 0,
"_fillRange": 0, "_N$verticalAlign": 0,
"_isTrimmedMode": true, "_N$fontFamily": "Arial",
"_atlas": null, "_N$overflow": 1,
"_id": "42Sh8QS/BHn4WiGyPQPKPt" "_N$cacheMode": 0,
"_id": "3bt+DEyUtC4qBmrcOOUXBb"
}, },
{ {
"__type__": "cc.Button", "__type__": "cc.Widget",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 11 "__id__": 12
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "alignMode": 1,
"_grayMaterial": null, "_target": null,
"duration": 0.1, "_alignFlags": 40,
"zoomScale": 1.2, "_left": 0,
"clickEvents": [], "_right": 0,
"_N$interactable": true, "_top": 0,
"_N$enableAutoGrayEffect": false, "_bottom": 0,
"_N$transition": 0, "_verticalCenter": 0,
"transition": 0, "_horizontalCenter": 0,
"_N$normalColor": { "_isAbsLeft": true,
"__type__": "cc.Color", "_isAbsRight": true,
"r": 255, "_isAbsTop": true,
"g": 255, "_isAbsBottom": true,
"b": 255, "_isAbsHorizontalCenter": true,
"a": 255 "_isAbsVerticalCenter": true,
}, "_originalWidth": 177.85,
"_N$pressedColor": { "_originalHeight": 0,
"__type__": "cc.Color", "_id": "508ydnuMxFvqp6cq57xOv+"
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "1aj32fYY1IxLesa77E70Qu"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "res", "_name": "env",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 2 "__id__": 8
}, },
"_children": [ "_children": [],
{ "_active": true,
"__id__": 15 "_components": [
},
{ {
"__id__": 18 "__id__": 16
}, },
{ {
"__id__": 21 "__id__": 17
} }
], ],
"_active": false,
"_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -759,8 +708,8 @@ ...@@ -759,8 +708,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 1030,
"height": 0 "height": 50.4
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -772,7 +721,7 @@ ...@@ -772,7 +721,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
0, -30.24000000000001,
0, 0,
0, 0,
0, 0,
...@@ -794,22 +743,147 @@ ...@@ -794,22 +743,147 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "0aAzbH6R1E+6AmGRrkKa5O" "_id": "06Ff7T2WNEKqi/1/BLy2U4"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "env: -",
"_N$string": "env: -",
"_fontSize": 24,
"_lineHeight": 24,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 0,
"_id": "cdVDrxp0pACYQfWmW1C0oW"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 40,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100.04,
"_originalHeight": 0,
"_id": "63lLi3ym9DzKSSYZluC38w"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 1030,
"height": 110.88
},
"_resize": 1,
"_N$layoutType": 2,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 0,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "a4khPnHJNCCZ/t2URN4OZs"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 44,
"_left": 250,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 300,
"_originalHeight": 0,
"_id": "c97jBDoJZODqCajB/ZlEtV"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "font", "_name": "back_btn",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 14 "__id__": 7
}, },
"_children": [ "_children": [],
"_active": false,
"_components": [
{ {
"__id__": 16 "__id__": 21
},
{
"__id__": 22
},
{
"__id__": 23
} }
], ],
"_active": true,
"_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -821,8 +895,8 @@ ...@@ -821,8 +895,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 128,
"height": 0 "height": 128
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -833,8 +907,8 @@ ...@@ -833,8 +907,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, -526,
0, 246,
0, 0,
0, 0,
0, 0,
...@@ -856,115 +930,167 @@ ...@@ -856,115 +930,167 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "9bLfcYeeNKrr524vzWchiM" "_id": "8cMP1PP7VPtZFxgqY2eS5U"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Widget",
"_name": "BRLNSDB", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "node": {
"__id__": 15 "__id__": 20
}, },
"_children": [], "_enabled": true,
"_active": true, "alignMode": 1,
"_components": [ "_target": {
"__id__": 7
},
"_alignFlags": 9,
"_left": 50,
"_right": 0,
"_top": 50,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "21HN20+bRGIKBlteDB961d"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
},
"_enabled": true,
"_materials": [
{ {
"__id__": 17 "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
} }
], ],
"_prefab": null, "_srcBlendFactor": 770,
"_opacity": 255, "_dstBlendFactor": 771,
"_color": { "_spriteFrame": {
"__uuid__": "b9b71493-4476-48a6-9440-a9e1c0c247ac"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "9bXr83g59P1Leg2qTcMVQ3"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 24
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 255, "r": 255,
"g": 255, "g": 255,
"b": 255, "b": 255,
"a": 255 "a": 255
}, },
"_contentSize": { "_N$pressedColor": {
"__type__": "cc.Size", "__type__": "cc.Color",
"width": 0, "r": 211,
"height": 0 "g": 211,
"b": 211,
"a": 255
}, },
"_anchorPoint": { "pressedColor": {
"__type__": "cc.Vec2", "__type__": "cc.Color",
"x": 0.5, "r": 211,
"y": 0.5 "g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
}, },
"_trs": { "_N$disabledColor": {
"__type__": "TypedArray", "__type__": "cc.Color",
"ctor": "Float64Array", "r": 124,
"array": [ "g": 124,
0, "b": 124,
0, "a": 255
0,
0,
0,
0,
1,
1,
1,
1
]
}, },
"_eulerAngles": { "_N$normalSprite": null,
"__type__": "cc.Vec3", "_N$pressedSprite": null,
"x": 0, "pressedSprite": null,
"y": 0, "_N$hoverSprite": null,
"z": 0 "hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 20
}, },
"_skewX": 0, "_id": "1ezWfVDD1BbZJA929wFexb"
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cfMLGsq0BMhJARv+ySMAxS"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.ClickEvent",
"_name": "", "target": {
"_objFlags": 0, "__id__": 7
"node": {
"__id__": 16
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
}, },
"_isSystemFontUsed": false, "component": "",
"_spacingX": 0, "_componentId": "c7a12GnkqlEDqfp1PUUHj9F",
"_batchAsBitmap": false, "handler": "onExitGame",
"_styleFlags": 0, "customEventData": ""
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "9bNHNPu5lC7rQYyr8ai/sY"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "img", "_name": "Destroyer",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 14 "__id__": 7
}, },
"_children": [ "_children": [],
"_active": false,
"_components": [
{ {
"__id__": 19 "__id__": 26
} }
], ],
"_active": true,
"_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -1011,20 +1137,36 @@ ...@@ -1011,20 +1137,36 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "53LUHHG2pEr79fyrvazXJs" "_id": "c0MWTbuXNJ+p89APwRRg0+"
},
{
"__type__": "9beecUvRHRBNbP1Jp5wIKU+",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
},
"_enabled": true,
"_id": "b8ls7u5HFNJ7ngt7PJ14SL"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "icon", "_name": "cocos_back_btn",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 18 "__id__": 7
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 20 "__id__": 28
},
{
"__id__": 29
},
{
"__id__": 31
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1038,8 +1180,8 @@ ...@@ -1038,8 +1180,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 138, "width": 68,
"height": 141 "height": 68
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1050,8 +1192,8 @@ ...@@ -1050,8 +1192,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, -581,
0, 301,
0, 0,
0, 0,
0, 0,
...@@ -1073,24 +1215,28 @@ ...@@ -1073,24 +1215,28 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "1blU2OArJIfoC9XfupGxJG" "_id": "e6hWde4v5CSLCEg0RLZWFW"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 19 "__id__": 27
}, },
"_enabled": true, "_enabled": true,
"_materials": [], "_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "6fbc30a8-3c49-44ae-8ba4-7f56f385b78a" "__uuid__": "99cebaee-4671-485c-9f91-ddd8d2aa847b"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1101,82 +1247,131 @@ ...@@ -1101,82 +1247,131 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "03GEWUEZJGyKormWgIWCtM" "_id": "e2GWZlbUhMZLzYBkpzGYTa"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Button",
"_name": "audio", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "node": {
"__id__": 14 "__id__": 27
}, },
"_children": [ "_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{ {
"__id__": 22 "__id__": 30
} }
], ],
"_active": true, "_N$interactable": true,
"_components": [], "_N$enableAutoGrayEffect": false,
"_prefab": null, "_N$transition": 0,
"_opacity": 255, "transition": 0,
"_color": { "_N$normalColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 255, "r": 255,
"g": 255, "g": 255,
"b": 255, "b": 255,
"a": 255 "a": 255
}, },
"_contentSize": { "_N$pressedColor": {
"__type__": "cc.Size", "__type__": "cc.Color",
"width": 0, "r": 211,
"height": 0 "g": 211,
"b": 211,
"a": 255
}, },
"_anchorPoint": { "pressedColor": {
"__type__": "cc.Vec2", "__type__": "cc.Color",
"x": 0.5, "r": 211,
"y": 0.5 "g": 211,
"b": 211,
"a": 255
}, },
"_trs": { "_N$hoverColor": {
"__type__": "TypedArray", "__type__": "cc.Color",
"ctor": "Float64Array", "r": 255,
"array": [ "g": 255,
0, "b": 255,
0, "a": 255
0,
0,
0,
0,
1,
1,
1,
1
]
}, },
"_eulerAngles": { "hoverColor": {
"__type__": "cc.Vec3", "__type__": "cc.Color",
"x": 0, "r": 255,
"y": 0, "g": 255,
"z": 0 "b": 255,
"a": 255
}, },
"_skewX": 0, "_N$disabledColor": {
"_skewY": 0, "__type__": "cc.Color",
"_is3DNode": false, "r": 124,
"_groupIndex": 0, "g": 124,
"groupIndex": 0, "b": 124,
"_id": "d9f+b0lmZGSJJae6zrADhp" "a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 27
},
"_id": "9d3GrekLFN54GZpULNwobP"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 7
},
"component": "",
"_componentId": "c7a12GnkqlEDqfp1PUUHj9F",
"handler": "closeGameCenter",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 25,
"_right": 0,
"_top": 25,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "59ecZcLJtKyrqn6gDvZR7N"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "btn", "_name": "label",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 21 "__id__": 7
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 23 "__id__": 33
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1190,8 +1385,8 @@ ...@@ -1190,8 +1385,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 280,
"height": 0 "height": 50.4
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1225,50 +1420,57 @@ ...@@ -1225,50 +1420,57 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "e87DSaFCVJfb2PAUkf4/o7" "_id": "91vUKH7stDEYCw4Ua0kOBb"
}, },
{ {
"__type__": "cc.AudioSource", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 22 "__id__": 32
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_materials": [
"__uuid__": "f0680ae0-c079-45ef-abd7-9e63d90b982b" {
}, "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"_volume": 1, }
"_mute": false, ],
"_loop": false, "_srcBlendFactor": 770,
"_firstlyEnabled": true, "_dstBlendFactor": 771,
"playOnLoad": false, "_string": "临时测试中间层",
"preload": false, "_N$string": "临时测试中间层",
"_id": "dey05oKrBIspvsDa6pOIQz" "_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "ddrX56YDBLOKaYMPAZC6Be"
}, },
{ {
"__type__": "cc.Canvas", "__type__": "c7a12GnkqlEDqfp1PUUHj9F",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 2 "__id__": 7
}, },
"_enabled": true, "_enabled": true,
"_designResolution": { "_id": "38jidJ7+dL1KggjjcGB+Kr"
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_fitWidth": true,
"_fitHeight": true,
"_id": "59Cd0ovbdF4byw5sbjJDx7"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 2 "__id__": 7
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -1286,18 +1488,8 @@ ...@@ -1286,18 +1488,8 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 0, "_originalWidth": 1920,
"_originalHeight": 0, "_originalHeight": 1080,
"_id": "29zXboiXFBKoIV4PQ2liTe" "_id": "30pThcelpEbKy5ekP4hC69"
},
{
"__type__": "408a6f4ZfpM8Yzyg+IOGg/V",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_id": "eaTVUpqahPfZeO9+sUI7RP"
} }
] ]
\ No newline at end of file
{ {
"ver": "1.2.9", "ver": "1.2.9",
"uuid": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3", "uuid": "f0dfe8f4-e6c5-43c7-a94e-70cbf68bf300",
"asyncLoadAssets": false, "asyncLoadAssets": false,
"autoReleaseAssets": true, "autoReleaseAssets": true,
"subMetas": {} "subMetas": {}
......
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start () {
}
// update (dt) {}
}
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "c41b0e51-55d7-443c-af3a-b22c3dd9b9e5", "uuid": "9d11d90b-6323-43f3-833d-7c491761e70e",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
cc.Class({
extends: cc.Component,
onDestroy() {
console.log('喵喵喵: destroyer onDestroy');
middleLayer.clearDragonDisplayAssetList();
}
});
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "408a67f8-65fa-4cf1-8cf2-83e20e1a0fd5", "uuid": "9beec52f-4474-4135-b3f5-269e7020a53e",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
const testMockData = {"eof":1,"file":"/storage/emulated/0/Android/data/com.example.oxford/cache/shengtong/gradeVoice.mp3","audioUrl":"https://staging-teach.cdn.ireadabc.com/db48d49e122ba65aa7c5ee56963418a6.mp3","result":{"duration":"2.470","fluency":100,"integrity":100,"kernel_version":"3.6.7","overall":99,"pronunciation":99,"resource_version":"2.3.6","rhythm":0,"speed":78},"tokenId":"621c32543327932cfc000002"};
const recordMockData = {"text":"what can i do for you","audioUrl":"https://staging-teach.cdn.ireadabc.com/368ad56174f85e2ff1f39f12bac5c693.mp3"};
export function initAir(_this) {
const realAir = {
uploadUrl: "",
uploadData: null,
engineInfo: null,
hideAirClassLoading(templateName, loadData) {
_this.log("***成功调用hideAirClassLoading***");
window.air.onCourseInScreen && window.air.onCourseInScreen(() => {
_this.log("***成功调用onCourseInScreen***");
});
},
recordRealtimeCallBack: function (res) {
_this.log(`***成功调用recordRealtimeCallBack***参数==${res}`);
},
recordWordSpellCallBack: function (res) {
_this.log(`***成功调用recordWordSpellCallBack***参数==${res}`);
},
osmoCallback: function (res) {
_this.log(`***成功调用osmoCallback***参数==${res}`);
},
osmoHandwritingCallback: function (res) {
_this.log(`***成功调用osmoHandwritingCallback***参数==${res}`);
},
osmoHandwritingMlkitCallback: function (res) {
_this.log(`***成功调用osmoHandwritingMlkitCallback***参数==${res}`);
},
osmoFingerReadCallback: function (res) {
_this.log(`***成功调用osmoFingerReadCallback***参数==${res}`);
},
dialogStatus: function (res) {
_this.log(`***成功调用dialogStatus***参数==${res}`);
},
startScanCodeCallback: null,
needUpdateCallback: null,
getEngineInfoCallback: null,
logFileUploadCallback: null,
takePictureCallBack: null,
configurationPortraitCallback: null,
configurationLandscapeCallback: null,
startBuyToAppStoreCallBack: null,
recognitionCameraCallBack: null,
testCallBack: null,
testConvertCallBack: null,
recordCallBack: null,
onCourseInScreen: null,
};
try {
window.air = new Proxy(realAir, {
set: function (target, key, value, receiver) {
let newValue = value;
if (key == "recordWordSpellCallBack" || key == "recordRealtimeCallBack" || key == "osmoCallback" || key == "osmoHandwritingCallback" || key == "osmoHandwritingMlkitCallback" || key == "osmoFingerReadCallback") {
newValue = function (res) {
_this.log(`||==成功调用${key}==||参数==${JSON.stringify(res)}`);
if(typeof(res) == 'string') {
value(res);
} else {
value(JSON.stringify(res));
}
}
}
return Reflect.set(target, key, newValue, receiver);
},
get: function (target, key, receiver) {
return Reflect.get(target, key, receiver);
},
deleteProperty: function (target, key) {
return Reflect.deleteProperty(target, key);
}
});
} catch (e) {
console.error("浏览器不支持ES6新特性Proxy/Reflect,请使用谷歌浏览器!");
}
window.courseware = {
getData(callback) {
_this.log("===成功调用getData===");
callback && callback(null);
},
uploadUrl() {
_this.log("===成功调用uploadUrl===");
return window.air.uploadUrl;
},
uploadData() {
_this.log("===成功调用uploadData===");
return window.air.uploadData;
},
nextPage() {
_this.log("===成功调用nextPage===");
},
beforePage() {
_this.log("===成功调用beforePage===");
},
jumpPage(page) {
_this.log(`===成功调用jumpPage=== page == ${page}`);
},
sendAnswer(answerObj) {
_this.log(`===成功调用sendAnswer=== answerObj == ${JSON.stringify(answerObj)}`);
if (answerObj) {
answerObj.callback && answerObj.callback();
}
},
getAnswer(queryObj, callback) {
_this.log(`===成功调用getAnswer=== queryObj == ${JSON.stringify(queryObj)}`);
callback && callback(null);
},
addStar() {
_this.log(`===成功调用addStar===`);
},
getTemplates(callback) {
_this.log(`===成功调用getTemplates===`);
callback && callback(null);
},
getTemplateUrl(templateName, callback) {
_this.log(`===成功调用getTemplateUrl=== templateName == ${templateName}`);
callback && callback(null);
},
gameEnd() {
_this.log(`===成功调用gameEnd===`);
},
// isSpeechToText 1: 录音转文本,0:纯录音
startRecord(isSpeechToText) {
_this.log(`===成功调用startRecord=== isSpeechToText == ${isSpeechToText}`);
window.courseware.hasCalledStartRecord = true;
window.courseware.callOcMethod("startRecord", { isSpeechToText });
},
stopRecord(callback1, callback2) {
// 传两个参数是为了兼容以前
window.courseware.hasCalledStartRecord = false;
const callback = callback1 || callback2;
_this.log(`===成功调用stopRecord===`);
if (!callback) {
// 不传回调函数就表示取消评测
window.courseware.callOcMethod("stopRecord", { isBreak: 1 });
return;
}
// 结束录音
window.air.recordCallBack = (res) => {
res = typeof(res) == 'string' ? res : JSON.stringify(res);
_this.log(`===成功调用recordCallBack=== res == ${res}`);
callback && callback(res);
window.air.recordCallBack = null;
};
window.courseware.callOcMethod("stopRecord", { isBreak: 0 });
},
startTest(testText, option) {
window.courseware.hasCalledStartTest = true;
_this.log(`===成功调用startTest=== testText == ${testText}`);
window.courseware.callOcMethod("startTest", { ...option, "params": testText });
},
stopTest(callback) {
window.courseware.hasCalledStartTest = false;
_this.log(`===成功调用stopTest===`);
if (!callback) {
// 不传回调函数就表示取消评测
_this.log(`===成功取消录音评测===`);
window.courseware.callOcMethod("stopTest", { isBreak: 1 });
return;
}
// 结束录音
window.air.testCallBack = (res) => {
res = typeof(res) == 'string' ? res : JSON.stringify(res);
_this.log(`===成功调用testCallBack=== res == ${res}`);
// 录音异常兼容处理
const resObj = JSON.parse(res);
if (resObj.errCode) {
resObj.result = {overall:0};
resObj.audioUrl = "";
res = JSON.stringify(resObj);
_this.showTips(`评测服务信号弱,可能会造成评分不准确,请稍后再来录音评测吧~`);
}
callback && callback(res);
window.air.testCallBack = null;
};
window.courseware.callOcMethod("stopTest", {});
},
startTestConvert(testText, option) {
window.courseware.hasCalledStartTestConvert = true;
_this.log(`===成功调用startTestConvert=== testText == ${testText}`);
window.courseware.callOcMethod("startTestConvert", { ...option, "params": testText });
},
stopTestConvert(testCallback, convertCallback) {
window.courseware.hasCalledStartTestConvert = false;
_this.log(`===成功调用stopTestConvert===`);
if (!testCallback) {
// 不传回调函数就表示取消评测
_this.log(`===成功取消录音评测===`);
window.courseware.callOcMethod("stopTestConvert", { isBreak: 1 });
return;
}
// 结束录音
window.air.testCallBack = (res) => {
res = typeof(res) == 'string' ? res : JSON.stringify(res);
_this.log(`===成功调用testCallBack=== res == ${res}`);
// 录音异常兼容处理
const resObj = JSON.parse(res);
if (resObj.errCode) {
resObj.result = {overall:0};
resObj.audioUrl = "";
res = JSON.stringify(resObj);
_this.showTips(`评测服务信号弱,可能会造成评分不准确,请稍后再来录音评测吧~`);
}
testCallback && testCallback(res);
window.air.testCallBack = null;
};
// 结束变声
window.air.testConvertCallBack = (res) => {
res = typeof(res) == 'string' ? res : JSON.stringify(res);
_this.log(`===成功调用testConvertCallBack=== res == ${res}`);
// 录音异常兼容处理
const resObj = JSON.parse(res);
if (resObj.errCode) {
resObj.convertUrl = "";
res = JSON.stringify(resObj);
_this.showTips(`变声失败,请稍后再来尝试吧~`);
}
convertCallback && convertCallback(res);
window.air.testConvertCallBack = null;
};
window.courseware.callOcMethod("stopTestConvert", {});
},
startRealtimeRecord(params = {}) {
window.courseware.hasCalledRealtimeRecord = true;
_this.log(`===成功调用startRealtimeRecord===${JSON.stringify(params)}`);
window.courseware.callOcMethod("startRealtimeRecord", params);
},
stopRealtimeRecord(params = {}) {
window.courseware.hasCalledRealtimeRecord = false;
_this.log(`===成功调用stopRealtimeRecord===`);
window.courseware.callOcMethod("stopRealtimeRecord", params);
},
startWordSpell(params = {}) {
window.courseware.hasWordSpelling = true;
_this.log(`===成功调用startWordSpell===${JSON.stringify(params)}`);
window.courseware.callOcMethod("startWordSpell", params);
},
stopWordSpell(params = {}) {
window.courseware.hasWordSpelling = false;
_this.log(`===成功调用stopWordSpell===`);
window.courseware.callOcMethod("stopWordSpell", params);
},
// 拍照
takePicture(callback) {
_this.log(`===成功调用takePicture===`);
window.air.takePictureCallBack = (res) => {
if(typeof(res) == 'string') {
callback && callback(res);
} else {
callback && callback(JSON.stringify(res));
}
window.air.takePictureCallBack = null;
};
window.courseware.callOcMethod("takePicture", {});
},
openRecognitionCamera(params = {}, callback) {
window.courseware.hasCalledOpenRecognitionCamera = true;
_this.log(`===成功调用openRecognitionCamera===${JSON.stringify(params)}`);
window.air.recognitionCameraCallBack = (res) => {
callback && callback(JSON.stringify(res));
window.air.recognitionCameraCallBack = null;
};
window.courseware.callOcMethod("openRecognitionCamera", params);
},
closeRecognitionCamera() {
window.courseware.hasCalledOpenRecognitionCamera = false;
_this.log(`===成功调用closeRecognitionCamera===`);
window.courseware.callOcMethod("closeRecognitionCamera", {});
},
getEngineInfo(callback) {
_this.log(`===成功调用getEngineInfo===`);
// 调用原生获取机器信息
window.air.getEngineInfoCallback = (res) => {
if(typeof(res) == 'string') {
window.air.engineInfo = res;
callback && callback(res);
} else {
window.air.engineInfo = JSON.stringify(res);
callback && callback(JSON.stringify(res));
}
window.air.getEngineInfoCallback = null;
};
window.courseware.callOcMethod("getEngineInfo", {});
},
logUpload(callback) {
_this.log(`===成功调用logUpload===`);
// 调用原生获取机器信息
window.air.logFileUploadCallback = (res) => {
if(typeof(res) == 'string') {
callback && callback(res);
} else {
callback && callback(JSON.stringify(res));
}
window.air.logFileUploadCallback = null;
};
window.courseware.callOcMethod("logUpload", {});
},
behaviorToCollectWithParam(event, type="") {
// 埋点所需接口 levelPayForSuccess userRegistrationEvent
window.courseware.callOcMethod("behaviorToCollectWithParam", {event, type});
},
exitApp() {
_this.log(`===成功调用exitApp===`);
window.courseware.callOcMethod("exitApp", {});
},
changeHost() {
_this.log(`===成功调用changeHost===`);
// 调用原生获取机器信息
if (window.air.engineInfo) {
const engineInfo = JSON.parse(window.air.engineInfo);
window.courseware.callOcMethod("changeHost", {isStagingEnv: engineInfo.isDev != 1});
}
},
needUpdate(label, url, callback) {
_this.log(`===成功调用needUpdate===`);
// 调用原生获取机器信息
window.air.needUpdateCallback = (res) => {
callback && callback(res);
window.air.needUpdateCallback = null;
};
window.courseware.callOcMethod("needUpdate", { label: label, url: url });
},
startScanCode(callback) {
_this.log(`===成功调用startScanCode===`);
// 调用原生开始扫码
window.air.startScanCodeCallback = (res) => {
callback && callback(res);
window.air.startScanCodeCallback = null;
};
window.courseware.callOcMethod("startScanCode", {});
},
openOsmo(params = {}) {
window.courseware.hasCalledOpenOsmo = true;
_this.log(`===成功调用openOsmo===${JSON.stringify(params)}`);
window.courseware.callOcMethod("openOsmo", params);
},
closeOsmo() {
window.courseware.hasCalledOpenOsmo = false;
_this.log(`===成功调用closeOsmo===`);
window.courseware.callOcMethod("closeOsmo", {});
},
openOsmoHandwriting(params = {}) {
window.courseware.hasCalledOpenOsmoHandwriting = true;
_this.log(`===成功调用openOsmoHandwriting===${JSON.stringify(params)}`);
window.courseware.callOcMethod("openOsmoHandwriting", params);
},
closeOsmoHandwriting() {
window.courseware.hasCalledOpenOsmoHandwriting = false;
_this.log(`===成功调用closeOsmoHandwriting===`);
window.courseware.callOcMethod("closeOsmoHandwriting", {});
},
openOsmoHandwritingMlkit(params = {}) {
window.courseware.hasCalledOpenOsmoHandwritingMlkit = true;
_this.log(`===成功调用openOsmoHandwritingMlkit===${JSON.stringify(params)}`);
window.courseware.callOcMethod("openOsmoHandwritingMlkit", params);
},
closeOsmoHandwritingMlkit() {
window.courseware.hasCalledOpenOsmoHandwritingMlkit = false;
_this.log(`===成功调用closeOsmoHandwritingMlkit===`);
window.courseware.callOcMethod("closeOsmoHandwritingMlkit", {});
},
openOsmoFingerRead(params = {}) {
window.courseware.hasCalledOpenOsmoFingerRead = true;
_this.log(`===成功调用openOsmoFingerRead===${JSON.stringify(params)}`);
window.courseware.callOcMethod("openOsmoFingerRead", params);
},
closeOsmoFingerRead() {
window.courseware.hasCalledOpenOsmoFingerRead = false;
_this.log(`===成功调用closeOsmoFingerRead===`);
window.courseware.callOcMethod("closeOsmoFingerRead", {});
},
modifyVideoSpeed(params = {}, callback) {
_this.log(`===成功调用modifyVideoSpeed===`);
window.air.modifyVideoSpeedCallback = (res) => {
_this.log(`===modifyVideoSpeedCallback=== res == ${res}`);
callback && callback(res);
window.air.modifyVideoSpeedCallback = null;
};
window.courseware.callOcMethod("modifyVideoSpeed", params);
},
onConfigurationPortrait(params = {}, callback) {
_this.log(`===成功调用onConfigurationPortrait||竖屏===`);
window.air.configurationPortraitCallback = (res) => {
callback && callback(res);
window.air.configurationPortraitCallback = null;
};
window.courseware.callOcMethod("onConfigurationPortrait", params);
},
onConfigurationLandscape(params = {}, callback) {
_this.log(`===成功调用onConfigurationLandscape||横屏===`);
window.air.configurationLandscapeCallback = (res) => {
callback && callback(res);
window.air.configurationLandscapeCallback = null;
};
window.courseware.callOcMethod("onConfigurationLandscape", params);
},
startBuyToAppStore(params = {}, callback) {
// 苹果支付
_this.log(`===成功调用startBuyToAppStore===`);
window.air.startBuyToAppStoreCallBack = (res) => {
callback && callback(res);
};
window.courseware.callOcMethod("startBuyToAppStore", params);
},
callOcMethod(method, param) {
const paramStr = JSON.stringify(param);
_this.log(`===成功调用原生方法${method}===参数==${paramStr}`);
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
return jsb.reflection.callStaticMethod('RootViewController', `${method}:`, paramStr);
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_ANDROID) {
return jsb.reflection.callStaticMethod('com/iplayabc/cocos/AppActivity', method, '(Ljava/lang/String;)Ljava/lang/String;', paramStr);
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_WINDOWS) {
console.log('汪汪汪')
} else {
console.error(`非源生环境,网页版不支持${method}方法,将返回此方法的Mock数据以便于网页版调试使用`);
if(method == 'getEngineInfo'){
window.air.getEngineInfoCallback({isDev: 1, uuid: 'debug-xxxxxx-xxxxxx', version: '1.0.2'});
} else if(method == 'logUpload'){
window.air.logFileUploadCallback({"fileUrl":"abcedfgh","error":""});
} else if (method == 'startTest') {
} else if (method == 'stopTest') {
window.air.testCallBack(testMockData);
} else if (method == 'startRecord') {
} else if (method == 'stopRecord') {
window.air.recordCallBack(recordMockData);
} else if (method == 'startBuyToAppStore') {
window.air.startBuyToAppStoreCallBack({productid: 1, puid: 22, receiptData: "HelloWorld", error: ""});
} else{
console.error(`${method}方法还没有Mock数据,请联系技术支持人员添加`);
}
}
},
freeAllOcMethod() {
if (window.courseware.hasCalledStartRecord) {
window.courseware.stopRecord();
}
if (window.courseware.hasCalledStartTest) {
window.courseware.stopTest();
}
if (window.courseware.hasCalledStartTestConvert) {
window.courseware.stopTestConvert();
}
if (window.courseware.hasCalledRealtimeRecord) {
window.courseware.stopRealtimeRecord();
}
if (window.courseware.hasWordSpelling) {
window.courseware.stopWordSpell();
}
if (window.courseware.hasCalledOpenRecognitionCamera) {
window.courseware.closeRecognitionCamera();
}
if (window.courseware.hasCalledOpenOsmo) {
window.courseware.closeOsmo();
}
if (window.courseware.hasCalledOpenOsmoHandwriting) {
window.courseware.closeOsmoHandwriting();
}
if (window.courseware.hasCalledOpenOsmoHandwritingMlkit) {
window.courseware.closeOsmoHandwritingMlkit();
}
if (window.courseware.hasCalledOpenOsmoFingerRead) {
window.courseware.closeOsmoFingerRead();
}
}
};
}
{
"ver": "1.0.8",
"uuid": "28112492-beae-4e6a-a0f4-e7b31a14f575",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
const { ccclass, property } = cc._decorator;
import { initAir } from "./air";
// 全局类型声明
declare const global: any;
@ccclass
export default class middleLayer extends cc.Component {
onLoad() {
console.log("onLoad middleLayer");
initAir(this);
this.reWriteAir();
}
reWriteAir() {
console.log("reWriteAir..");
(<any>window).courseware.getData = (callback) => {
// this.getData(callback);
callback(this.COURSE_DATA);
};
// if (!(<any>window).air) {
// (<any>window).air = {};
// }
// (<any>window).air.hideAirClassLoading = () => {
// if ((<any>window).air.onCourseInScreen) {
// (<any>window).air.onCourseInScreen(() => {
// console.log("***成功调用onCourseInScreen***");
// (<any>window).air.onCourseInScreen = null;
// this.hidePreloadWaiting();
// });
// } else {
// this.hidePreloadWaiting();
// }
// }
}
COURSE_DATA = null;
setCourseData(data) {
this.COURSE_DATA = data;
}
log(value) {
console.log(value);
}
syllabus_id;
getData(callBack) {
const uri = "api/syllabus/v1/getdata";
const data = {
syllabusid: this.syllabus_id,
};
console.log("data = " + JSON.stringify(data));
this.callNetworkApiGet(uri, data, (res) => {
callBack(JSON.parse(res.data));
});
}
role;
baseUrl;
homework_id;
token;
onHomeworkFinish(callBack) {
if (this.role == "teacher") {
return;
}
// const uri = "app_source/v1/student/homework/finished";
// const data = {
// syllabus_id: this.syllabus_id,
// homework_id: this.homework_id,
// token: this.token,
// score: 0,
// };
// console.log("data = " + JSON.stringify(data));
// this.callNetworkApiPost(uri, data, callBack);
// if (this.homework_id == -1) {
// return;
// }
// const btnBg = cc.find("middleLayer/btnBg");
// btnBg.active = true;
}
callNetworkApiGet(uri, data, callBack) {
let queryStr = "?";
for (const key in data) {
if (Object.hasOwnProperty.call(data, key)) {
const value = data[key];
queryStr += `${key}=${value}`;
}
}
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => {
if (xhr.readyState == 4 && xhr.status >= 200 && xhr.status < 400) {
const responseData = JSON.parse(xhr.responseText);
console.log(responseData);
callBack(responseData);
}
};
const url = `${this.BASE_URL}${uri}${queryStr}`;
console.log("url = " + url);
xhr.open("GET", url, true);
xhr.send();
}
callNetworkApiPost(uri, data, callBack) {
const xhr = new XMLHttpRequest();
const url = `${this.BASE_URL}${uri}`;
xhr.open("POST", url, true);
xhr.setRequestHeader("content-type", "application/json");
xhr.onreadystatechange = () => {
if (xhr.readyState == 4) {
callBack(JSON.parse(xhr.responseText));
}
};
xhr.send(JSON.stringify(data));
}
ENGINE_INFO;
ORG_ID;
DOMAIN;
BASE_URL;
ENV;
getEngineInfo() {
return new Promise<string>((resolve, reject) => {
if (this.ENGINE_INFO) {
resolve(JSON.stringify(this.ENGINE_INFO));
return;
}
const loopEngineInfo = () => {
this.scheduleOnce(() => {
if (!(<any>window).air.engineInfo) {
loopEngineInfo();
return;
}
if (this.ENGINE_INFO) {
resolve(JSON.stringify(this.ENGINE_INFO));
return;
}
const engineInfo = JSON.parse((<any>window).air.engineInfo);
if (engineInfo.isDev == 1) {
engineInfo.domain = "https://staging-teach.cdn.ireadabc.com/";
engineInfo.apiBase = "https://staging-openapi.iteachabc.com/";
engineInfo.orgId = 513;
} else {
engineInfo.domain = "https://teach.cdn.ireadabc.com/";
engineInfo.apiBase = "https://openapi.iteachabc.com/";
engineInfo.orgId = 512;
}
this.ORG_ID = engineInfo[`orgId`];
this.DOMAIN = engineInfo[`domain`];
this.ENGINE_INFO = engineInfo;
resolve(JSON.stringify(engineInfo));
}, 0.05);
};
loopEngineInfo();
});
}
async start() {
console.log("on midlleLayer start");
// 节点放到最上层
this.node.zIndex = 9999;
// 显示加载动画
// this.showWaitingLetters();
// 生命当前节点为常驻节点
cc.game.addPersistRootNode(this.node);
global.middleLayer = cc.find('middleLayer').getComponent('middleLayer');
// 添加事件监听
// this.initListener();
// TODO 获取当前环境信息
// this.baseUrl = "http://openapi.iteachabc.com"
// this.loadOnlineBundle()
let domain = "https://staging-teach.cdn.ireadabc.com/";
let baseUrl = "https://staging-openapi.iteachabc.com/";
let env = "0"; // 0: 测试环境 1: 生产环境
let token = "unlogin";
try {
const jsonStr = this.callNativeFunction({
name: "getEngineInfo",
value: "",
});
const obj = JSON.parse(jsonStr);
domain = obj.domain;
baseUrl = obj.baseUrl;
env = obj.env;
token = obj.token;
} catch (error) {
console.log("error", error);
console.error("getEngineInfo 获取信息失败");
}
console.log("domain", domain);
console.log("baseUrl", baseUrl);
console.log("env", env);
console.log("token", token);
this.DOMAIN = domain;
this.BASE_URL = baseUrl;
this.ENV = env;
this.token = token;
// this.showDebugInfo();
if (!this.DOMAIN || !this.BASE_URL || !this.ENV || !this.token) {
console.error("getEngineInfo 获取信息失败");
return;
}
// // 运行主场景
// this.runMainScene();
// 隐藏资源占用信息
cc.debug.setDisplayStats(false);
// this.homework_id = homework_id;
// this.syllabus_id = syllabus_id;
// this.role = role;
// cc.assetManager.loadBundle(bondleUrl, { version: version }, (err, bundle) => {
// if (err) {
// return console.error(err);
// }
// bundle.loadScene(sceneName, (err, scene) => {
// this.hideWaitingLetters();
// cc.director.runScene(scene);
// });
// });
}
showDebugInfo() {
const domain = cc.find("middleLayer/info/domain").getComponent(cc.Label);
const baseUrl = cc.find("middleLayer/info/baseUrl").getComponent(cc.Label);
const env = cc.find("middleLayer/info/env").getComponent(cc.Label);
// const token = cc.find('middleLayer/info/token').getComponent(cc.Label);
domain.string = `domain: ${this.DOMAIN}`;
baseUrl.string = `baseUrl: ${this.BASE_URL}`;
env.string = `env: ${this.ENV == "0" ? "test" : "prod"}`;
// token.string = this.token;
}
/**
* 运行子场景
*/
runMainScene() {
console.log("加载游戏中心场景...");
cc.director.loadScene("gamecenter", ()=> {
// const destroyer = cc.instantiate(cc.find('middleLayer/Destroyer'));
// destroyer.parent = cc.find('Canvas');
// destroyer.active = true;
});
}
/**
* 关闭游戏中心
*/
closeGameCenter() {
console.log("关闭游戏中心,加载空页面...");
cc.director.loadScene("empty", () => {
cc.game.removePersistRootNode(this.node);
// 发送消息到Flutter
if((window as any).FlutterChannel) {
(window as any).FlutterChannel.postMessage('close_webview');
} else {
this.callNativeFunction({ name: "exit", value: "" });
}
});
}
initListener() {
const exitBtn = this.node.getChildByName("ExitBtn");
exitBtn.on("click", () => {
const sprite = exitBtn.getChildByName("sprite");
cc.tween(sprite)
.to(0.1, { scaleX: 0.9, scaleY: 1.1 })
.to(0.1, { scaleX: 1.1, scaleY: 0.9 })
.to(0.1, { scaleX: 1, scaleY: 1 })
.call(() => {
cc.game.removePersistRootNode(this.node);
cc.director.loadScene("emptyScene", () => {
this.callNativeFunction({ name: "exit", value: "" });
});
})
.start();
});
const btnLast = cc.find("middleLayer/btnBg/btnLast");
btnLast["canClick"] = true;
btnLast.on("click", () => {
if (!btnLast["canClick"]) {
return;
}
btnLast["canClick"] = false;
cc.tween(btnLast)
.to(0.1, { scaleX: 0.9, scaleY: 1.1 })
.to(0.1, { scaleX: 1.1, scaleY: 0.9 })
.to(0.1, { scaleX: 1, scaleY: 1 })
.call(() => {
btnLast["canClick"] = true;
const paramStr = JSON.stringify({});
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
return jsb.reflection.callStaticMethod(
"CocosMng",
"previousPage:",
paramStr
);
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_ANDROID) {
return jsb.reflection.callStaticMethod(
"com/iplayabc/cocos/AppActivity",
"previousPage",
"(Ljava/lang/String;)Ljava/lang/String;",
paramStr
);
} else {
console.error("非源生环境");
}
})
.start();
});
const btnNext = cc.find("middleLayer/btnBg/btnNext");
btnNext["canClick"] = true;
btnNext.on("click", () => {
if (!btnNext["canClick"]) {
return;
}
btnNext["canClick"] = false;
cc.tween(btnNext)
.to(0.1, { scaleX: 0.9, scaleY: 1.1 })
.to(0.1, { scaleX: 1.1, scaleY: 0.9 })
.to(0.1, { scaleX: 1, scaleY: 1 })
.call(() => {
btnNext["canClick"] = true;
const paramStr = JSON.stringify({});
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
return jsb.reflection.callStaticMethod(
"CocosMng",
"nextPage:",
paramStr
);
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_ANDROID) {
return jsb.reflection.callStaticMethod(
"com/iplayabc/cocos/AppActivity",
"nextPage",
"(Ljava/lang/String;)Ljava/lang/String;",
paramStr
);
} else {
console.error("非源生环境");
}
})
.start();
});
}
callNativeFunction(param) {
const paramStr = JSON.stringify(param);
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
return jsb.reflection.callStaticMethod(
"CocosMng",
"cocosWithNativeProtocol:",
paramStr
);
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_ANDROID) {
return jsb.reflection.callStaticMethod(
"com/iplayabc/cocos/AppActivity",
"cocosWithNativeProtocol",
"(Ljava/lang/String;)Ljava/lang/String;",
paramStr
);
} else {
throw "非源生环境";
}
}
showWaitingLetters() {
const colorList = this.getRainbowColorList();
const layout = cc.find("middleLayer/layout");
layout.active = true;
const str = "Now Loading...";
str.split("").forEach((word, idx) => {
const node = new cc.Node();
const label = node.addComponent(cc.Label);
label.string = word;
node.parent = layout;
node.color = colorList[idx];
cc.tween(node)
.delay(idx / 4)
.by(0.3, { y: 50 }, { easing: "sineOut" })
.by(0.3, { y: -50 }, { easing: "sineIn" })
.delay((str.length - idx) / 4)
.union()
.repeatForever()
.start();
});
const totalWidth = layout.children.reduce((width, node, idx) => {
return width + node.width;
}, 0);
layout.width = totalWidth;
}
hideWaitingLetters() {
const layout = cc.find("middleLayer/layout");
layout.active = false;
}
logList = null;
showLog(str) {
if (!this.logList) {
this.logList = [];
}
this.logList.push(str);
console.log(str);
if (this.logList.length == 1) {
this.showOneLog();
}
}
showOneLog() {
const str = this.logList[0];
if (str === undefined) {
return;
}
const node = new cc.Node();
node.anchorX = 0.5;
const label = node.addComponent(cc.RichText);
label.string = `<outline color=black width=3>${str}</outline>`;
label.maxWidth = this.node.width / 2;
node.x = this.node.width / 4;
node.y = -this.node.height / 2;
node.parent = this.node;
cc.tween(node).to(5, { y: this.node.height }).removeSelf().start();
setTimeout(() => {
this.logList.shift();
this.showOneLog();
}, 1000);
}
getRainbowColorList() {
return [
cc.color(255, 0, 0),
cc.color(255, 128, 0),
cc.color(255, 255, 0),
cc.color(255, 255, 0),
cc.color(128, 255, 0),
cc.color(0, 255, 0),
cc.color(0, 255, 128),
cc.color(0, 255, 255),
cc.color(0, 128, 255),
cc.color(0, 0, 255),
cc.color(128, 0, 255),
cc.color(255, 0, 255),
cc.color(255, 0, 128),
cc.color(255, 0, 0),
];
}
loadPageBundle(courseItem, callback = null) {
console.log(" in loadPageBundle");
let sceneName,
version,
bondleUrl = "";
this.syllabus_id = courseItem.course_id;
const templateBaseUrl = `${this.DOMAIN}h5template/${courseItem.template_name}/v${courseItem.last_version}`;
this.getConfigInfo(templateBaseUrl, (conf) => {
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
sceneName = conf.ios.sceneName;
version = conf.ios.version;
bondleUrl = `${templateBaseUrl}/ios/${conf.ios.sceneName}`;
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_ANDROID) {
sceneName = conf.android.sceneName;
version = conf.android.version;
bondleUrl = `${templateBaseUrl}/android/${conf.ios.sceneName}`;
} else {
sceneName = conf.android.sceneName;
version = "";
bondleUrl = `${templateBaseUrl}/web_desktop`;
}
this.loadBundle(sceneName, version, bondleUrl, callback);
});
}
curBundle;
async loadBundle(sceneName, version, bondleUrl, callback = null) {
this.assetList = [];
this.textureList = [];
this.atlasList = [];
this.nodeList = [];
console.log('汪汪汪: getDragonDisplayAssetList');
// this.getDragonDisplayAssetList(cc.find('Canvas'));
// this.getSpriteAssetList(cc.find('Canvas'));
cc.audioEngine.stopAll();
cc.assetManager.loadBundle(
bondleUrl,
{ version: version },
async (err, bundle) => {
this.curBundle = bundle;
console.log('汪汪汪: loadBundle', bundle);
bundle.loadScene(
sceneName,
null,
(finish, total, item) => {
this.setLoadingProgressBar(Math.floor(finish / total * 100));
},
(err, scene) => {
cc.director.runScene(scene, null, () => {
console.log("sceneName1 = " + sceneName);
// const canvas = cc.find("Canvas");
const middleLayer = cc.find("middleLayer");
middleLayer.getComponent(cc.Widget).updateAlignment();
// middleLayer.scale = canvas.width / middleLayer.width;
this.showCloseGameBtn();
const destroyer = cc.instantiate(cc.find('middleLayer/Destroyer'));
destroyer.parent = cc.find('Canvas');
destroyer.active = true;
callback && callback();
});
}
);
}
);
}
getConfigInfo(url, callback) {
const xhr = new XMLHttpRequest();
let flag = false;
xhr.onreadystatechange = () => {
if (xhr.readyState == 4 && xhr.status >= 200 && xhr.status < 400) {
flag = true;
callback(JSON.parse(xhr.responseText));
}
};
xhr.open("GET", `${url}/config.json`, true);
xhr.send();
// 五秒超时重试一次
this.scheduleOnce(() => {
if (flag) {
return;
}
xhr.abort();
this.getConfigInfo(url, callback);
}, 5);
}
showCloseGameBtn() {
console.log("showCloseGameBtn");
const closeGameBtn = cc.find("middleLayer/back_btn");
closeGameBtn.active = true;
}
hideCloseGameBtn() {
const closeGameBtn = cc.find("middleLayer/back_btn");
closeGameBtn.active = false;
}
// 设置加载进度条
setLoadingProgressBar(progress: number) {
console.log('middleLayer setLoadingProgressBar:', progress);
// 这个方法会被gamecenter组件重写,用于更新进度条
}
// ---------------兼容剑津模版 临时添加 ---------------
setSRRecord(key, value) {
}
addSRAudioDuration(duration) {
}
setSRVideoDuration(duration) {
}
showSRResultByRecord(isShowScore = false) {
}
showSRResultByQuestion(isShowScore = false) {
}
showSRResult(score) {
}
setTotalQuestions(total) {
}
setQuestionResult(index, score) {
}
// -----------------------------------------------
// --------------- 资源管理 ---------------
nodeList: cc.Node[] = [];
atlasList: any[] = [];
assetList: any[] = [];
textureList: cc.Texture2D[] = [];
getDragonDisplayAssetList(node: cc.Node): void {
const dragonDisplay = node.getComponent(dragonBones.ArmatureDisplay);
if (dragonDisplay) {
const atlas = dragonDisplay.dragonAtlasAsset;
const asset = dragonDisplay.dragonAsset;
if (atlas.texture) {
if (atlas.texture.nativeUrl.includes('h5template')) {
node.children.forEach((child: cc.Node) => {
this.getDragonDisplayAssetList(child);
});
return;
}
this.nodeList.push(node);
this.atlasList.push(atlas);
this.assetList.push(asset);
this.textureList.push(atlas.texture);
console.log('汪汪汪: atlas.texture.nativeUrl = ' + atlas.texture.nativeUrl);
}
}
node.children.forEach((child: cc.Node) => {
this.getDragonDisplayAssetList(child);
});
}
getSpriteAssetList(node: cc.Node): void {
const sprite = node.getComponent(cc.Sprite);
if (sprite) {
if (sprite.spriteFrame.getTexture()) {
this.nodeList.push(node);
this.textureList.push(sprite.spriteFrame.getTexture());
}
}
node.children.forEach((child: cc.Node) => {
this.getSpriteAssetList(child);
});
}
clearDragonDisplayAssetList() {
console.log('喵喵喵: clearDragonDisplayAssetList');
console.log('喵喵喵: ' + this.nodeList.length);
console.log('喵喵喵: ' + this.atlasList.length);
console.log('喵喵喵: ' + this.assetList.length);
console.log('喵喵喵: ' + this.textureList.length);
[...this.atlasList, ...this.assetList].forEach(asset => {
asset.decRef();
cc.assetManager.releaseAsset(asset);
asset.destroy();
});
this.nodeList.forEach(node => {
node.active = false;
node.removeFromParent();
});
this.textureList.forEach(texture => {
texture.decRef();
});
};
clearPrefabs(node) {
node.children.forEach(child => {
if (child._prefab && child._prefab.asset) {
let prefabAsset = child._prefab.asset;
child.destroy();
cc.assetManager.releaseAsset(prefabAsset);
cc.log("释放 Prefab:", prefabAsset._name);
}
// 递归处理
this.clearPrefabs(child);
});
}
clearGraphics(node) {
node.children.forEach(child => {
// 如果节点有 Graphics 组件
let graphics = child.getComponent(cc.Graphics);
if (graphics) {
graphics.node.destroy();
cc.log("释放 Graphics 节点:", child.name);
}
// 递归处理子节点
this.clearGraphics(child);
});
}
clearLabels(node) {
node.children.forEach(child => {
let label = child.getComponent(cc.Label);
if (label) {
const font = label.font;
if (font) {
label.font = null;
cc.log("释放 Labels 节点:", child.name);
font.decRef();
cc.assetManager.releaseAsset(font);
label.node.destroy();
}
}
// 递归处理子节点
this.clearLabels(child);
});
}
// -----------------------------------------------
onExitGame() {
this.hideCloseGameBtn();
cc.audioEngine.stopAll();
this.getDragonDisplayAssetList(cc.find('Canvas'));
// 释放动态字体缓存
cc.dynamicAtlasManager.reset();
cc.dynamicAtlasManager.enabled = false; // 彻底关掉动态合图(如果没特别需要)
// // 释放 Label 的字体缓存
// cc.Label._canvasPool = {};
// cc.Label._fontAtlasCache = {};
this.clearPrefabs(cc.find('Canvas'));
this.clearGraphics(cc.find('Canvas'));
this.clearLabels(cc.find('Canvas'));
const scene = cc.director.getScene();
if (scene) {
// 收集场景的依赖资源
// let dependAssets = cc.assetManager.dependUtil.getDepsRecursively(scene.uuid);
// 通过依赖数据释放资源
// dependAssets.forEach(depUuid => {
// const asset = cc.assetManager.assets.get(depUuid);
// if (asset) {
// cc.assetManager.releaseAsset(asset);
// }
// });
// cc.log("释放当前场景资源:", scene.name);
}
if (cc.assetManager.cacheManager) {
cc.assetManager.cacheManager.clearCache();
cc.log("释放缓存资源 cacheManager clearCache ");
}
cc.director.loadScene("gamecenter", () => {
// const destroyer = cc.instantiate(cc.find('middleLayer/Destroyer'));
// destroyer.parent = cc.find('Canvas');
// destroyer.active = true;
// if ( cc.assetManager.releaseUnusedAssets) {
// console.log('汪汪汪: releaseUnusedAssets');
// cc.assetManager.releaseUnusedAssets();
// }
if (this.curBundle) {
this.curBundle.releaseUnusedAssets();
cc.assetManager.removeBundle(this.curBundle);
this.curBundle = null;
}
scene.destroy();
// 强制触发一次垃圾回收(主要是 js 对象)
cc.sys.garbageCollect();
});
}
}
{
"ver": "1.0.8",
"uuid": "c7a121a7-92a9-440e-a7e9-d4f5141e3f45",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -177,85 +177,15 @@ export function playAudio(audioClip, cb = null) { ...@@ -177,85 +177,15 @@ export function playAudio(audioClip, cb = null) {
export async function asyncDelay(time) { export async function asyncDelay(time) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
cc.tween(cc.find('Canvas')) setTimeout(() => {
.delay(time) resolve(null);
.call(()=>{ }, time * 1000);
resolve(null);
})
.start();
} catch (e) { } catch (e) {
reject(e); reject(e);
} }
}) })
} }
export async function asyncLoadDragonBoneAnime(node, { skeJsonData: { url: skeJsonDataUrl }, texJsonData: { url: texJsonDataUrl }, texPngData: { url: texPngDataUrl } }) {
if (!texPngDataUrl || !texJsonDataUrl || !texPngDataUrl
|| texPngDataUrl == '' || texJsonDataUrl == '' || texPngDataUrl == '') {
return;
}
return new Promise((resolve, reject) => {
if (node.animaNode) {
node.animaNode.removeFromParent();
}
const animaNode = new cc.Node();
animaNode.name = 'animaNode';
animaNode.parent = node;
animaNode.active = true;
node.animaNode = animaNode;
const dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
const loadTexture = new Promise((resolve, reject) => {
cc.assetManager.loadRemote(texPngDataUrl, (error, texture) => {
if (error) {
reject(error);
}
resolve(texture);
});
});
const loadTexJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadAny({ url: texJsonDataUrl }, (error, atlasJson) => {
if (error) {
reject(error);
}
resolve(atlasJson);
});
});
const loadSkeJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadAny({ url: skeJsonDataUrl }, (error, dragonBonesJson) => {
if (error) {
reject(error);
}
resolve(dragonBonesJson);
});
});
Promise.all([loadTexture, loadTexJsonData, loadSkeJsonData]).then(([texture, atlasJson, dragonBonesJson]) => {
const atlas = new dragonBones.DragonBonesAtlasAsset();
atlas.atlasJson = JSON.stringify(atlasJson);
atlas.texture = texture;
const asset = new dragonBones.DragonBonesAsset();
asset.dragonBonesJson = JSON.stringify(dragonBonesJson);
dragonDisplay.dragonAtlasAsset = atlas;
dragonDisplay.dragonAsset = asset;
let armatureNames = dragonBonesJson.armature.map(data => data.name);
if (armatureNames.length > 0) {
dragonDisplay.armatureName = armatureNames[0];
}
resolve(animaNode);
});
});
}
export class FireworkSettings { export class FireworkSettings {
baseNode; // 父节点 baseNode; // 父节点
nodeList; // 火花节点的array nodeList; // 火花节点的array
...@@ -411,65 +341,14 @@ export function showTrebleFirework(baseNode, rabbonList) { ...@@ -411,65 +341,14 @@ export function showTrebleFirework(baseNode, rabbonList) {
showFireworks(right); showFireworks(right);
} }
export function httpHeadCall(requsetUrl: string, callback) { export function onHomeworkFinish() {
let xhr = new XMLHttpRequest();
console.log("Status: Send Post Request to " + requsetUrl);
try {
xhr.onreadystatechange = () => {
try {
console.log('xhr.readyState: ', xhr.readyState);
if (xhr.readyState == 4) {
if ((xhr.status >= 200 && xhr.status < 400)) {
callback(true);
} else {
callback(false);
}
}
} catch (e) {
console.log(e)
}
};
xhr.open("HEAD", requsetUrl, true);
xhr.send();
xhr.timeout = 15000;
xhr.onerror = (e) => {
callback(false);
};
xhr.ontimeout = (e) => {
callback(false);
};
} catch (e) {
console.log("Send Get Request error: ", e);
}
}
export function onHomeworkFinish(data = "", callback = ()=>{}) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.onHomeworkFinish(callback, data);
} else {
console.log('onHomeworkFinish', JSON.stringify(data));
}
}
export function callMiddleLayerFunction(apiName: string, data: any, callback: Function) {
const middleLayer = cc.find('middleLayer'); const middleLayer = cc.find('middleLayer');
if (middleLayer) { if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer'); const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.callMiddleLayerFunction(apiName, data, callback); if (middleLayerComponent.role == 'student') {
} else { middleLayerComponent.onHomeworkFinish(() => { });
console.log('callMiddleLayerFunction: ' + apiName); }
}
}
export function showTips(tips) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
middleLayer.getComponent('middleLayer').showTips(tips);
} else { } else {
console.log(tips); console.log('onHomeworkFinish');
} }
} }
\ No newline at end of file
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "e1b4d971-9876-4832-803a-5a321964a78b", "uuid": "89e1cbbf-a096-4d31-b3a2-a5c84009d26b",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 1280, "width": 416,
"height": 720, "height": 131,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"bg": { "bg": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "8288e3d4-4c75-4b27-8f01-f7014417f4dd", "uuid": "126a1b5a-3af8-498b-8d56-6afefeea3cb2",
"rawTextureUuid": "e1b4d971-9876-4832-803a-5a321964a78b", "rawTextureUuid": "89e1cbbf-a096-4d31-b3a2-a5c84009d26b",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 1280, "width": 416,
"height": 720, "height": 131,
"rawWidth": 1280, "rawWidth": 416,
"rawHeight": 720, "rawHeight": 131,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f", "uuid": "1f7443e1-181f-4605-97aa-b008ac34f7c1",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 366, "width": 68,
"height": 336, "height": 68,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"1orange": { "icon_back": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "43d1e79d-6de8-4dcb-b8ce-d767df7913aa", "uuid": "99cebaee-4671-485c-9f91-ddd8d2aa847b",
"rawTextureUuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f", "rawTextureUuid": "1f7443e1-181f-4605-97aa-b008ac34f7c1",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": -0.5, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 1, "trimY": 0,
"width": 366, "width": 68,
"height": 335, "height": 68,
"rawWidth": 366, "rawWidth": 68,
"rawHeight": 336, "rawHeight": 68,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
...@@ -4,5 +4,6 @@ ...@@ -4,5 +4,6 @@
"name": "play", "name": "play",
"id": "9af72fd2-44a6-4131-8ea3-3e1b3fa22231", "id": "9af72fd2-44a6-4131-8ea3-3e1b3fa22231",
"version": "2.4.5", "version": "2.4.5",
"isNew": false "isNew": false,
"description": ""
} }
\ No newline at end of file
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