Commit 05f8ab0c authored by 李帅's avatar 李帅

修改...

parent 142fb176
{ {
"ver": "1.1.2", "ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541", "uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false, "isBundle": true,
"bundleName": "", "bundleName": "",
"priority": 1, "priority": 1,
"compressionType": {}, "compressionType": {},
"optimizeHotUpdate": {}, "optimizeHotUpdate": {},
"inlineSpriteFrames": {}, "inlineSpriteFrames": {},
"isRemoteBundle": { "isRemoteBundle": {
"ios": false, "ios": true,
"android": false "android": true
}, },
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "f0680ae0-c079-45ef-abd7-9e63d90b982b",
"downloadMode": 0,
"duration": 0.130612,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "47545faa-88bf-4175-af9e-7cc99f5ccacb",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/* /*
* @Author: ls * @Author: ls
* @Date: 2022-03-09 21:15:44 * @Date: 2022-03-09 21:15:44
* @LastEditTime: 2022-03-09 23:15:56 * @LastEditTime: 2022-03-15 11:50:32
* @LastEditors: ls * @LastEditors: ls
* @Description: 蛋糕 * @Description: 蛋糕
* @FilePath: \cake\assets\cake\scene\cake.ts * @FilePath: \cake\assets\cake\scene\cake.ts
...@@ -9,22 +9,31 @@ ...@@ -9,22 +9,31 @@
import { MyCocosSceneComponent } from '../script/MyCocosSceneComponent'; import { MyCocosSceneComponent } from '../script/MyCocosSceneComponent';
const { ccclass, property } = cc._decorator; let { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class SceneComponent extends MyCocosSceneComponent { export default class SceneComponent extends MyCocosSceneComponent {
addPreloadImage() { addPreloadImage() {
// TODO 根据自己的配置预加载图片资源 // TODO 根据自己的配置预加载图片资源
this._imageResList.push({ url: this.data.pic_url }); // this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
} }
addPreloadAudio() { addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源 // TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: this.data.audio_url }); let length = this.data.questions.length;
}
addPreloadAnima() {} for (let index = 0; index < length; index++) {
this._audioResList.push({ url: this.data.questions[index].audio });
}
this._audioResList.push({ url: this.data.guideAudio });
}
addPreloadAnima() {
// let length = this.data.questions.length;
// for (let index = 0; index < length; index++) {
// this._animaResList.push({ url: this.data.questions[index].dragonBoneData.skeJsonData.url });
// this._animaResList.push({ url: this.data.questions[index].dragonBoneData.texJsonData.url });
// this._animaResList.push({ url: this.data.questions[index].dragonBoneData.texPngData.url });
// }
}
onLoadEnd() { onLoadEnd() {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考 // TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
...@@ -33,173 +42,1073 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -33,173 +42,1073 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initListener(); this.initListener();
} }
_cantouch = null; _first = null; // 首次
_curPage = null; // 第几题
_results = null; // 题目结果
_sounding = null; // 播放题干中
_schedule_candle = null; // 蜡烛燃烧回调
_timeout = null; // 倒计时
initData() { initData() {
// 所有全局变量 默认都是null // 所有全局变量 默认都是null
this._cantouch = true; this._first = true;
this._curPage = 0;
this._results = [];
this._sounding = false;
this._schedule_candle = null;
this._timeout = 0;
} }
initView() { initView() {
this.initAdapter(); this.initAdapter();
this.initBtn();
this.initHome();
// this.initPic();
// this.initIcon(); this.resetGame();
}
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() { initListener() {}
// const iconNode = this.getSprNode('icon');
// iconNode.zIndex = 5; /**
// iconNode.anchorX = 1; * 初始化适配
// iconNode.anchorY = 1; */
// iconNode.parent = cc.find('Canvas'); initAdapter() {
// iconNode.x = iconNode.parent.width / 2 - 10; // 上
// iconNode.y = iconNode.parent.height / 2 - 10; let up = cc.find('up', this.node);
// iconNode.on(cc.Node.EventType.TOUCH_START, () => { up.x = 0;
// this.playAudioByUrl(this.data.audio_url); up.y = this.node.height / 2;
// 下
let down = cc.find('down', this.node);
down.x = 0;
down.y = -this.node.height / 2;
// 左
let left = cc.find('left', this.node);
left.x = -this.node.width / 2;
left.y = 0;
// 右
let right = cc.find('right', this.node);
right.x = this.node.width / 2;
right.y = 0;
// 左上
let left_up = cc.find('left_up', this.node);
left_up.x = -this.node.width / 2;
left_up.y = this.node.height / 2;
// 左下
let left_down = cc.find('left_down', this.node);
left_down.x = -this.node.width / 2;
left_down.y = -this.node.height / 2;
// 右上
let right_up = cc.find('right_up', this.node);
right_up.x = this.node.width / 2;
right_up.y = this.node.height / 2;
// 右下
let right_down = cc.find('right_down', this.node);
right_down.x = this.node.width / 2;
right_down.y = -this.node.height / 2;
// 背景
let bg = cc.find('bg', this.node);
bg.scale = this._mapScaleMax;
// 遮罩
let mask = cc.find('mask', this.node);
mask.scale = this._mapScaleMax;
// 桌子
let desktop = cc.find('down/desktop', this.node);
desktop.width = this.node.width;
}
/**
* 显示开始游戏
*/
initHome() {
// 显示遮罩
let mask = cc.find('mask', this.node);
mask.opacity = 255;
mask.active = true;
// 显示开始
let play = cc.find('btn_play', this.node);
play.once('click', this.play, this);
play.active = true;
// 显示标题
let title = cc.find('left_up/title', this.node);
title.active = true;
let titleLabel = title.getChildByName('label').getComponent(cc.Label);
let titleLabelOutline = title.getChildByName('label').getComponent(cc.LabelOutline);
titleLabel.string = this.data.title;
titleLabel.scheduleOnce(() => {
titleLabelOutline.width = (titleLabel.actualFontSize / 48) * 6; // 下一帧执行,更新描边
});
}
/**
* 重置游戏
*/
resetGame() {
// 隐藏贴图(并初始化)
let layout = cc.find('right_up/layout', this.node);
layout.active = false;
if (this._first) {
this._first = false;
this._results.length = 0;
layout.removeAllChildren();
let item = cc.find('right_up/item', this.node);
if (this.data.questions.length) {
for (let index = 0; index < this.data.questions.length; index++) {
this._results.push(false);
let tag = cc.instantiate(item);
tag.parent = layout;
tag.active = true;
}
}
}
// 隐藏选项
let cake_drop_down = cc.find('right/cake_drop_down', this.node);
cake_drop_down.active = false;
let cake_select_01 = cc.find('right/cake_select_01', this.node);
cake_select_01.active = false;
let cake_select_02 = cc.find('right/cake_select_02', this.node);
cake_select_02.active = false;
// 隐藏选项描边
let cake_select_side_01 = cc.find('right/cake_select_01/side', this.node);
cake_select_side_01.active = false;
let cake_select_side_02 = cc.find('right/cake_select_02/side', this.node);
cake_select_side_02.active = false;
// 隐藏蛋糕
let cake = cc.find('down/cake', this.node);
cake.active = false;
let cake_style_01 = cc.find('down/cake/cake_style_01', this.node);
cake_style_01.active = false;
let cake_style_02 = cc.find('down/cake/cake_style_02', this.node);
cake_style_02.active = false;
let cake_style_03 = cc.find('down/cake/cake_style_03', this.node);
cake_style_03.active = false;
let cake_style_04 = cc.find('down/cake/cake_style_04', this.node);
cake_style_04.active = false;
let cake_style_05 = cc.find('down/cake/cake_style_05', this.node);
cake_style_05.active = false;
// 隐藏蜡烛
let candle = cc.find('left_down/candle', this.node);
candle.getComponent(cc.Sprite).spriteFrame = this.getSpriteFrame('candle_select'); // 设置蜡烛精灵
candle.getComponent(cc.Sprite).fillRange = 1;
cc.find('left_down/candle/cake_fire_ske', this.node).active = false;
cc.find('left_down/candle/cake_timeout_ske', this.node).active = false;
candle.active = false;
// 隐藏提交
let submit = cc.find('right_down/btn_submit', this.node);
submit.active = false;
// 隐藏喇叭
let sound = cc.find('right_down/btn_sound', this.node);
sound.active = false;
// 隐藏碎渣
let offscum = cc.find('right_down/offscum', this.node);
offscum.active = false;
// 隐藏come on
let come_on = cc.find('come_on', this.node);
come_on.active = false;
// 隐藏nice try
let nice_try = cc.find('nice_try', this.node);
nice_try.active = false;
// 隐藏全对
let all_right = cc.find('all_right', this.node);
all_right.active = false;
// 隐藏评测
let pc = cc.find('down/pc', this.node);
pc.active = false;
// 隐藏测评excellent
let test_excellent = cc.find('test_excellent', this.node);
test_excellent.active = false;
// 隐藏测评nice try
let test_nice_try = cc.find('test_nice_try', this.node);
test_nice_try.active = false;
}
/**
* 初始化游戏
*/
initGame() {
let problem = this.data.questions[this._curPage];
// 隐藏开始
let play = cc.find('btn_play', this.node);
play.active = false;
// 显示贴图
let layout = cc.find('right_up/layout', this.node);
layout.active = true;
// 设置贴图蓝边
let curTag = layout.children[this._curPage];
if (curTag) {
curTag.getChildByName('red').active = false;
curTag.getChildByName('tag').active = false;
curTag.getChildByName('bule').active = true;
}
this.playLocalAudio('enter');
// 移入题干蛋糕
let cake = cc.find('down/cake', this.node);
cc.Tween.stopAllByTarget(cake);
cake.x = this.node.width / 2 + 200;
cake.active = true;
cc.tween(cake).to(0.5, { x: 0 }).start();
// 蛋糕底座显示完整单词
let cake_base = cake.getChildByName('cake_base');
cake_base.active = true;
cake_base.getChildByName('label').getComponent(cc.Label).string = problem.text;
// 根据单词长度显示蛋糕
for (let index = 0; index < problem.text.length - 1; index++) {
let show_cake = cake.getChildByName(`cake_style_0${index + 1}`);
show_cake.active = true;
show_cake.getChildByName('label').getComponent(cc.Label).string = problem.text[index];
}
// 移入选项蛋糕
let cake_select_01 = cc.find('right/cake_select_01', this.node);
let cake_select_02 = cc.find('right/cake_select_02', this.node);
cc.Tween.stopAllByTarget(cake_select_01);
cc.Tween.stopAllByTarget(cake_select_02);
cake_select_01.x = 200;
cake_select_02.x = 200;
cake_select_01.active = true;
cake_select_02.active = true;
cc.tween(cake_select_01).to(0.5, { x: -200 }).start();
cc.tween(cake_select_02).to(0.5, { x: -200 }).start();
// 替换选项蛋糕spriteFrame
let cake_select = cake.getChildByName(`cake_style_0${problem.text.length}`);
cake_select_01.getComponent(cc.Sprite).spriteFrame = cake_select.getComponent(cc.Sprite).spriteFrame;
cake_select_02.getComponent(cc.Sprite).spriteFrame = cake_select.getComponent(cc.Sprite).spriteFrame;
// 替换选项蛋糕边spriteFrame
let cake_select_side = cake_select.getChildByName('side');
cake_select_01.getChildByName('side').getComponent(cc.Sprite).spriteFrame = cake_select_side.getComponent(cc.Sprite).spriteFrame;
cake_select_02.getChildByName('side').getComponent(cc.Sprite).spriteFrame = cake_select_side.getComponent(cc.Sprite).spriteFrame;
// 随机设置选项蛋糕
let rand = Math.random();
let right_select = rand > 0.5 ? '01' : '02';
let wrong_select = rand > 0.5 ? '02' : '01';
let cake_select_right = cc.find(`right/cake_select_${right_select}`, this.node);
let cake_select_wrong = cc.find(`right/cake_select_${wrong_select}`, this.node);
cake_select_right.getChildByName('label').getComponent(cc.Label).string = problem.rightLetter;
cake_select_wrong.getChildByName('label').getComponent(cc.Label).string = problem.wrongLetter;
cake_select_right.off('click');
cake_select_wrong.off('click');
// 渐隐遮罩
let mask = cc.find('mask', this.node);
cc.Tween.stopAllByTarget(mask);
// mask.opacity = 255;
let self = this;
cc.tween(mask)
.to(0.5, { opacity: 0 })
.call(() => {
self.playLocalAudio('enter');
// 移除蜡烛燃烧回调
if (self._schedule_candle) {
self._timeout = 0;
self.unschedule(this._schedule_candle);
self._schedule_candle = null;
}
// 移入蜡烛
let candle = cc.find('left_down/candle', self.node);
let cake_fire = cc.find('left_down/candle/cake_fire_ske', self.node);
let cake_timeout = cc.find('left_down/candle/cake_timeout_ske', self.node);
cc.Tween.stopAllByTarget(candle);
candle.x = -80;
candle.active = true;
cc.tween(candle).to(0.5, { x: 80 }).start();
// 设置蓝色蜡烛
candle.getComponent(cc.Sprite).spriteFrame = self.getSpriteFrame('candle_select');
candle.getComponent(cc.Sprite).fillRange = 1;
// 设置火焰燃烧状态
cake_fire.y = 362;
cake_timeout.y = 423;
cake_fire.active = true;
cake_timeout.active = false;
// 播放题干音频
self.playAudioByUrl(problem.audio, () => {
console.log('题干音频播放完成');
// 移入喇叭
let sound = cc.find('right_down/btn_sound', self.node);
cc.Tween.stopAllByTarget(sound);
sound.x = 80;
sound.active = true;
cc.tween(sound).to(0.5, { x: -80 }).start();
sound.on('click', () => {
if (self._sounding) return;
self._sounding = true;
let open = cc.find('right_down/btn_sound/open', self.node);
cc.Tween.stopAllByTarget(open);
// open.opacity = 255;
open.active = true;
cc.tween(open).blink(10, 20).start();
self.playAudioByUrl(problem.audio, () => {
cc.Tween.stopAllByTarget(open);
self._sounding = false;
open.opacity = 255;
});
});
self._timeout = problem.chooseWaitTime;
// 蜡烛燃烧回调
self._schedule_candle = function (dt) {
self._timeout -= dt;
let ratio = self._timeout / problem.chooseWaitTime;
if (self._timeout < 0) {
console.log('蜡烛燃尽');
self.selectWrong();
self.unschedule(self._schedule_candle);
self._schedule_candle = null;
cake_timeout.active = false;
cake_fire.active = false;
self._timeout = 0;
} else if (ratio <= 0.2) {
cake_fire.active = false;
cake_timeout.active = true;
}
cake_fire.y = 362 - candle.height + candle.height * ratio;
cake_timeout.y = 423 - candle.height + candle.height * ratio;
candle.getComponent(cc.Sprite).fillRange = ratio;
};
// 蜡烛开始燃烧
self.schedule(self._schedule_candle);
cake_select_wrong.once(
'click',
() => {
console.log('选择错误');
// 选择错误
self.selectWrong();
},
self,
);
cake_select_right.once(
'click',
() => {
console.log('选择正确');
// 显示选中蛋糕描边
cake_select_right.getChildByName('side').active = true;
// 获取目标蛋糕的相对位置
let cake_style = cake.getChildByName(`cake_style_0${problem.text.length}`);
let tarNodePos = cake_style.position;
let tarWorldPos = cake.convertToWorldSpaceAR(cc.v2(tarNodePos));
let tarRightPos = cake_select_right.parent.convertToNodeSpaceAR(tarWorldPos);
// 移动选中蛋糕到目标位置
cc.Tween.stopAllByTarget(cake_select_right);
cc.tween(cake_select_right)
.to(0.5, { position: cc.v3(tarRightPos), scale: cake_style.scale })
.call(() => {
// let cake_drop_down = cake_select_right.getChildByName('cake_drop_down');
// cake_drop_down.x = 0;
// cake_drop_down.y = cake_style.scale * 50;
let cake_drop_down = cc.find('right/cake_drop_down', self.node);
cake_drop_down.x = tarRightPos.x;
cake_drop_down.y = tarRightPos.y + cake_style.scale * 50;
cake_drop_down.active = true;
let dragonBones_cake_drop_down = cake_drop_down.getComponent(dragonBones.ArmatureDisplay);
dragonBones_cake_drop_down.playAnimation('newAnimation', 1);
self.playLocalAudio('right');
})
.start();
// 移除错误选项点击事件
cake_select_wrong.off('click');
// 隐藏干扰选项蛋糕
// cake_select_wrong.x = -200;
cake_select_wrong.active = true;
cc.Tween.stopAllByTarget(cake_select_wrong);
cc.tween(cake_select_wrong)
.to(0.5, { x: 200 })
.call(() => {
cake_select_wrong.active = false;
})
.start();
self.selectRight();
},
self,
);
});
})
.start();
}
/**
* 开始游戏
*/
play() {
this._curPage = 0;
this.initGame();
}
startTest() {
// TODO 结束录音
// TODO 开始测评
// window['courseware'].startTest();
this.stopTest();
// 渐显遮罩
let mask = cc.find('mask', this.node);
mask.opacity = 0;
mask.active = true;
cc.Tween.stopAllByTarget(mask);
cc.tween(mask).to(0.5, { opacity: 255 }).start();
// TODO 文档未体现 移除蜡烛和提交
// 移出提交
let submit = cc.find('right_down/btn_submit', this.node);
submit.off('click');
// submit.x = -120;
submit.active = true;
cc.Tween.stopAllByTarget(submit);
cc.tween(submit)
.to(0.5, { x: 120 })
.call(() => {
submit.active = false;
})
.start();
// 移除蜡烛燃烧回调
if (this._schedule_candle) {
this._timeout = 0;
this.unschedule(this._schedule_candle);
this._schedule_candle = null; // 移除蜡烛 schedule
}
// 移出蜡烛
let candle = cc.find('left_down/candle', this.node);
candle.active = true;
// candle.x = 80;
cc.Tween.stopAllByTarget(candle);
cc.tween(candle).to(0.5, { x: -80 }).start();
// TODO 开始测评 使用setTimeout 模拟
setTimeout(() => {
// this.playLocalAudio('voice_test_excellent');
// // 显示贴图
// let layout = cc.find('right_up/layout', this.node);
// layout.active = true;
// let curTag = layout.children[this._curPage];
// if (curTag) {
// curTag.getChildByName('bule').active = false;
// curTag.getChildByName('red').active = false;
// let tag = curTag.getChildByName('tag');
// tag.active = true;
// tag.opacity = 0;
// tag.scale = 0.5;
// cc.tween(tag).to(0.7, { opacity: 255, scale: 1.2 }).to(0.2, { scale: 1 }).start();
// }
// let excellent = cc.find('excellent_ske', this.node);
// excellent.active = true;
// let dragonBones_excellent = excellent.getComponent(dragonBones.ArmatureDisplay);
// dragonBones_excellent.playAnimation('newAnimation', 1);
this.playLocalAudio('voice_test_nice_try');
let layout = cc.find('right_up/layout', this.node);
layout.active = true;
let curTag = layout.children[this._curPage];
if (curTag) {
curTag.getChildByName('bule').active = false;
curTag.getChildByName('tag').active = false;
curTag.getChildByName('red').active = true;
}
let winSizeH = this.node.height;
// 移入测评nice try
let test_nice_try = cc.find('test_nice_try', this.node);
cc.Tween.stopAllByTarget(test_nice_try);
test_nice_try.x = 0;
test_nice_try.y = winSizeH * 0.5 + 400;
test_nice_try.active = true;
cc.Tween.stopAllByTarget(test_nice_try);
cc.tween(test_nice_try)
.to(0.7, { y: 0 }, { easing: 'backOut' })
.delay(1)
.to(0.3, { y: -winSizeH * 0.5 - 400 }, { easing: 'sineIn' })
.call(() => {
test_nice_try.active = true;
})
.start();
// cc.Tween.stopAllByTarget(test_nice_try);
// cc.tween(test_nice_try)
// .to(0.5, { y: -winSizeH * 0.1 }, { easing: 'sineIn' })
// .to(0.2, { y: 0 }, { easing: 'sineOut' })
// .delay(1)
// .to(0.3, { y: -winSizeH * 0.5 - 400 }, { easing: 'sineIn' })
// .call(() => {
// test_nice_try.active = true;
// })
// .start();
}, 3000);
}
stopTest() {
// window['courseware'].stopTest((res) => {
// console.log(res);
// console.log(res.overall);
// }); // });
} }
curPage = null; completeGame() {
// initBtn() { let mask = cc.find('mask', this.node);
// // this.curPage = 0; mask.opacity = 0;
// // const bottomPart = cc.find('Canvas/bottomPart');
// // bottomPart.zIndex = 5; // 提高层级 // 移出pc
// // bottomPart.x = bottomPart.parent.width / 2; let pc = cc.find('down/pc', this.node);
// // bottomPart.y = -bottomPart.parent.height / 2; // pc.x = 0;
// // const leftBtnNode = bottomPart.getChildByName('btn_left'); pc.active = true;
// // //节点中添加了button组件 则可以添加click事件监听 cc.Tween.stopAllByTarget(pc);
// // leftBtnNode.on('click', () => { cc.tween(pc)
// // if (!this._cantouch) { .to(0.5, { x: -this.node.width / 2 - 400 })
// // return; .start();
// // } }
// // if (this.curPage == 0) {
// // return; selectRight() {
// // } let problem = this.data.questions[this._curPage];
// // this.curPage = 0;
// // this.leftMove(); this.playLocalAudio('enter');
// // this.playLocalAudio('btn');
// // }); // 移出喇叭
// // const rightBtnNode = bottomPart.getChildByName('btn_right'); let sound = cc.find('right_down/btn_sound', this.node);
// // //节点中添加了button组件 则可以添加click事件监听 sound.off('click');
// // rightBtnNode.on('click', () => { // sound.x = -80;
// // if (!this._cantouch) { sound.active = true;
// // return; cc.Tween.stopAllByTarget(sound);
// // } cc.tween(sound)
// // if (this.curPage == 1) { .to(0.5, { x: 80 })
// // return; .call(() => {
// // } sound.active = false;
// // this.curPage = 1; })
// // this.rightMove(); .start();
// // // 游戏结束时需要调用这个方法通知系统作业完成
// // onHomeworkFinish(); // 移除蜡烛燃烧回调
// // this.playLocalAudio('btn'); if (this._schedule_candle) {
// // }); this._timeout = 0;
// } this.unschedule(this._schedule_candle);
this._schedule_candle = null; // 移除蜡烛 schedule
leftMove() { }
// this._cantouch = false;
// const len = this.pic1.parent.width; // 移出蜡烛
// cc.tween(this.pic1).to(1, { x: this.pic1.baseX }, { easing: 'cubicInOut' }).start(); let candle = cc.find('left_down/candle', this.node);
// cc.tween(this.pic2) let cake_fire = cc.find('left_down/candle/cake_fire_ske', this.node);
// .to(1, { x: this.pic2.baseX }, { easing: 'cubicInOut' }) let cake_timeout = cc.find('left_down/candle/cake_timeout_ske', this.node);
candle.active = true;
// candle.x = 80;
let self = this;
cc.Tween.stopAllByTarget(candle);
cc.tween(candle)
.to(0.5, { x: -80 })
.call(() => {
candle.active = false;
// 第二步 => 语音评测
// 移入pc
let pc = cc.find('down/pc', self.node);
pc.x = 0;
pc.y = self.node.height + 400;
pc.active = true;
cc.Tween.stopAllByTarget(pc);
cc.tween(pc)
.to(0.5, { y: 0 })
.call(() => {
// 移入提交
let submit = cc.find('right_down/btn_submit', self.node);
submit.off('click');
// submit.x = 120;
submit.active = true;
cc.Tween.stopAllByTarget(submit);
cc.tween(submit).to(0.5, { x: -120 }).start();
submit.once('click', () => {
console.log('点击提交,结束录音,开始测评');
// 移除蜡烛燃烧回调
if (self._schedule_candle) {
self._timeout = 0;
self.unschedule(self._schedule_candle);
self._schedule_candle = null; // 移除蜡烛 schedule
}
// 开始测评(结束录音)
self.startTest();
});
// 移除蜡烛燃烧回调
if (self._schedule_candle) {
self._timeout = 0;
self.unschedule(self._schedule_candle);
self._schedule_candle = null; // 移除蜡烛 schedule
}
// 移入蜡烛
candle.x = -80;
candle.active = true;
cc.Tween.stopAllByTarget(candle);
cc.tween(candle).to(0.5, { x: 80 }).start();
// 设置红色蜡烛
candle.getComponent(cc.Sprite).spriteFrame = self.getSpriteFrame('candle_test');
candle.getComponent(cc.Sprite).fillRange = 1;
// 设置火焰燃烧状态
cake_fire.y = 362;
cake_timeout.y = 423;
cake_fire.active = true;
cake_timeout.active = false;
// 播放语音评测引导音频
self.playAudioByUrl(self.data.guideAudio, () => {
// TODO 开始录音
self._timeout = problem.testWaitTime;
// 蜡烛燃烧回调
self._schedule_candle = function (dt) {
self._timeout -= dt;
let ratio = self._timeout / problem.testWaitTime;
if (self._timeout < 0) {
self.unschedule(self._schedule_candle);
self._schedule_candle = null;
cake_timeout.active = false;
cake_fire.active = false;
self._timeout = 0;
// 开始测评(结束录音)
self.startTest();
} else if (ratio <= 0.2) {
cake_fire.active = false;
cake_timeout.active = true;
}
cake_fire.y = 362 - candle.height + candle.height * ratio;
cake_timeout.y = 423 - candle.height + candle.height * ratio;
candle.getComponent(cc.Sprite).fillRange = ratio;
};
// 蜡烛开始燃烧
self.schedule(self._schedule_candle);
});
// 播放骨骼动画
let frame = cc.find('down/pc/frame', self.node);
self.asyncLoadDragonBoneAnime(frame, problem.dragonBoneData).then((node: cc.Node) => {
let dragonBones_test = node.getComponent(dragonBones.ArmatureDisplay);
dragonBones_test.playAnimation('newAnimation', 1);
dragonBones_test.off(dragonBones.EventObject.COMPLETE);
dragonBones_test.once(dragonBones.EventObject.COMPLETE, () => {
node.active = false;
node.destroy();
node = null;
});
});
})
.start();
})
.start();
}
selectWrong() {
this.playLocalAudio('error');
// 隐藏选项蛋糕
let cake_select_01 = cc.find('right/cake_select_01', this.node);
let cake_select_02 = cc.find('right/cake_select_02', this.node);
cake_select_01.off('click');
cake_select_02.off('click');
cake_select_01.active = false;
cake_select_02.active = false;
// 显示渣渣
let offscum = cc.find('right_down/offscum', this.node);
offscum.active = true;
// 贴图变红
let layout = cc.find('right_up/layout', this.node);
let curTag = layout.children[this._curPage];
if (curTag) {
curTag.getChildByName('bule').active = false;
curTag.getChildByName('tag').active = false;
curTag.getChildByName('red').active = true;
}
// 移出喇叭
let sound = cc.find('right_down/btn_sound', this.node);
sound.off('click');
sound.active = true;
// sound.x = -80;
sound.off('click');
cc.Tween.stopAllByTarget(sound);
cc.tween(sound)
.to(0.5, { x: 80 })
.call(() => {
sound.active = false;
})
.start();
// 移除蜡烛燃烧回调
if (this._schedule_candle) {
this._timeout = 0;
this.unschedule(this._schedule_candle);
this._schedule_candle = null; // 移除蜡烛 schedule
}
// 移出蜡烛
let candle = cc.find('left_down/candle', this.node);
candle.active = true;
// candle.x = 80;
cc.Tween.stopAllByTarget(candle);
cc.tween(candle)
.to(0.5, { x: -80 })
.call(() => {
candle.active = false;
this._results[this._curPage] = false;
this.overTime();
})
.start();
}
overTime() {
if (this._curPage === this.data.questions.length - 1) {
// 总结
let numRight = 0;
for (let index = 0; index < this._results.length; index++) {
if (this._results[index]) numRight++;
}
if (numRight / this._results.length < 0.6) {
this.comeOn();
} else {
this.niceTry();
}
} else {
// 开始下一题
this._curPage++;
this.resetGame();
this.initGame();
}
}
comeOn() {
let pc = cc.find('down/pc', this.node);
if (pc.active) {
// TODO 文档未体现
this.playLocalAudio('game_over_came_on');
let come_on = cc.find('come_on', this.node);
cc.Tween.stopAllByTarget(come_on);
come_on.x = 0;
come_on.y = this.node.height * 0.5 + 400;
come_on.active = true;
cc.tween(come_on)
.to(0.7, { y: 0 }, { easing: 'backOut' })
.delay(1)
.to(0.3, { y: -this.node.height * 0.5 - 400 }, { easing: 'sineIn' })
.call(() => {
come_on.active = true;
})
.start();
} else {
// 移入pc
cc.Tween.stopAllByTarget(pc);
pc.x = 0;
pc.y = this.node.height + 400;
pc.active = true;
cc.tween(pc)
.to(0.5, { y: 0 })
.call(() => {
this.playLocalAudio('game_over_came_on');
let come_on = cc.find('come_on', this.node);
cc.Tween.stopAllByTarget(come_on);
come_on.x = 0;
come_on.y = this.node.height * 0.5 + 400;
come_on.active = true;
cc.tween(come_on)
.to(0.7, { y: 0 }, { easing: 'backOut' })
.delay(1)
.to(0.3, { y: -this.node.height * 0.5 - 400 }, { easing: 'sineIn' })
.call(() => {
come_on.active = true;
})
.start();
})
.start();
}
// cc.tween(come_on)
// .to(0.5, { y: -this.node.height * 0.1 }, { easing: 'sineIn' })
// .to(0.2, { y: 0 }, { easing: 'sineOut' })
// .delay(1)
// .to(0.3, { y: -this.node.height * 0.5 - 400 }, { easing: 'sineIn' })
// .call(() => { // .call(() => {
// this._cantouch = true; // come_on.active = true;
// }) // })
// .start(); // .start();
} }
rightMove() { niceTry() {
// this._cantouch = false; let pc = cc.find('down/pc', this.node);
// const len = this.pic1.parent.width; if (pc.active) {
// cc.tween(this.pic1) // TODO 文档未体现
// .to(1, { x: this.pic1.baseX - len }, { easing: 'cubicInOut' }) this.playLocalAudio('game_over_nice_try');
// .start(); let nice_try = cc.find('nice_try', this.node);
// cc.tween(this.pic2) cc.Tween.stopAllByTarget(nice_try);
// .to(1, { x: this.pic2.baseX - len }, { easing: 'cubicInOut' }) nice_try.x = 0;
nice_try.y = this.node.height * 0.5 + 400;
nice_try.active = true;
cc.tween(nice_try)
.to(0.7, { y: 0 }, { easing: 'backOut' })
.delay(1)
.to(0.3, { y: -this.node.height * 0.5 - 400 }, { easing: 'sineIn' })
.call(() => {
nice_try.active = true;
})
.start();
} else {
// 移入pc
cc.Tween.stopAllByTarget(pc);
pc.x = 0;
pc.y = this.node.height + 400;
pc.active = true;
cc.tween(pc)
.to(0.5, { y: 0 })
.call(() => {
this.playLocalAudio('game_over_nice_try');
let nice_try = cc.find('nice_try', this.node);
cc.Tween.stopAllByTarget(nice_try);
nice_try.x = 0;
nice_try.y = this.node.height * 0.5 + 400;
nice_try.active = true;
cc.tween(nice_try)
.to(0.7, { y: 0 }, { easing: 'backOut' })
.delay(1)
.to(0.3, { y: -this.node.height * 0.5 - 400 }, { easing: 'sineIn' })
.call(() => {
nice_try.active = true;
})
.start();
})
.start();
}
// cc.tween(nice_try)
// .to(0.5, { y: -this.node.height * 0.1 }, { easing: 'sineIn' })
// .to(0.2, { y: 0 }, { easing: 'sineOut' })
// .delay(1)
// .to(0.3, { y: -this.node.height * 0.5 - 400 }, { easing: 'sineIn' })
// .call(() => { // .call(() => {
// this._cantouch = true; // nice_try.active = true;
// }) // })
// .start(); // .start();
} }
// update (dt) {}, allRight() {
this.playLocalAudio('all_right');
initListener() {} let pc = cc.find('down/pc', this.node);
if (pc.active) {
// TODO 文档未体现
let all_right = cc.find('all_right', this.node);
all_right.active = true;
let dragonBones_all_right = all_right.getComponent(dragonBones.ArmatureDisplay);
dragonBones_all_right.playAnimation('newAnimation', 1);
dragonBones_all_right.off(dragonBones.EventObject.COMPLETE);
dragonBones_all_right.once(dragonBones.EventObject.COMPLETE, () => {
all_right.active = false;
});
} else {
// 移入pc
cc.Tween.stopAllByTarget(pc);
pc.x = 0;
pc.y = this.node.height + 400;
pc.active = true;
cc.tween(pc)
.to(0.5, { y: 0 })
.call(() => {
let all_right = cc.find('all_right', this.node);
all_right.active = true;
let dragonBones_all_right = all_right.getComponent(dragonBones.ArmatureDisplay);
dragonBones_all_right.playAnimation('newAnimation', 1);
dragonBones_all_right.off(dragonBones.EventObject.COMPLETE);
dragonBones_all_right.once(dragonBones.EventObject.COMPLETE, () => {
all_right.active = false;
});
})
.start();
}
}
onDestroy() {
let all_right = cc.find('all_right', this.node);
let dragonBones_all_right = all_right.getComponent(dragonBones.ArmatureDisplay);
dragonBones_all_right.off(dragonBones.EventObject.COMPLETE);
}
playLocalAudio(audioName) { playLocalAudio(audioName) {
const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource); let audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const id = cc.audioEngine.playEffect(audio.clip, false); let id = cc.audioEngine.playEffect(audio.clip, false);
cc.audioEngine.setFinishCallback(id, () => { cc.audioEngine.setFinishCallback(id, () => {
resolve(id); resolve(id);
}); });
}); });
} }
initAdapter() { getSpriteFrame(resName) {
const bgNode = cc.find('bg', this.node); let sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame;
bgNode.scale = this._mapScaleMax; return sf;
const maskNode = cc.find('mask', this.node); }
maskNode.scale = this._mapScaleMax;
const top_left = cc.find('top_left', this.node); /**
* 等比缩放
* @param imgWidth 图片宽
* @param imgHeight 图片高
* @param containerWidth 容器(目标)宽
* @param containerHeight 容器(目标)高
* @returns
*/
imgScaling(imgWidth, imgHeight, containerWidth, containerHeight) {
let [
// 用于设定图片的宽和高
tempWidth,
tempHeight,
] = [undefined, undefined];
top_left.x = -top_left.parent.width / 2; try {
top_left.y = top_left.parent.height / 2; imgWidth = parseFloat(imgWidth);
imgHeight = parseFloat(imgHeight);
containerWidth = parseFloat(containerWidth);
containerHeight = parseFloat(containerHeight);
} catch (error) {
throw new Error('抱歉,我只接收数值类型或者可以转成数值类型的参数');
}
const bottom = cc.find('bottom', this.node); if (imgWidth > 0 && imgHeight > 0) {
bottom.y = -bottom.parent.height / 2; // 原图片宽高比例 大于 指定的宽高比例,这就说明了原图片的宽度必然 > 高度
bottom.width = bottom.parent.width; if (imgWidth / imgHeight >= containerWidth / containerHeight) {
} if (imgWidth > containerWidth) {
tempWidth = containerWidth;
// 按原图片的比例进行缩放
tempHeight = (imgHeight * containerWidth) / imgWidth;
} else {
// 按照图片的大小进行缩放
tempWidth = imgWidth;
tempHeight = imgHeight;
}
} else {
// 原图片的高度必然 > 宽度
if (imgHeight > containerHeight) {
tempHeight = containerHeight;
// 按原图片的比例进行缩放
tempWidth = (imgWidth * containerHeight) / imgHeight;
} else {
// 按原图片的大小进行缩放
tempWidth = imgWidth;
tempHeight = imgHeight;
}
}
}
initBtn() { return { tempWidth, tempHeight };
const playBtnNode = cc.find('btn_play', this.node);
playBtnNode.on('click', this.play, this);
} }
play() { /**
const playBtnNode = cc.find('btn_play', this.node); * 异步加载 DragonBone
playBtnNode.active = false; * @param node
* @param param
* @returns
*/
async 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 maskNode = cc.find('mask', this.node); const loadSkeJsonData = new Promise((resolve, reject) => {
cc.tween(maskNode).to(0.5, { opacity: 0 }).start(); 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);
// @ts-ignore
atlas.texture = texture;
const asset = new dragonBones.DragonBonesAsset();
asset.dragonBonesJson = JSON.stringify(dragonBonesJson);
dragonDisplay.dragonAtlasAsset = atlas;
dragonDisplay.dragonAsset = asset;
// @ts-ignore
let armatureNames = dragonBonesJson.armature.map((data) => data.name);
if (armatureNames.length > 0) {
dragonDisplay.armatureName = armatureNames[0];
}
resolve(animaNode);
});
});
} }
} }
/* /*
* @Author: ls * @Author: ls
* @Date: 2022-03-09 21:14:56 * @Date: 2022-03-09 21:14:56
* @LastEditTime: 2022-03-09 21:18:33 * @LastEditTime: 2022-03-14 17:58:17
* @LastEditors: ls * @LastEditors: ls
* @Description: * @Description:
* @FilePath: \cake\assets\cake\script\defaultData.ts * @FilePath: \cake\assets\cake\script\defaultData.ts
*/ */
export const defaultData = { export const defaultData = {
pic_url: 'http://staging-teach.cdn.ireadabc.com/ed94332a503c31e0908bd4c6923a2665.png', guideAudio: 'http://staging-teach.cdn.ireadabc.com/40468ef6d120d03f83541b9344c6f9ea.mp3',
pic_url_2: 'http://staging-teach.cdn.ireadabc.com/5fb60317ade0195d35ad8034d5370a7f.png', title: 'Find the missing piece of the cake',
questions: [
{
text: 'dog',
audio: 'http://staging-teach.cdn.ireadabc.com/dfb27b510e121a1045a3b7613a530e43.mp3',
dragonBoneData: {
skeJsonData: { url: 'http://staging-teach.cdn.ireadabc.com/19d1a7f807cb34e8706d2d3b0324278b.json', name: 'right_ske.json' },
texJsonData: { url: 'http://staging-teach.cdn.ireadabc.com/8593091ce08cf9fd7c2d86f332b6cd6c.json', name: 'right_tex.json' },
texPngData: { url: 'http://staging-teach.cdn.ireadabc.com/d623e6d625ef102dbc5420b2f37fa52f.png', name: 'right_tex.png' },
},
text: 'This is a test label.', chooseWaitTime: 5,
testWaitTime: 3,
rightLetter: 'g',
wrongLetter: 'q',
audio_url: 'http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3', // waitTime: 12,
},
{
text: 'apple',
audio: 'http://staging-teach.cdn.ireadabc.com/7c18e0838dcf0707f885842ed09e1579.mp3',
dragonBoneData: {
skeJsonData: { url: 'http://staging-teach.cdn.ireadabc.com/703a41d6c7afe6fe653014d585ef0d58.json', name: 'd1_ske.json' },
texJsonData: { url: 'http://staging-teach.cdn.ireadabc.com/02bbebdc4a9f4a35d9ec285f61fca19c.json', name: 'd1_tex.json' },
texPngData: { url: 'http://staging-teach.cdn.ireadabc.com/ba2041fb4f69c37be52b76f5fb274c09.png', name: 'd1_tex.png' },
},
chooseWaitTime: 5,
testWaitTime: 3,
rightLetter: 'e',
wrongLetter: 'a',
},
],
}; };
{
"ver": "2.3.5",
"uuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 366,
"height": 336,
"platformSettings": {},
"subMetas": {
"1orange": {
"ver": "1.0.4",
"uuid": "43d1e79d-6de8-4dcb-b8ce-d767df7913aa",
"rawTextureUuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 0,
"trimY": 1,
"width": 366,
"height": 335,
"rawWidth": 366,
"rawHeight": 336,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ 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
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"height": 333, "height": 333,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"选蛋糕蜡烛": { "candle_select": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "42267a47-4b43-4fc7-8ade-43fbe9af9f61", "uuid": "42267a47-4b43-4fc7-8ade-43fbe9af9f61",
"rawTextureUuid": "020059a3-aa7e-46bb-80c8-10c040c4145a", "rawTextureUuid": "020059a3-aa7e-46bb-80c8-10c040c4145a",
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"height": 336, "height": 336,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"语音评测蜡烛": { "candle_test": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "078919b2-4669-4e6e-9589-bce21622363c", "uuid": "078919b2-4669-4e6e-9589-bce21622363c",
"rawTextureUuid": "329c6a75-a389-4958-b583-4e60ebbfea3e", "rawTextureUuid": "329c6a75-a389-4958-b583-4e60ebbfea3e",
......
{
"ver": "2.3.5",
"uuid": "ff154963-eafe-4e60-a812-a34e7b10a019",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": false,
"width": 720,
"height": 199,
"platformSettings": {},
"subMetas": {
"come_on": {
"ver": "1.0.4",
"uuid": "e4d8427c-af04-432a-bd41-e6dcd116972d",
"rawTextureUuid": "ff154963-eafe-4e60-a812-a34e7b10a019",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 720,
"height": 199,
"rawWidth": 720,
"rawHeight": 199,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "11b9a230-3398-40fc-bcf6-f87e13dedde5", "uuid": "6655ee73-9504-4ff8-8a6e-e3ba490267fc",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 378, "width": 779,
"height": 192, "height": 350,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"nice_try": { "nice_try": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "8658bd9b-be18-4632-90b8-76427a1c1d35", "uuid": "1096a2f0-a7fe-471b-8afd-559911c9d4fc",
"rawTextureUuid": "11b9a230-3398-40fc-bcf6-f87e13dedde5", "rawTextureUuid": "6655ee73-9504-4ff8-8a6e-e3ba490267fc",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 1, "trimX": 0,
"trimY": 1, "trimY": 0,
"width": 376, "width": 779,
"height": 190, "height": 350,
"rawWidth": 378, "rawWidth": 779,
"rawHeight": 192, "rawHeight": 350,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "9a79969a-0506-48d4-bc98-3c05d109b027", "uuid": "2d91b8b8-9a6e-451e-9d5c-787c67e74a35",
"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": 314,
"height": 67, "height": 44,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"btn_left": { "offscum": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "ce19457d-e8f3-4c38-ae3e-d4b99208ddb5", "uuid": "f390a584-f2bc-4d4e-a977-bc3ab4bc182a",
"rawTextureUuid": "9a79969a-0506-48d4-bc98-3c05d109b027", "rawTextureUuid": "2d91b8b8-9a6e-451e-9d5c-787c67e74a35",
"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": 314,
"height": 67, "height": 44,
"rawWidth": 61, "rawWidth": 314,
"rawHeight": 67, "rawHeight": 44,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 42, "width": 42,
"height": 39, "height": 39,
"platformSettings": {}, "platformSettings": {},
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"height": 494, "height": 494,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"语音评测动画框": { "test": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "9c3a1ec7-1657-4399-9ae8-e30e9df1abf9", "uuid": "9c3a1ec7-1657-4399-9ae8-e30e9df1abf9",
"rawTextureUuid": "6631dc71-ad57-4012-b482-58e15cdd900d", "rawTextureUuid": "6631dc71-ad57-4012-b482-58e15cdd900d",
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "e1b4d971-9876-4832-803a-5a321964a78b", "uuid": "11b9a230-3398-40fc-bcf6-f87e13dedde5",
"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": 378,
"height": 720, "height": 192,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"bg": { "test_nice_try": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "8288e3d4-4c75-4b27-8f01-f7014417f4dd", "uuid": "8658bd9b-be18-4632-90b8-76427a1c1d35",
"rawTextureUuid": "e1b4d971-9876-4832-803a-5a321964a78b", "rawTextureUuid": "11b9a230-3398-40fc-bcf6-f87e13dedde5",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 1,
"trimY": 0, "trimY": 1,
"width": 1280, "width": 376,
"height": 720, "height": 190,
"rawWidth": 1280, "rawWidth": 378,
"rawHeight": 720, "rawHeight": 192,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"height": 115, "height": 115,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"title_bg": { "title": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "802199c3-34bd-42b3-9482-c94cb82e5c8c", "uuid": "802199c3-34bd-42b3-9482-c94cb82e5c8c",
"rawTextureUuid": "ab80c877-00eb-4696-bc96-72fb9f830ef9", "rawTextureUuid": "ab80c877-00eb-4696-bc96-72fb9f830ef9",
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 310, "width": 310,
"height": 175, "height": 175,
"platformSettings": {}, "platformSettings": {},
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 305, "width": 305,
"height": 175, "height": 175,
"platformSettings": {}, "platformSettings": {},
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "30b47cee-f7a4-40b5-be96-419405e5a1ab", "uuid": "659807a3-e1e7-406b-aafa-904ecad2a195",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 305, "width": 305,
"height": 175, "height": 175,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"cake_style_03": { "cake_style_03": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "ca718cfa-8e05-4fb9-9d82-7a9662f6ff0e", "uuid": "300c43ef-cbc8-47e9-8d85-ad6c056ef922",
"rawTextureUuid": "30b47cee-f7a4-40b5-be96-419405e5a1ab", "rawTextureUuid": "659807a3-e1e7-406b-aafa-904ecad2a195",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": -0.5, "offsetX": -0.5,
"offsetY": 0.5, "offsetY": 0,
"trimX": 1, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 302, "width": 304,
"height": 174, "height": 175,
"rawWidth": 305, "rawWidth": 305,
"rawHeight": 175, "rawHeight": 175,
"borderTop": 0, "borderTop": 0,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "923307ec-79a4-4c9b-a536-e7d23c77c9bf", "uuid": "30b47cee-f7a4-40b5-be96-419405e5a1ab",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 319, "width": 305,
"height": 173, "height": 175,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"cake_style_04": { "cake_style_04": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "d564ae10-fdd4-4260-82b2-b2bbcbc87529", "uuid": "ca718cfa-8e05-4fb9-9d82-7a9662f6ff0e",
"rawTextureUuid": "923307ec-79a4-4c9b-a536-e7d23c77c9bf", "rawTextureUuid": "30b47cee-f7a4-40b5-be96-419405e5a1ab",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 2.5, "offsetX": -0.5,
"offsetY": 1, "offsetY": 0.5,
"trimX": 8, "trimX": 1,
"trimY": 0, "trimY": 0,
"width": 308, "width": 302,
"height": 171, "height": 174,
"rawWidth": 319, "rawWidth": 305,
"rawHeight": 173, "rawHeight": 175,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "659807a3-e1e7-406b-aafa-904ecad2a195", "uuid": "923307ec-79a4-4c9b-a536-e7d23c77c9bf",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 305, "width": 319,
"height": 175, "height": 173,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"cake_style_05": { "cake_style_05": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "300c43ef-cbc8-47e9-8d85-ad6c056ef922", "uuid": "d564ae10-fdd4-4260-82b2-b2bbcbc87529",
"rawTextureUuid": "659807a3-e1e7-406b-aafa-904ecad2a195", "rawTextureUuid": "923307ec-79a4-4c9b-a536-e7d23c77c9bf",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": -0.5, "offsetX": 2.5,
"offsetY": 0, "offsetY": 1,
"trimX": 0, "trimX": 8,
"trimY": 0, "trimY": 0,
"width": 304, "width": 308,
"height": 175, "height": 171,
"rawWidth": 305, "rawWidth": 319,
"rawHeight": 175, "rawHeight": 173,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 332, "width": 332,
"height": 196, "height": 196,
"platformSettings": {}, "platformSettings": {},
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 325, "width": 325,
"height": 199, "height": 199,
"platformSettings": {}, "platformSettings": {},
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 326, "width": 326,
"height": 198, "height": 198,
"platformSettings": {}, "platformSettings": {},
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 332, "width": 332,
"height": 196, "height": 196,
"platformSettings": {}, "platformSettings": {},
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": false,
"width": 328, "width": 328,
"height": 200, "height": 200,
"platformSettings": {}, "platformSettings": {},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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