Commit 1d6a6313 authored by Tt's avatar Tt

1

parent c71b356e
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);
});
})
}
}
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": "1.1.2",
"uuid": "0853721c-3f55-4eb2-873d-e3081cfadd4b",
"uuid": "205bd5af-83c2-40c3-ac39-e6f61d013b7f",
"isBundle": false,
"bundleName": "",
"priority": 1,
......
{"frameRate":24,"name":"zhastar","version":"5.5","compatibleVersion":"5.5","armature":[{"type":"Armature","frameRate":24,"name":"Armature","aabb":{"x":-399,"y":-184,"width":830,"height":306},"bone":[{"name":"root"},{"name":"zhakai","parent":"root","transform":{"y":14.05}},{"name":"star05","parent":"zhakai","transform":{"x":189,"y":-3.3}},{"name":"star04","parent":"zhakai","transform":{"x":215.45,"y":-106.5}},{"name":"star06","parent":"zhakai","transform":{"x":342.55,"y":-15.7}},{"name":"star01","parent":"zhakai","transform":{"x":-161.8,"y":-62.75}},{"name":"star03","parent":"zhakai","transform":{"x":-191.55,"y":51.2}},{"name":"star02","parent":"zhakai","transform":{"x":-274.9,"y":-5.8}}],"slot":[{"name":"star01","parent":"star01"},{"name":"star02","parent":"star02"},{"name":"star03","parent":"star03"},{"name":"star04","parent":"star04"},{"name":"star05","parent":"star05"},{"name":"star06","parent":"star06"}],"skin":[{"slot":[{"name":"star06","display":[{"name":"炸开/star06","transform":{"x":14.95,"y":-0.35},"path":"zhakai/star06"}]},{"name":"star05","display":[{"name":"炸开/star05","transform":{"x":19,"y":-17.25},"path":"zhakai/star05"}]},{"name":"star04","display":[{"name":"炸开/star04","transform":{"x":6.05,"y":-8.55},"path":"zhakai/star04"}]},{"name":"star03","display":[{"name":"炸开/star03","transform":{"x":14.55,"y":-5.25},"path":"zhakai/star03"}]},{"name":"star02","display":[{"name":"炸开/star02","transform":{"x":-39.6,"y":-7.75},"path":"zhakai/star02"}]},{"name":"star01","display":[{"name":"炸开/star01","transform":{"x":-2.2,"y":-7.3},"path":"zhakai/star01"}]}]}],"animation":[{"duration":21,"playTimes":0,"name":"normal","bone":[{"name":"zhakai","translateFrame":[{"duration":6,"tweenEasing":0,"y":46.95},{"duration":10,"tweenEasing":0,"y":-57.25},{"duration":5,"tweenEasing":0},{"duration":0,"y":29.44}]},{"name":"star05","translateFrame":[{"duration":6,"tweenEasing":0,"x":-188.98,"y":4.53},{"duration":3,"tweenEasing":0,"x":-128.57,"y":-37.63},{"duration":7,"tweenEasing":0,"x":-76.88,"y":-54.56},{"duration":5,"x":-46.17,"y":76.94}],"rotateFrame":[{"duration":16,"tweenEasing":0,"rotate":40},{"duration":5}],"scaleFrame":[{"duration":6,"tweenEasing":0,"x":0.01,"y":0.01},{"duration":15}]},{"name":"star04","translateFrame":[{"duration":6,"tweenEasing":0,"x":-215.91,"y":108.78},{"duration":3,"tweenEasing":0,"x":-185.09,"y":-23.8},{"duration":7,"tweenEasing":0,"x":-134.31,"y":-74.85},{"duration":5,"x":-67.15,"y":13.99}],"rotateFrame":[{"duration":16,"tweenEasing":0,"rotate":40},{"duration":5}],"scaleFrame":[{"duration":6,"tweenEasing":0,"x":0.01,"y":0.01},{"duration":15}]},{"name":"star06","translateFrame":[{"duration":6,"tweenEasing":0,"x":-342.09,"y":19.01},{"duration":3,"tweenEasing":0,"x":-263.69,"y":-73.79},{"duration":7,"tweenEasing":0,"x":-183.61,"y":-99.85},{"duration":5,"x":-96.53}],"rotateFrame":[{"duration":16,"tweenEasing":0,"rotate":40},{"duration":5}],"scaleFrame":[{"duration":6,"tweenEasing":0,"x":0.01,"y":0.01},{"duration":15}]},{"name":"star01","translateFrame":[{"duration":6,"tweenEasing":0,"x":162.22,"y":64.02},{"duration":3,"tweenEasing":0,"x":122.82,"y":-51.85},{"duration":7,"tweenEasing":0,"x":105.48,"y":-107.49},{"duration":5,"x":30.01,"y":-9.23}],"rotateFrame":[{"duration":9,"tweenEasing":0,"rotate":40},{"duration":7,"tweenEasing":0,"rotate":13.96},{"duration":5}],"scaleFrame":[{"duration":6,"tweenEasing":0,"x":0.01,"y":0.01},{"duration":15}]},{"name":"star03","translateFrame":[{"duration":6,"tweenEasing":0,"x":191.9,"y":-49.12},{"duration":3,"tweenEasing":0,"x":152.99,"y":-95.34},{"duration":7,"tweenEasing":0,"x":124.06,"y":-111.67},{"duration":5,"x":72.19,"y":30.22}],"rotateFrame":[{"duration":16,"tweenEasing":0,"rotate":40},{"duration":5}],"scaleFrame":[{"duration":6,"tweenEasing":0,"x":0.01,"y":0.01},{"duration":15}]},{"name":"star02","translateFrame":[{"duration":6,"tweenEasing":0,"x":276.5,"y":7.88},{"duration":3,"tweenEasing":0,"x":200.84,"y":-76.41},{"duration":7,"tweenEasing":0,"x":160.57,"y":-101.16},{"duration":5,"x":75.55,"y":15.39}],"rotateFrame":[{"duration":16,"tweenEasing":0,"rotate":40},{"duration":5}],"scaleFrame":[{"duration":6,"tweenEasing":0,"x":0.01,"y":0.01},{"duration":15}]}],"slot":[{"name":"star01","colorFrame":[{"duration":6},{"duration":3,"tweenEasing":0,"value":{"aM":80}},{"duration":7,"tweenEasing":0},{"duration":5,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star02","colorFrame":[{"duration":6},{"duration":3,"tweenEasing":0,"value":{"aM":80}},{"duration":7,"tweenEasing":0},{"duration":5,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star03","colorFrame":[{"duration":16},{"duration":5,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star04","colorFrame":[{"duration":16},{"duration":5,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star05","colorFrame":[{"duration":6},{"duration":3,"tweenEasing":0,"value":{"aM":80}},{"duration":7,"tweenEasing":0},{"duration":5,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"star06","colorFrame":[{"duration":16},{"duration":5,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]}]}],"defaultActions":[{"gotoAndPlay":"normal"}]}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "b4ea1c34-24c5-4cf3-9552-77fd1e0f7370",
"subMetas": {}
}
\ No newline at end of file
{"name":"zhastar","SubTexture":[{"name":"zhakai/star01","x":331,"height":130,"y":1,"width":176},{"name":"zhakai/star02","x":230,"height":193,"y":260,"width":169},{"name":"zhakai/star03","x":401,"height":124,"y":253,"width":104},{"name":"zhakai/star04","x":1,"height":166,"y":260,"width":227},{"name":"zhakai/star05","x":1,"height":257,"y":1,"width":328},{"name":"zhakai/star06","x":331,"height":118,"y":133,"width":147}],"imagePath":"zhastar_tex.png","height":512,"width":512}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "f6e28700-0fcf-46f4-9b2e-41eda646b221",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "3d8f403f-df25-4472-9033-f737daecf7e6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 512,
"height": 512,
"platformSettings": {},
"subMetas": {
"zhastar_tex": {
"ver": "1.0.4",
"uuid": "e701ac81-34a2-48d4-ad79-65665a6ed1b7",
"rawTextureUuid": "3d8f403f-df25-4472-9033-f737daecf7e6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -2,
"offsetY": 29,
"trimX": 1,
"trimY": 1,
"width": 506,
"height": 452,
"rawWidth": 512,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "d9005b3f-48e6-4f3f-89d4-0d554e5badc2",
"downloadMode": 0,
"duration": 1.880816,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "69587344-7bb2-4de2-bb77-6332cf7c8a85",
"downloadMode": 0,
"duration": 1.9346,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "264c5afb-d4da-4369-9909-bf9608b19ee7",
"downloadMode": 0,
"duration": 1.48898,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "047dfbf2-4e45-4f85-8947-bff3577634b8",
"downloadMode": 0,
"duration": 3.552653,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "45d19155-b425-40f9-8f22-28081fe78a5f",
"downloadMode": 0,
"duration": 2.821224,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "7f3f5b5c-1d1b-4f98-a7fd-b733ea11c96e",
"downloadMode": 0,
"duration": 0.428,
"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 {
private img_1: cc.Node;
private img_2: cc.Node;
private count: number;
onLoad() {
this.count = 0;
this.img_1 = this.node.getChildByName('img_1')
this.img_2 = this.node.getChildByName('img_2')
this.img_1.active = true;
this.img_2.active = true;
cc.tween(this.img_1).repeatForever(
cc.tween().to(0.25, { opacity: 0 }).to(0.25, { opacity: 255 })
).start();
this.scheduleOnce(() => {
cc.tween(this.img_2).repeatForever(
cc.tween().to(0.25, { opacity: 0 }).to(0.25, { opacity: 255 })
).start();
}, 0.1)
}
update(dt) {
}
}
{
"ver": "1.0.8",
"uuid": "408a67f8-65fa-4cf1-8cf2-83e20e1a0fd5",
"uuid": "f060d304-ea8f-4da5-9d6c-ae787b0b008d",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
// 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 {
onLoad() {
let time1 = Math.random() + 1;
let time2 = Math.random() + 1;
cc.tween(this.node).repeatForever(
cc.tween().to(time1, { opacity: 50 }).to(time2, { opacity: 255 })
).start();
}
}
{
"ver": "1.0.8",
"uuid": "cd5bc223-43eb-432d-b7dd-55c412c59aa5",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3",
"uuid": "1468d920-4f88-4387-89aa-39ebc9d42735",
"asyncLoadAssets": false,
"autoReleaseAssets": true,
"autoReleaseAssets": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "4592b4aa-3cf4-4677-bf67-5e6bce1b04d0",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import pg from "./pg_dg18_tianci";
const { ccclass, property } = cc._decorator;
@ccclass
export default class dg_xiaodi extends cc.Component {
@property(cc.Node)
aniRole: cc.Node = null;
@property moveX: number = 500;
private defaultX: number;
onLoad() {
this.defaultX = this.aniRole.x;
}
private audioIdEnter: any;
playEnter(audioUrl) {
return new Promise((resolve, reject) => {
this.node.active = true;
let startX = this.defaultX + this.moveX;
this.aniRole.x = startX;
cc.tween(this.aniRole)
.call(() => {
pg.view.playDBAnimation(this.aniRole, 'run');
if (this.moveX < 0) {
this.aniRole.scaleX = -this.aniRole.scaleX;
}
})
.to(0.5, { x: 0 })
.call(() => {
if (this.moveX < 0) {
this.aniRole.scaleX = -this.aniRole.scaleX;
}
pg.view.playDBAnimation(this.aniRole, 'talk');
pg.audio.playAudioByUrl(audioUrl, () => {
this.audioIdEnter = null;
cc.tween(this.aniRole)
.call(() => {
pg.view.playDBAnimation(this.aniRole, 'run');
if (this.moveX < 0) {
this.aniRole.scaleX = -this.aniRole.scaleX;
}
})
.to(0.5, { x: -1800 })
.call(() => {
this.scheduleOnce(() => {
this.playEnterEnd()
resolve('');
}, 0.5)
})
.start();
}, audioId => {
this.audioIdEnter = audioId;
})
})
.start();
});
}
playEnterEnd() {
this.node.active = false;
if (this.audioIdEnter) {
cc.audioEngine.stopEffect(this.audioIdEnter)
}
}
private audioIdOver: any;
playOver(audioUrl) {
this.node.active = true;
let startX = this.defaultX + this.moveX;
this.aniRole.x = startX;
cc.tween(this.aniRole)
.call(() => {
pg.view.playDBAnimation(this.aniRole, 'run');
if (this.moveX < 0) {
this.aniRole.scaleX = -this.aniRole.scaleX;
}
})
.to(0.3, { x: this.defaultX })
.call(() => {
if (this.moveX < 0) {
this.aniRole.scaleX = -this.aniRole.scaleX;
}
pg.view.playDBAnimation(this.aniRole, 'talk');
pg.audio.playAudioByUrl(audioUrl, () => {
this.audioIdOver = null;
pg.view.playDBAnimation(this.aniRole, 'normal');
}, audioId => {
this.audioIdOver = audioId;
})
})
.start();
}
playOverEnd() {
this.node.active = false;
if (this.audioIdOver) {
cc.audioEngine.stopEffect(this.audioIdOver)
}
}
start() {
}
update(dt) {
}
}
{
"ver": "1.0.8",
"uuid": "c1365525-5de4-45d3-ac2a-4d82e7819e61",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "63101843-39ac-4a85-83e2-8330382119aa",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { defaultData } from "../script/defaultData";
import { defaultData } from "../script/defaultData_dg18_tianci";
export class MyCocosSceneComponent extends cc.Component {
......@@ -176,4 +176,11 @@ export class MyCocosSceneComponent extends cc.Component {
cb && cb();
}
}
}
\ No newline at end of file
}
export const defaultData =
{
"npcTitle": "exit", "npcAudio": "http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3",
"npcAudioName": "boom_dg28_drag.mp3",
"npcAudioEnd": "http://staging-teach.cdn.ireadabc.com/289fe0a6d9893519c3fb5993b86b6fe9_l.mp3",
"npcAudioEndName": "dragdown_dg28_drag.mp3",
"questions": [{
"options": [{ "audio": "", "hotZoneItemArr": [], "bgItem": "", "right": false },
{ "audio": "", "hotZoneItemArr": [], "bgItem": "", "right": false },
{ "audio": "", "hotZoneItemArr": [], "bgItem": "", "right": false }],
"type": "img",
"bgItem": {
"url": "http://staging-teach.cdn.ireadabc.com/f627ed930909e43e823cd79ed90aaea3.png", "rect": { "x": 90.8694029850746, "y": 0, "width": 910.2611940298508, "height": 595 }
}, "hotZoneItemArr": [
{
"index": 0, "text": "part1", "itemType": "text", "fontSize": 50, "fontName": "BRLNSR_1", "fontColor": "#8f3758", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": 261.13, "y": 44.5, "width": 200, "height": 200 }
}, {
"index": 1, "text": "part2", "itemType": "text", "fontSize": 50, "fontName": "BRLNSR_1", "fontColor": "#8f3758", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": 512.13, "y": 45.5, "width": 200, "height": 200 }
}, {
"index": 2, "text": "part3", "itemType": "text", "fontSize": 50, "fontName": "BRLNSR_1", "fontColor": "#8f3758", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": 355.13, "y": 151.5, "width": 200, "height": 200 }
}, {
"index": 3, "pic_url": "http://staging-teach.cdn.ireadabc.com/be8ec5cee7a3074440478b00a4a84f5e.png", "itemType": "pic", "fontSize": 50, "fontName": "BRLNSR_1", "fontColor": "#8f3758", "fontScale": 0.853125, "imgScale": 0.44287909836065575, "mapScale": 0.853125, "rect": { "x": 23.13, "y": 44.5, "width": 200, "height": 200 }
}], "hotZoneFontObj": { "size": 50, "name": "BRLNSR_1", "color": "#8f3758" }
}, {
"options": [], "type": "img", "bgItem": { "url": "http://staging-teach.cdn.ireadabc.com/8b565a3db344386ab9cde226cc1411f2.jpg", "rect": { "x": 72.15060240963851, "y": 0, "width": 947.698795180723, "height": 595 } }, "hotZoneItemArr": [{ "index": 0, "text": "download", "itemType": "text", "fontSize": "40", "fontName": "BRLNSR_1", "fontColor": "#FF0000", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": 122.84, "y": 71.5, "width": 200, "height": 200 } }, { "index": 1, "text": "app", "itemType": "text", "fontSize": "40", "fontName": "BRLNSR_1", "fontColor": "#FF0000", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": 176.84, "y": 270.5, "width": 200, "height": 200 } }], "hotZoneFontObj": { "size": "40", "name": "BRLNSR_1", "color": "#FF0000" }
}], "bgItem": "", "hotZoneItemArr": []
}
const b = {
"npcTitle": "exit",
"npcAudio": "http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3",
"npcAudioName": "boom_dg28_drag.mp3",
"npcAudioEnd": "http://staging-teach.cdn.ireadabc.com/289fe0a6d9893519c3fb5993b86b6fe9_l.mp3",
"npcAudioEndName": "dragdown_dg28_drag.mp3",
"questions": [
{
"options": [
{
"audio": "", "hotZoneItemArr": [], "bgItem": "", "right": false
}, {
"audio": "", "hotZoneItemArr": [], "bgItem": "", "right": false
}, {
"audio": "", "hotZoneItemArr": [], "bgItem": "", "right": false
}
],
"type": "img",
"bgItem": {
"url": "http://staging-teach.cdn.ireadabc.com/b4494456199505bdf990fff96a0c9fb8.jpg",
"rect": {
"x": 17.111111111111086,
"y": 0,
"width": 1057.7777777777778,
"height": 595
}
},
"hotZoneItemArr": [
{
"index": 0, "text": "part1", "itemType": "text", "fontSize": 50, "fontName": "BRLNSR_1", "fontColor": "#8f3758", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": 435.89, "y": 190.5, "width": 200, "height": 200 }
}, {
"index": 1, "text": "part2", "itemType": "text", "fontSize": 50, "fontName": "BRLNSR_1", "fontColor": "#8f3758", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": -19.11, "y": -59.5, "width": 200, "height": 200 }
}, {
"index": 2, "text": "part4", "itemType": "text", "fontSize": 50, "fontName": "BRLNSR_1", "fontColor": "#8f3758", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": -27.11, "y": 452.5, "width": 200, "height": 200 }
}, {
"index": 3, "text": "part5", "itemType": "text", "fontSize": 50, "fontName": "BRLNSR_1", "fontColor": "#8f3758", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": 883.89, "y": 460.5, "width": 200, "height": 200 }
}, {
"index": 4, "pic_url": "http://staging-teach.cdn.ireadabc.com/be8ec5cee7a3074440478b00a4a84f5e.png", "itemType": "pic", "fontSize": 50, "fontName": "BRLNSR_1", "fontColor": "#8f3758", "fontScale": 0.853125, "imgScale": 0.44287909836065575, "mapScale": 0.853125, "rect": { "x": 6.89, "y": 79.5, "width": 200, "height": 200 }
}],
"hotZoneFontObj": {
"size": 50,
"name": "BRLNSR_1",
"color": "#8f3758"
}
}, {
"options": [],
"type": "img",
"bgItem": {
"url": "http://staging-teach.cdn.ireadabc.com/9ecda2ef223dfc255a17522110fc7ee2.png",
"rect": {
"x": 152.03542234332423,
"y": 0,
"width": 787.9291553133515,
"height": 595
}
},
"hotZoneItemArr": [
{
"index": 0, "text": "test1", "itemType": "text", "fontSize": "40", "fontName": "BRLNSR_1", "fontColor": "#FF0000", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": 166.96, "y": 0.5, "width": 200, "height": 200 }
}, {
"index": 1, "text": "test2", "itemType": "text", "fontSize": "40", "fontName": "BRLNSR_1", "fontColor": "#FF0000", "fontScale": 0.853125, "imgScale": 1, "mapScale": 0.853125, "rect": { "x": 343.96, "y": 335.5, "width": 200, "height": 200 }
}],
"hotZoneFontObj": {
"size": "40", "name": "BRLNSR_1", "color": "#FF0000"
}
}],
"bgItem": "",
"hotZoneItemArr": []
}
{
"ver": "1.1.2",
"uuid": "acd6765e-3764-406c-98e5-55d63c760157",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "952557a3-e565-4494-bef6-e720983f14cb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 286,
"height": 232,
"platformSettings": {},
"subMetas": {
"img_battery001_dg18_tianci": {
"ver": "1.0.4",
"uuid": "347c35f8-7fca-4262-a03a-c03b70997884",
"rawTextureUuid": "952557a3-e565-4494-bef6-e720983f14cb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 286,
"height": 232,
"rawWidth": 286,
"rawHeight": 232,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "11c0424d-2ff7-4f10-a315-4cba1e194c2f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 281,
"height": 140,
"platformSettings": {},
"subMetas": {
"img_battery1_dg18_tianci": {
"ver": "1.0.4",
"uuid": "c3ff7a71-a8d6-4a48-80d9-926c949d18b6",
"rawTextureUuid": "11c0424d-2ff7-4f10-a315-4cba1e194c2f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 281,
"height": 140,
"rawWidth": 281,
"rawHeight": 140,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "505cb8a9-7d75-4f12-a988-46e5249f9216",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 281,
"height": 140,
"platformSettings": {},
"subMetas": {
"img_battery2_dg18_tianci": {
"ver": "1.0.4",
"uuid": "d9b6fcf1-5d4c-4d01-99e5-bc40468c1008",
"rawTextureUuid": "505cb8a9-7d75-4f12-a988-46e5249f9216",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 281,
"height": 140,
"rawWidth": 281,
"rawHeight": 140,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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