Commit 8fe40ab4 authored by Tt's avatar Tt

init

parent cb1367da
{
"ver": "2.0.1",
"uuid": "a3f6fefb-abb7-418b-9726-ebea06068962",
"downloadMode": 0,
"duration": 1.776327,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "88e389ad-cdd7-4d2b-8900-19bbb61c340a",
"downloadMode": 0,
"duration": 0.173333,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "665e544c-fe92-4f24-bdcc-9475a763ff0c",
"downloadMode": 0,
"duration": 0.264,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "342d6b41-d606-43d5-9676-7b67f03d236f",
"downloadMode": 0,
"duration": 0.653061,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "16a0bc5d-fd4e-443e-aeb0-80139b29574d",
"downloadMode": 0,
"duration": 4.04898,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "e3803979-40c9-4b6c-9f51-39781cec1d1b",
"downloadMode": 0,
"duration": 2.115917,
"subMetas": {}
}
\ No newline at end of file
class Ani {
//抖动效果
static shake(item) {
// alert("抖动效果");
let tween = cc.tween(item);
tween.to(0.06, { angle: 10 })
.to(0.06, { angle: 0 })
.to(0.06, { angle: -10 })
.to(0.06, { angle: 0 });
tween.repeat(4);
tween.start();
}
static scaleOut(item) {
return new Promise((resolve) => {
let tween = cc.tween(item);
tween.to(0.2, { scaleX: 0, scaleY: 0 })
.call(() => { resolve() });
tween.start();
})
}
static scaleIn(item) {
return new Promise((resolve) => {
item.scaleX = 0;
item.scaleY = 0;
let tween = cc.tween(item);
tween.to(0.2, { scaleX: 1, scaleY: 1 })
.call(() => { resolve() });
tween.start();
})
}
}
export default Ani;
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "b15f80f1-6507-44eb-af5b-07bfb945bf0c",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
class Card {
constructor(picItem, cardId, doubuleId) {
//单个具体内容 一对的内容 一组的内容
this.cardId = cardId;
this.cardDid = doubuleId;
this.type = CardManager.TYPE_NULL;
if (picItem.radioValue == "A") {
if (picItem.title) {
this.txt = picItem.title;
this.type = CardManager.TYPE_TXT;
}
} else if (picItem.radioValue == "B") {
if (picItem.pic_url) {
this.img = picItem.pic_url;
this.type = CardManager.TYPE_IMG;
}
} else if (picItem.radioValue == "C") {
if (picItem.audio_url) {
this.audio = picItem.audio_url;
this.type = CardManager.TYPE_MP3;
}
}
// this.type = CardManager.TYPE_MP3;
}
// 具体去怎么分配 按照不同的分配逻辑去走
}
//最大的星星 一二三星 卡片组 卡片对 卡片 卡片内数据
class CardManager {
static TYPE_NULL = 0;
static TYPE_TXT = 1;
static TYPE_IMG = 2;
static TYPE_MP3 = 3;
static instance;
static getIns() {
if (!CardManager.instance) CardManager.instance = new CardManager();
return CardManager.instance;
}
_cardArray;//所有卡片的组
testletId;//组id
pageId;//页id
constructor() {
this._cardArray = [];//组 页
this.testletId = 0;
this.pageId = 0;
}
initCards(obj) {
console.log(obj);
let picArr = obj.contentObj.picArr;
this._cardArray = [];
let doubuleId = 0;
let cardId = 0;
for (let m = 0; m < picArr.length; m++) {
let testlet = [];
for (let n = 0; n < picArr[m].length; n++) {
let page = [];
for (let i = 0; i < picArr[m][n].length; i++) {
doubuleId++;
let pic = picArr[m][n][i];
let left = pic.left;
let right = pic.right;
cardId++;
let card1 = new Card(left, cardId, doubuleId);
cardId++;
let card2 = new Card(right, cardId, doubuleId);
if (card1.type == CardManager.TYPE_NULL || card2.type == CardManager.TYPE_NULL) {
doubuleId--;
continue;
}
page.push(card1, card2);
}
testlet.push(page);
}
this._cardArray.push(testlet);
}
}
getTestlet() {
return this._cardArray.length - 1;
}
getPage() {
if (this._cardArray[this.testletId] && this._cardArray[this.testletId][this.pageId]) {
return this._cardArray[this.testletId][this.pageId];
} else {
return null;
}
}
addPageNum() {
this.pageId++;
if (!this.getPage()) {
this.pageId = 0;
this.testletId++;
if (!this.getPage()) {
return 2;//游戏结束
}
return 1;//组结束
} else {
return 0;//页结束
}
}
resetPageNum() {
this.testletId = 0;
this.pageId = 0;
}
randomPageCards() {
//页面内部数字要打乱 0 1 2 3 4 5 6 7 8 每次动态取出一个值 然后动态处理
let radArray = [];
for (let m = 0; m < this._cardArray.length; m++) {
for (let n = 0; n < this._cardArray[m].length; n++) {
let arr = [];
while (this._cardArray[m][n].length > 0) {
let rand = Math.floor(Math.random() * this._cardArray[m][n].length);
arr.push(this._cardArray[m][n][rand]);
this._cardArray[m][n].splice(rand, 1);
}
this._cardArray[m][n] = arr;
}
}
}
}
export default CardManager;
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "11f21116-6718-42e0-bd5e-a369c8a95b33",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
function retData() {
// let item = {"contentObj":{"picArr":[[[{"cardId":"","left":{"title":"boy1","pic_url":"http://staging-teach.cdn.ireadabc.com/1baedb0b31dc5503e65e114ce21940ab.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"C"},"right":{"title":"food","pic_url":"http://staging-teach.cdn.ireadabc.com/38117778476574c7ef8b445cf24d6eb5.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"A"},"radioValue":"B"},{"cardId":"","left":{"title":"boy2","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"C"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/21373528a7f38575e871de1d8e5a9671.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"B"},"radioValue":"E"}],[{"cardId":"","left":{"title":"girl1","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5d099c38000b804241f7dc1286b17457.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"girl2","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/0abab9a26d537ebf1835a2ed8430162e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"girl3","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5f34d4100a6ecb187fd715c99e917fc8.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3","radioValue":"B"},"radioValue":"D"}]],[[{"cardId":"","left":{"title":"rabbit","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/fe229e6b32f385fb8fe5eb9ec5843c66.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"cat","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/9c5fa50efd7a004f24ea7fcbcf81080e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"B"},"radioValue":"A"},{"cardId":"","left":{"title":"coffe","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/3d0fea61d5d97f3caf04a9b738a0291b.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/9d114554c4760ff35f1ff5479504a531.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"tea","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/448291140d0b780c0278a14bf49277cb.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/bf26f92e4f0557ad70ac27006855dae9.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"B"},"radioValue":"D"}]],[[{"cardId":"","left":{"title":"cool","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/0e67aa701df18cbb5581ffb81ffa7836.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/38117778476574c7ef8b445cf24d6eb5.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/4c0379bc0f3bd0722874b2e11fb35336.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"big eye","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/fe226bc303f03ea994cb9a93d1620284.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/21373528a7f38575e871de1d8e5a9671.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/b985b71cd2f3c2d31e45992e4ae69d7f.mp3","radioValue":"B"},"radioValue":"A"},{"cardId":"","left":{"title":"cute","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/84c7b82de1a09da792237a174ebe071b.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5d099c38000b804241f7dc1286b17457.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/7c1d1540233b6d050eae8215679104a8.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"shuai","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/9e799e7e86cd50c6699ca0e859c8aa1f.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/338dbee896e1fa8869495c84c603c33f.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/9a6b3177ab53ba75bcf293df1065bb64.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"big m","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"C"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/0abab9a26d537ebf1835a2ed8430162e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"B"},"radioValue":"E"}]]]}}
let item = {"contentObj":{"picArr":[[[{"cardId":"","left":{"title":"11","pic_url":"","audio_url":"","radioValue":"A"},"right":{"title":"11-1","pic_url":"","audio_url":"","radioValue":"A"},"radioValue":"C"},{"cardId":"","left":{"title":"22","pic_url":"","audio_url":"","radioValue":"A"},"right":{"title":"22-1","pic_url":"","audio_url":"","radioValue":"A"},"radioValue":"C"}]]]}}
return item;
}
export const itemData = retData();
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "4e93bb38-2b8e-4524-a0cf-ee046467baf5",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
class HYLoader {
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();
});
}
});
}
}
}
export const hyLoader = new HYLoader();
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "2bc1b858-63dd-4bec-bb40-e6703d306bbc",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "24305734-8e44-4e40-b9cf-802b2ae89e08",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
class CalculativeResize {
static resizeInfo() {
//0.设计尺寸
let baseSize = cc.size(1920, 1080);
//1.获取屏幕尺寸
let canvasSize = cc.view.getCanvasSize();
//2.将屏幕宽高 以高度对齐的方式 换算出场景 宽度
let sumSize = cc.size(canvasSize.width * baseSize.height / canvasSize.height, baseSize.height)
//3.计算场景宽度与设计宽度比率
let scaleX = sumSize.width / baseSize.width;
let posX = sumSize.width - baseSize.width;
//高屏幕适配
if (scaleX <= 1) {
let sumSize = cc.size(baseSize.width, canvasSize.height * baseSize.width / canvasSize.width)
let scaleY = sumSize.height / baseSize.height;
let posY = sumSize.height - baseSize.height;
// let posY = sumSize.height * (1 - 1 / scaleX);
return { scaleX: 1, scaleY: scaleY, posX: 0, orgX: 0, posY: posY, orgY: - posY / 2 }
}
//需要拓展的宽度缩放比
return { scaleX: scaleX, scaleY: 1, posX: posX, orgX: - posX / 2, posY: 0, orgY: 0 };
}
}
//关于齐刘海的适配方案。
//1.需要获取对应的手机型号
//2.需要写上安全间距标记(主要是中间部分)
//3.不同的手机安全间距可能不同。(主要适配iPhone X)
cc.Class({
extends: cc.Component,
properties: {
r_width: 1,
r_height: 1,
r_top: 0,
r_bottom: 0,
p_left: 0,
p_right: 0,
p_top: 0,
p_bottom: 0,
black: 0,//用于不能直接缩放的图片(如引导),两边补齐黑边
noHead: 0,
debug: 0,
},
// LIFE-CYCLE CALLBACKS:
onLoad() {
let { scaleX, posX, scaleY, posY } = CalculativeResize.resizeInfo();
this.resizeScaleX = scaleX;
this.resizeScaleY = scaleY;
this.posX = posX;
this.posY = posY;
let { width, height, x, y } = this.node;
this.nodeWidth = width;
this.nodeHeight = height;
this.nodeX = x;
this.nodeY = y;
//增加一个resize的监听,当屏幕出现宽高比变化的时候,进行一次重新适配。
//主要用于刘海屏的重置,以及动态屏幕变化的控制(虚拟按键屏)。
},
start() {
this.resize();
},
update(dt) {
},
onDestroy() {
if (this.black1)
pg.view.removChildren(this.black1);
if (this.black2)
pg.view.removChildren(this.black2);
this.black1 = null;
this.black2 = null;
},
resize() {
if (!this.resizeScaleX && !this.nodeWidth) {
console.warn("手动调用此方法时,不能再onLoad中使用");
return;
}
this.resizeHeight();
this.resizeWidth();
},
//高屏幕适配
resizeHeight() {
if (this.resizeScaleY <= 1.05) return;
let scaleY = this.resizeScaleY;
let posY = this.posY;
let nodeWidth = this.nodeWidth;
let nodeHeight = this.nodeHeight;
let nodeX = this.nodeX;
let nodeY = this.nodeY;
if (this.debug == 1) {
console.log("断点调试点");
}
//宽度拉伸
if (this.r_width == 1) {
this.node.width = nodeWidth * scaleY;
}
//高度拉升
if (this.r_height == 1) {
this.node.height = nodeHeight * scaleY;
// //高度拉伸后,图片顶部齐边【坐标下移】 y坐标下移
// if (this.r_top == 1) {
// this.node.y = nodeY - nodeHeight * (scaleY - 1) / 2;
// }
// //高度拉伸后,图片底部齐边【坐标上移】 y坐标上移
// if (this.r_bottom == 1) {
// this.node.y = nodeY + nodeHeight * (scaleY - 1) / 2;
// }
}
// //如果是刘海屏,减去对应的刘海屏的宽度
// let lhpSize = { top: 0, bottom: 0 };
// //动态左移
// if (this.p_left == 1) {
// this.node.x = nodeX - posX / 2 + lhpSize.top;
// }
// //动态右移
// if (this.p_right == 1) {
// this.node.x = nodeX + posX / 2 - lhpSize.bottom;
// }
//动态上移
if (this.p_top == 1) {
this.node.y = nodeY + posY / 2 *0.75
}
//动态下移
if (this.p_bottom == 1) {
this.node.y = nodeY - posY / 2 *0.75
}
},
//长屏幕适配
resizeWidth() {
if (this.resizeScaleX <= 1.05) return;
let resizeScaleX = this.resizeScaleX;
let posX = this.posX;
let nodeWidth = this.nodeWidth;
let nodeHeight = this.nodeHeight;
let nodeX = this.nodeX;
let nodeY = this.nodeY;
if (this.debug == 1) {
console.log("断点调试点");
}
//宽度拉伸
if (this.r_width == 1) {
this.node.width = nodeWidth * resizeScaleX;
}
//高度拉升
if (this.r_height == 1) {
this.node.height = nodeHeight * resizeScaleX;
//高度拉伸后,图片顶部齐边【坐标下移】 y坐标下移
if (this.r_top == 1) {
this.node.y = nodeY - nodeHeight * (resizeScaleX - 1) / 2;
}
//高度拉伸后,图片底部齐边【坐标上移】 y坐标上移
if (this.r_bottom == 1) {
this.node.y = nodeY + nodeHeight * (resizeScaleX - 1) / 2;
}
}
if (this.black == 1) {
let baseSize = cc.size(1280, 720);
this.black1 = this.createBalck();
this.black2 = this.createBalck();
let curWidth = nodeWidth * resizeScaleX;
let curHeight = nodeHeight * resizeScaleX;
let blackWidth = (curWidth - baseSize.width) / 2;
let blackHeight = curHeight;
this.black1.width = blackWidth;
this.black1.height = blackHeight;
this.black2.width = blackWidth;
this.black2.height = blackHeight;
this.black1.x = - baseSize.width / 2 - this.black1.width / 2;
this.black2.x = baseSize.width / 2 + this.black1.width / 2;
this.black1.y = this.black2.y = nodeY;
pg.view.addChild(this.node, this.black1);
pg.view.addChild(this.node, this.black2);
this.black1.active = false;
this.black2.active = false;
if (this.node.nodeData && (this.node.nodeData.bg != "" && this.node.nodeData.bg != "rect")) {
this.black1.active = true;
this.black2.active = true;
}
}
//如果是刘海屏,减去对应的刘海屏的宽度
let lhpSize = { top: 0, bottom: 0 };
if (!this.noHead && posX != 0) lhpSize = { top: 44 * 1.5, bottom: 34 * 1.5 };
//动态左移
if (this.p_left == 1) {
this.node.x = nodeX - posX / 2 + lhpSize.top;
}
//动态右移
if (this.p_right == 1) {
this.node.x = nodeX + posX / 2 - lhpSize.bottom;
}
},
//屏幕适配--end
createBalck() {
let black = cc.instantiate(cc.find('Canvas/blackBg'));
return black;
},
setBlackActive(val) {
if (this.black1)
this.black1.active = val;
if (this.black2)
this.black2.active = val;
}
});
{
"ver": "1.0.8",
"uuid": "85b1fa7a-77a0-4811-8b62-826a7ca77c7e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
import { onHomeworkFinish } from "../script/util";
import { defaultData } from "../script/defaultData";
cc.Class({
extends: cc.Component,
properties: {
},
// 生命周期 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;
},
// 生命周期 start
start() {
let getData = this.getData.bind(this);
if (window && window.courseware) {
getData = window.courseware.getData;
}
getData((data) => {
console.log('data:', data);
this.data = data || this.getDefaultData();
this.data = JSON.parse(JSON.stringify(this.data))
this.preloadItem()
})
},
getData(func) {
if (window && window.courseware) {
window.courseware.getData(func, 'scene');
return;
}
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.getData(func);
return;
}
func(this.getDefaultData());
},
getDefaultData() {
return defaultData;
},
preloadItem() {
this.addPreloadImage();
this.addPreloadAudio();
this.addPreloadAnima();
this.preload();
},
addPreloadImage() {
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
},
addPreloadAudio() {
this._audioResList.push({ url: this.data.audio_url });
},
addPreloadAnima() {
},
preload() {
const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList);
cc.assetManager.loadAny(preloadArr, null, null, (err, data) => {
this.loadEnd();
if (window && window["air"]) {
window["air"].hideAirClassLoading();
}
cc.debug.setDisplayStats(false);
});
},
loadEnd() {
this.initData();
this.initAudio();
this.initView();
// this.initListener();
},
_cantouch: null,
initData() {
// 所有全局变量 默认都是null
this._cantouch = true;
},
audioBtn: null,
initAudio() {
const audioNode = cc.find('Canvas/res/audio');
const getAudioByResName = (resName) => {
return audioNode.getChildByName(resName).getComponent(cc.AudioSource);
}
this.audioBtn = getAudioByResName('btn');
},
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();
// 游戏结束时需要调用这个方法通知系统作业完成
onHomeworkFinish();
cc.audioEngine.play(this.audioBtn.clip, false, 0.8)
})
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();
cc.audioEngine.play(this.audioBtn.clip, false, 0.5)
})
},
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) {},
// ------------------------------------------------
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();
});
}
});
}
},
// ------------------------------------------
});
export function getPosByAngle(angle, len) {
const radian = angle * Math.PI / 180;
const x = Math.sin(radian) * len;
const y = Math.cos(radian) * len;
return { x, y };
}
export function getAngleByPos(px, py, mx, my) {
const x = Math.abs(px - mx);
const y = Math.abs(py - my);
const z = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
const cos = y / z;
const radina = Math.acos(cos); // 用反三角函数求弧度
let angle = Math.floor(180 / (Math.PI / radina) * 100) / 100; // 将弧度转换成角度
if (mx > px && my > py) {// 鼠标在第四象限
angle = 180 - angle;
}
if (mx === px && my > py) {// 鼠标在y轴负方向上
angle = 180;
}
if (mx > px && my === py) {// 鼠标在x轴正方向上
angle = 90;
}
if (mx < px && my > py) {// 鼠标在第三象限
angle = 180 + angle;
}
if (mx < px && my === py) {// 鼠标在x轴负方向
angle = 270;
}
if (mx < px && my < py) {// 鼠标在第二象限
angle = 360 - angle;
}
// console.log('angle: ', angle);
return angle;
}
export function exchangeNodePos(baseNode, targetNode) {
return baseNode.convertToNodeSpaceAR(targetNode._parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y)));
}
export function RandomInt(a, b = 0) {
let max = Math.max(a, b);
let min = Math.min(a, b);
return Math.floor(Math.random() * (max - min) + min);
}
export function randomSortByArr(arr) {
const newArr = [];
const tmpArr = arr.concat();
while (tmpArr.length > 0) {
const randomIndex = Math.floor(tmpArr.length * Math.random());
newArr.push(tmpArr[randomIndex]);
tmpArr.splice(randomIndex, 1);
}
return newArr;
}
export async function asyncTweenTo(node, duration, obj, ease = undefined) {
return new Promise((resolve, reject) => {
cc.tween(node)
.to(duration, obj, ease)
.call(() => {
resolve();
})
.start();
});
}
export async function asyncTweenBy(node, duration, obj, ease = undefined) {
return new Promise((resolve, reject) => {
cc.tween(node)
.by(duration, obj, ease)
.call(() => {
resolve();
})
.start();
});
}
export async function asyncPlayDragonBoneAnimation(node, animationName, time = 1, onFrameEvent) {
return new Promise((resolve, reject) => {
node.getComponent(dragonBones.ArmatureDisplay)
.once(dragonBones.EventObject.COMPLETE, () => {
resolve();
});
node.getComponent(dragonBones.ArmatureDisplay)
.on(dragonBones.EventObject.FRAME_EVENT, ({ name }) => {
if (onFrameEvent && typeof (onFrameEvent) == 'function') {
onFrameEvent(name);
}
});
node.getComponent(dragonBones.ArmatureDisplay)
.playAnimation(animationName, time);
});
}
export async function asyncPlayEffectByUrl(url, loop = false) {
return new Promise((resolve, reject) => {
cc.assetManager.loadRemote(url, (err, clip) => {
console.log(clip);
cc.audioEngine.playEffect(clip, loop);
resolve();
});
});
}
export async function jelly(node) {
return new Promise((resolve, reject) => {
cc.tween(node)
.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(resolve)
.start();
});
}
export async function asyncDelay(time) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve();
}, time * 1000);
})
}
export async function showFireworks(baseNode, nodeList, pos = cc.v2(0, 0), side = cc.v2(0, 100), range = 50, number = 100) {
new Array(number).fill(' ').forEach(async (_, i) => {
let rabbonNode = new cc.Node();
rabbonNode.parent = baseNode;
rabbonNode.x = pos.x;
rabbonNode.y = pos.y;
rabbonNode.angle = 60 * Math.random() - 30;
let node = cc.instantiate(nodeList[RandomInt(nodeList.length)]);
node.parent = rabbonNode;
node.active = true;
node.x = 0;
node.y = 0;
node.angle = 0;
const rate = Math.random();
const angle = Math.PI * (Math.random() * 2 - 1);
await asyncTweenBy(rabbonNode, 0.3, {
x: side.x * rate + Math.cos(angle) * range * rate,
y: side.y * rate + Math.sin(angle) * range * rate
}, {
easing: 'quadIn'
});
cc.tween(rabbonNode)
.by(8, { y: -2000 })
.start();
rabbonFall(rabbonNode);
await asyncDelay(Math.random());
cc.tween(node)
.by(0.15, { x: -10, angle: -10 })
.by(0.3, { x: 20, angle: 20 })
.by(0.15, { x: -10, angle: -10 })
.union()
.repeatForever()
.start();
cc.tween(rabbonNode)
.delay(5)
.to(0.3, { opacity: 0 })
.call(() => {
node.stopAllActions();
node.active = false;
node.parent = null;
node = null;
})
.start();
});
}
async function rabbonFall(node) {
const time = 1 + Math.random();
const offsetX = RandomInt(-200, 200) * time;
await asyncTweenBy(node, time, { x: offsetX, angle: offsetX * 60 / 200 });
rabbonFall(node);
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "c857edee-430c-4a82-84aa-6ab34daaad76",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "6900b8d9-61fb-4b3a-9693-7d0e2595691a",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.0.1",
"uuid": "3e36e8af-4f6a-4ec8-a56c-411bcee09d53",
"subMetas": {}
}
\ No newline at end of file
{"name":"right","imagePath":"right_tex.png","SubTexture":[{"name":"1/圆","x":1,"height":98,"y":1,"width":98},{"name":"1/星1","x":66,"height":59,"y":172,"width":57},{"name":"1/星2","x":71,"height":45,"y":101,"width":43},{"name":"1/星3","x":1,"height":64,"y":172,"width":63},{"name":"1/星4","x":183,"height":45,"y":172,"width":45},{"name":"1/星6","x":1,"height":69,"y":101,"width":68},{"name":"1/星7","x":116,"height":40,"y":101,"width":37},{"name":"1/星5","x":125,"height":57,"y":172,"width":56},{"name":"1/星8","x":183,"height":33,"y":219,"width":32},{"name":"1/星9","x":155,"height":37,"y":101,"width":36}],"height":256,"width":256}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "4d4d9b71-e7f8-4683-93df-f145ba327b12",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "83b08d7c-c82f-4dc7-b6ea-4f8f6dec8a0e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 256,
"height": 256,
"platformSettings": {},
"subMetas": {
"right_tex": {
"ver": "1.0.4",
"uuid": "aabe1819-f211-4c52-98e3-9baeb06e457c",
"rawTextureUuid": "83b08d7c-c82f-4dc7-b6ea-4f8f6dec8a0e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -13.5,
"offsetY": 1.5,
"trimX": 1,
"trimY": 1,
"width": 227,
"height": 251,
"rawWidth": 256,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "8a74de80-d2bd-438f-a9ee-1de6a165a134",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "e1b4d971-9876-4832-803a-5a321964a78b",
"uuid": "6ba0ab66-ad01-4b87-bb56-5966ab7f5744",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
......@@ -11,10 +11,10 @@
"height": 720,
"platformSettings": {},
"subMetas": {
"bg": {
"bg_bg": {
"ver": "1.0.4",
"uuid": "8288e3d4-4c75-4b27-8f01-f7014417f4dd",
"rawTextureUuid": "e1b4d971-9876-4832-803a-5a321964a78b",
"uuid": "d60de1cb-9c7d-4e45-8fa8-c10404cdfefd",
"rawTextureUuid": "6ba0ab66-ad01-4b87-bb56-5966ab7f5744",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......
{
"ver": "2.3.5",
"uuid": "ab54f59a-8911-4422-8eb9-14d7eba06b3d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 89,
"height": 42,
"platformSettings": {},
"subMetas": {
"bg_lowerright": {
"ver": "1.0.4",
"uuid": "0464b6d6-15d1-48b2-b668-f8aac578eac7",
"rawTextureUuid": "ab54f59a-8911-4422-8eb9-14d7eba06b3d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 89,
"height": 42,
"rawWidth": 89,
"rawHeight": 42,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5889a9cd-09b0-42b9-9540-82974635f420",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 217,
"height": 134,
"platformSettings": {},
"subMetas": {
"bg_upperleft": {
"ver": "1.0.4",
"uuid": "7a61878a-38ac-4c27-a1c0-6e5ae07274d9",
"rawTextureUuid": "5889a9cd-09b0-42b9-9540-82974635f420",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 217,
"height": 134,
"rawWidth": 217,
"rawHeight": 134,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "76439ee2-25b8-4feb-be8a-8e54d746066c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 106,
"height": 80,
"platformSettings": {},
"subMetas": {
"btn_laba": {
"ver": "1.0.4",
"uuid": "7d28afb4-1a18-45af-bb78-26f677922825",
"rawTextureUuid": "76439ee2-25b8-4feb-be8a-8e54d746066c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 106,
"height": 80,
"rawWidth": 106,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5743c786-68fe-4a92-955b-f73bb10ab0a0",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 106,
"height": 80,
"platformSettings": {},
"subMetas": {
"btn_laba1": {
"ver": "1.0.4",
"uuid": "ed28fe62-4b3c-432e-84c5-09492cc175e3",
"rawTextureUuid": "5743c786-68fe-4a92-955b-f73bb10ab0a0",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 18,
"offsetY": 0,
"trimX": 36,
"trimY": 0,
"width": 70,
"height": 80,
"rawWidth": 106,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "0c9dfc8c-3c04-4fc7-a2f6-9a44933a79b9",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 106,
"height": 80,
"platformSettings": {},
"subMetas": {
"btn_laba2": {
"ver": "1.0.4",
"uuid": "4a765d5e-6fac-4d01-8ef6-f093daee7c4c",
"rawTextureUuid": "0c9dfc8c-3c04-4fc7-a2f6-9a44933a79b9",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 4,
"offsetY": 0,
"trimX": 8,
"trimY": 0,
"width": 98,
"height": 80,
"rawWidth": 106,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "ca595bd6-9407-4e26-95e3-a61d5aff17d8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 106,
"height": 80,
"platformSettings": {},
"subMetas": {
"btn_laba3": {
"ver": "1.0.4",
"uuid": "faa52f66-df1a-4db6-86ae-904b7c0a410a",
"rawTextureUuid": "ca595bd6-9407-4e26-95e3-a61d5aff17d8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 106,
"height": 80,
"rawWidth": 106,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "68f8a196-dc35-4234-a7c4-4b05cc36c4ba",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 303,
"height": 132,
"platformSettings": {},
"subMetas": {
"btn_replay": {
"ver": "1.0.4",
"uuid": "164513e6-2391-4105-909a-77e01894c447",
"rawTextureUuid": "68f8a196-dc35-4234-a7c4-4b05cc36c4ba",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 303,
"height": 132,
"rawWidth": 303,
"rawHeight": 132,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "02aa5267-253a-448a-8553-ff3a8696cc4e",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "83f8721d-e058-4f0d-9e75-58325c8ffdd0",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "45e38f9a-3251-42c2-8bb7-1a61efdc95a6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 230,
"height": 252,
"platformSettings": {},
"subMetas": {
"bg_bian3": {
"ver": "1.0.4",
"uuid": "e16387eb-c1c2-4710-a0e3-ea42de412c20",
"rawTextureUuid": "45e38f9a-3251-42c2-8bb7-1a61efdc95a6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 230,
"height": 252,
"rawWidth": 230,
"rawHeight": 252,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "513b31d5-e9e1-45a2-ae65-882b4ea51db6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 366,
"height": 336,
"width": 230,
"height": 252,
"platformSettings": {},
"subMetas": {
"1orange": {
"bg_card3": {
"ver": "1.0.4",
"uuid": "43d1e79d-6de8-4dcb-b8ce-d767df7913aa",
"rawTextureUuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "35bcb871-b832-41ca-94af-3e5fa53e8125",
"rawTextureUuid": "513b31d5-e9e1-45a2-ae65-882b4ea51db6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 0,
"trimY": 1,
"width": 366,
"height": 335,
"rawWidth": 366,
"rawHeight": 336,
"trimX": 8,
"trimY": 8,
"width": 214,
"height": 237,
"rawWidth": 230,
"rawHeight": 252,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "1.1.2",
"uuid": "55c34a3e-e570-46b3-b120-085860352776",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "3867d163-aa66-476a-ade1-ec60cabcae1e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 314,
"height": 342,
"platformSettings": {},
"subMetas": {
"bg_bian2": {
"ver": "1.0.4",
"uuid": "53ec3cb5-71e9-4cb4-84e3-5d4591dfc410",
"rawTextureUuid": "3867d163-aa66-476a-ade1-ec60cabcae1e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 314,
"height": 342,
"rawWidth": 314,
"rawHeight": 342,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "f7ac7858-07a9-4e4c-ab18-6787b7755a03",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 314,
"height": 342,
"platformSettings": {},
"subMetas": {
"bg_card2": {
"ver": "1.0.4",
"uuid": "9b1913e0-0eb8-4bd4-8fbe-69c13d2cc14a",
"rawTextureUuid": "f7ac7858-07a9-4e4c-ab18-6787b7755a03",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 8,
"trimY": 8,
"width": 298,
"height": 327,
"rawWidth": 314,
"rawHeight": 342,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "f8f0e0fc-057c-46aa-abe3-8c38149b96b9",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "43b58cb0-33f8-4727-924d-fea8b302f313",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 282,
"height": 304,
"platformSettings": {},
"subMetas": {
"bg_bian1": {
"ver": "1.0.4",
"uuid": "3da1269a-d7d3-419b-b2ba-6f0e19f7578c",
"rawTextureUuid": "43b58cb0-33f8-4727-924d-fea8b302f313",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 282,
"height": 304,
"rawWidth": 282,
"rawHeight": 304,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "dc71f8ac-8d34-414a-9c10-25d8d5d656aa",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 282,
"height": 304,
"platformSettings": {},
"subMetas": {
"bg_card1": {
"ver": "1.0.4",
"uuid": "6c6c588d-4e73-4903-9e3f-543e5c89e618",
"rawTextureUuid": "dc71f8ac-8d34-414a-9c10-25d8d5d656aa",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -2.5,
"trimX": 8,
"trimY": 8,
"width": 266,
"height": 293,
"rawWidth": 282,
"rawHeight": 304,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "f8c6bce2-8db6-44ef-a78c-b77893f51923",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 278,
"height": 275,
"platformSettings": {},
"subMetas": {
"icon_bigstar": {
"ver": "1.0.4",
"uuid": "fe2e20a8-05ef-42a7-a284-80db3ccc0733",
"rawTextureUuid": "f8c6bce2-8db6-44ef-a78c-b77893f51923",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 278,
"height": 275,
"rawWidth": 278,
"rawHeight": 275,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "44825581-819a-4d73-8f81-9fa435f885ce",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 62,
"height": 69,
"platformSettings": {},
"subMetas": {
"icon_star": {
"ver": "1.0.4",
"uuid": "38ab7ad4-ce3f-44d7-bf5b-e31e4b5ba155",
"rawTextureUuid": "44825581-819a-4d73-8f81-9fa435f885ce",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 62,
"height": 69,
"rawWidth": 62,
"rawHeight": 69,
"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",
"uuid": "e992b78a-61ca-411f-b34e-b1e0d2a1ab5e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 61,
"height": 67,
"width": 62,
"height": 69,
"platformSettings": {},
"subMetas": {
"btn_right": {
"icon_stardi": {
"ver": "1.0.4",
"uuid": "e5a2dbaa-a677-4a32-90d7-a1b057d7fb59",
"rawTextureUuid": "d582359e-924e-4ee9-9964-1fc4bb417e71",
"uuid": "bcc1e8bd-c557-491a-87c4-c17370c2645a",
"rawTextureUuid": "e992b78a-61ca-411f-b34e-b1e0d2a1ab5e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"offsetX": 0,
"offsetY": 1.5,
"trimX": 0,
"trimY": 0,
"width": 60,
"width": 62,
"height": 66,
"rawWidth": 61,
"rawHeight": 67,
"rawWidth": 62,
"rawHeight": 69,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"__type__": "cc.AnimationClip",
"_name": "laba",
"_objFlags": 0,
"_native": "",
"_duration": 0.3333333333333333,
"sample": 60,
"speed": 0.35,
"wrapMode": 2,
"curveData": {
"paths": {
"btn_laba": {
"props": {
"active": [
{
"frame": 0,
"value": false
},
{
"frame": 0.08333333333333333,
"value": false
},
{
"frame": 0.16666666666666666,
"value": false
},
{
"frame": 0.25,
"value": true
}
]
}
},
"btn_laba3": {
"props": {
"active": [
{
"frame": 0,
"value": false
},
{
"frame": 0.08333333333333333,
"value": false
},
{
"frame": 0.16666666666666666,
"value": true
},
{
"frame": 0.25,
"value": false
}
]
}
},
"btn_laba2": {
"props": {
"active": [
{
"frame": 0,
"value": false
},
{
"frame": 0.08333333333333333,
"value": true
},
{
"frame": 0.16666666666666666,
"value": false
},
{
"frame": 0.25,
"value": false
}
]
}
},
"btn_laba1": {
"props": {
"active": [
{
"frame": 0,
"value": true
},
{
"frame": 0.08333333333333333,
"value": false
},
{
"frame": 0.16666666666666666,
"value": false
},
{
"frame": 0.25,
"value": false
},
{
"frame": 0.3333333333333333,
"value": true
}
]
}
}
}
},
"events": []
}
\ No newline at end of file
{
"ver": "2.1.0",
"uuid": "5aef0251-2a6e-4f11-ba21-953a769c01d0",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "6a0f0fdf-1b7e-487b-a027-7f34150e59c5",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "da518f72-e19c-4130-8b32-f80c8ec5ff69",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 29,
"height": 29,
"platformSettings": {},
"subMetas": {
"Img_paper": {
"ver": "1.0.4",
"uuid": "6bed546e-5efa-4af6-859d-90a8c0afc027",
"rawTextureUuid": "da518f72-e19c-4130-8b32-f80c8ec5ff69",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 29,
"height": 29,
"rawWidth": 29,
"rawHeight": 29,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "9a79969a-0506-48d4-bc98-3c05d109b027",
"uuid": "cfc6ffbd-32c5-4ed7-84b4-4a26c6f3529f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 61,
"height": 67,
"width": 36,
"height": 24,
"platformSettings": {},
"subMetas": {
"btn_left": {
"bg_sahua": {
"ver": "1.0.4",
"uuid": "ce19457d-e8f3-4c38-ae3e-d4b99208ddb5",
"rawTextureUuid": "9a79969a-0506-48d4-bc98-3c05d109b027",
"uuid": "e563d755-7640-4e80-9845-4e8e7e891845",
"rawTextureUuid": "cfc6ffbd-32c5-4ed7-84b4-4a26c6f3529f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 61,
"height": 67,
"rawWidth": 61,
"rawHeight": 67,
"width": 36,
"height": 24,
"rawWidth": 36,
"rawHeight": 24,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "0884ca03-555a-420e-8a4f-1d8165ae8067",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 278,
"height": 275,
"platformSettings": {},
"subMetas": {
"icon_bigstar": {
"ver": "1.0.4",
"uuid": "a7582b91-c35c-484d-af61-26dba567aaa5",
"rawTextureUuid": "0884ca03-555a-420e-8a4f-1d8165ae8067",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 278,
"height": 275,
"rawWidth": 278,
"rawHeight": 275,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "94828d7d-0bf7-42d5-ac21-bd7333ffb305",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 62,
"height": 69,
"platformSettings": {},
"subMetas": {
"icon_star": {
"ver": "1.0.4",
"uuid": "ceeeffbc-5d56-4ffb-a0db-587ececa68ae",
"rawTextureUuid": "94828d7d-0bf7-42d5-ac21-bd7333ffb305",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 62,
"height": 69,
"rawWidth": 62,
"rawHeight": 69,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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