Commit a0572f9f authored by Tt's avatar Tt

表单处理完成

parent 9f5f5457
{
"ver": "2.0.1",
"uuid": "f0680ae0-c079-45ef-abd7-9e63d90b982b",
"uuid": "ed69b5af-07d8-4a24-b3eb-57bf1c7b7cc6",
"downloadMode": 0,
"duration": 0.130612,
"duration": 1.764,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "9aea96dc-0ed1-4a3b-aee1-a981674e1e53",
"downloadMode": 0,
"duration": 0.168,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "18e16f8e-7ef2-438f-ac07-0a68ea7b2fc9",
"downloadMode": 0,
"duration": 4.892,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "665e544c-fe92-4f24-bdcc-9475a763ff0c",
"downloadMode": 0,
"duration": 0.556563,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "c38a5b68-3f3b-415e-89ee-e6afb6fedbdf",
"downloadMode": 0,
"duration": 2.52,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "ab03c99c-c830-45fa-a537-eaf8f1295c4d",
"downloadMode": 0,
"duration": 4.146667,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "0eebd891-d79b-4b0f-87c8-613f7780d841",
"downloadMode": 0,
"duration": 0.972,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "342d6b41-d606-43d5-9676-7b67f03d236f",
"downloadMode": 0,
"duration": 0.938688,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "16a0bc5d-fd4e-443e-aeb0-80139b29574d",
"downloadMode": 0,
"duration": 3.787755,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "e187dccb-ea0a-45de-be95-53c50683cd19",
"downloadMode": 0,
"duration": 1.708286,
"subMetas": {}
}
\ No newline at end of file
{"name":"guid","version":"5.5","frameRate":24,"armature":[{"name":"Armature","animation":[{"name":"guid","ffd":[],"frame":[],"duration":28,"slot":[{"name":"bg_recordmove1","colorFrame":[{"tweenEasing":0,"color":{"aM":54},"duration":8},{"tweenEasing":0,"color":{"aM":54},"duration":20},{"color":{"aM":0},"duration":0}],"displayFrame":[]},{"name":"bg_recordmove","colorFrame":[{"tweenEasing":0,"duration":20},{"color":{"aM":0},"duration":8}],"displayFrame":[]}],"bone":[{"name":"root","scaleFrame":[],"translateFrame":[],"rotateFrame":[]},{"name":"bone","scaleFrame":[{"duration":20,"tweenEasing":0},{"x":1.5,"duration":8,"y":1.5}],"translateFrame":[],"rotateFrame":[]},{"name":"bone1","scaleFrame":[{"x":0.7,"duration":8,"tweenEasing":0,"y":0.7},{"x":0.7,"duration":20,"tweenEasing":0,"y":0.7},{"x":1.5,"duration":0,"y":1.5}],"translateFrame":[],"rotateFrame":[]}],"ik":[],"playTimes":0}],"bone":[{"name":"root","transform":{}},{"name":"bone","transform":{},"parent":"root"},{"name":"bone1","transform":{},"parent":"root"}],"defaultActions":[{"gotoAndPlay":"guid"}],"skin":[{"name":"","slot":[{"name":"bg_recordmove1","display":[{"name":"bg_recordmove","transform":{},"type":"image","path":"bg_recordmove"}]},{"name":"bg_recordmove","display":[{"name":"bg_recordmove","transform":{},"type":"image","path":"bg_recordmove"}]}]}],"frameRate":24,"slot":[{"name":"bg_recordmove","color":{},"parent":"bone"},{"name":"bg_recordmove1","color":{},"z":1,"parent":"bone1"}],"type":"Armature","ik":[],"aabb":{"x":-145.5,"height":234,"y":-117,"width":291}}],"isGlobal":0}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "798dc639-44aa-43f5-8633-c41b650f52f3",
"subMetas": {}
}
\ No newline at end of file
{"name":"guid","SubTexture":[{"name":"bg_recordmove","x":1,"height":234,"y":1,"width":291}],"imagePath":"guid_tex.png","height":256,"width":512}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "b1e23e77-8349-4843-9061-3a4bd057cb93",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "b9bdbc54-4550-4d06-9e4f-49a009235a00",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 512,
"height": 256,
"platformSettings": {},
"subMetas": {
"guid_tex": {
"ver": "1.0.4",
"uuid": "d30dd787-4e2d-41a7-8258-38040017f35c",
"rawTextureUuid": "b9bdbc54-4550-4d06-9e4f-49a009235a00",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -109.5,
"offsetY": 10,
"trimX": 1,
"trimY": 1,
"width": 291,
"height": 234,
"rawWidth": 512,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "c551970e-b095-45f3-9f1d-25cde8b8deb1",
"uuid": "f792997f-f029-4df1-9adb-5e28c3e1a1c4",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "5d8c6a7f-89af-4150-a1e1-c687492e05c3",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "04c2b808-1c8a-499b-9152-128a1abe340a",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "f0adf7cd-b2db-4a5a-87fe-4d818a6a6b89",
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.2.9",
"uuid": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3",
"ver": "1.2.8",
"uuid": "e9759136-33bc-45ff-be96-695974b7f179",
"asyncLoadAssets": false,
"autoReleaseAssets": true,
"subMetas": {}
......
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "f8b451ff-857c-4ca8-9870-866bc5154a29",
"uuid": "079b14c1-2b16-435a-8a77-6fecc373403a",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
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();
})
}
static flipX0(item) {
return new Promise((resolve) => {
let itemScale = item.scaleY;
item.scaleX = itemScale;
let tween = cc.tween(item);
tween.to(0.2, { scaleX: 0 })
.call(() => { resolve() });
tween.start();
})
}
static flipX1(item) {
return new Promise((resolve) => {
let itemScale = item.scaleY;
item.scaleX = 0;
let tween = cc.tween(item);
tween.to(0.2, { scaleX: itemScale })
.call(() => { resolve() });
tween.start();
})
}
}
export default Ani;
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "408a67f8-65fa-4cf1-8cf2-83e20e1a0fd5",
"uuid": "b15f80f1-6507-44eb-af5b-07bfb945bf0c",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
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":
[
{
"title": "apple",
"bgImg": "http://staging-teach.cdn.ireadabc.com/38a22cb51e444e2ef4fad6dede56bc6e.png",
"wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3",
"imgAni": {
"ske": {
"url": "http://staging-teach.cdn.ireadabc.com/c81816bbb714b22c57267ac5150ee1fe.json",
"name": "apple_ske.json"
},
"tex": {
"url": "http://staging-teach.cdn.ireadabc.com/6088eec0273bc0488d5f66dfb63c1003.json",
"name": "apple_tex.json"
},
"png": {
"url": "http://staging-teach.cdn.ireadabc.com/a51151d68bd74d430e2e586d86c6ddd3.png",
"name": "apple_tex.png"
}
}
}, { "title": "ant", "bgImg": "http://staging-teach.cdn.ireadabc.com/38a22cb51e444e2ef4fad6dede56bc6e.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/dd4ede22a761f1f8ec261c93a5306f5c.json", "name": "ant_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/56078bcdcc7116843a56ecc4c23d3665.json", "name": "ant_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/1a0c95cab05487b003a8dec9dd151ba4.png", "name": "ant_tex.png" } } }]
}
}
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
class GameManager {
static TYPE_NULL = 0;
static TYPE_TXT = 1;
static TYPE_IMG = 2;
static TYPE_MP3 = 3;
static instance;
static getIns() {
if (!GameManager.instance) GameManager.instance = new GameManager();
return GameManager.instance;
}//允许调用
constructor() {
this._list = [];
this._stage = 0;//关卡
this._state = 0;//状态
this._cat = {};
this._tryagain = {};
}
init() {
console.log(`init`);
}
parseData(data) {
this._list = [];
this._stage = 0;//关卡
this._state = 0;//状态
this._cat = {};
this._tryagain = {};
console.log(data);
this._cat = data.contentObj.picArr.cat;
this._tryagain = data.contentObj.picArr.tryagain;
let arr = data.contentObj.picArr.list;
for (let i = 0; i < arr.length; i++) {
let ar = arr[i];
let obj = {};
obj.word = ar.titleObj;
obj.sound = ar.wordAudio;
obj.orderAudio = ar.orderAudio;
obj.img = ar.bgImg;
obj.cartoonSke = ar.imgAni.ske.url;
obj.cartoonTex = ar.imgAni.tex.url;
obj.cartoonPng = ar.imgAni.png.url;
this._list.push(obj);
}
console.log(this._list);//原始数据转为数组
}
get cat() {
return this._cat;
}
get tryagain() {
return this._tryagain;
}
setState(num) {
this._state = num;
}
getState() {
return this._state;
}
getStageData() {
return this._list[this._stage];
}
addStage() {
this._stage++;
return this._stage >= this._list.length;
}
}
export default GameManager;
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "2f000cc9-5e11-497b-b268-3dced7dde2a9",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
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
// Learn cc.Class:
// - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import pg from "./pg";
cc.Class({
extends: cc.Component,
properties: {
// foo: {
// // ATTRIBUTES:
// default: null, // The default value will be used only when the component attaching
// // to a node for the first time
// type: cc.SpriteFrame, // optional, default is typeof default
// serializable: true, // optional, default is true
// },
// bar: {
// get () {
// return this._bar;
// },
// set (value) {
// this._bar = value;
// }
// },
},
// LIFE-CYCLE CALLBACKS:
onLoad() {
this.p0 = pg.view.find(this, "p0");
this.p1 = pg.view.find(this, "p1");
this.p2 = pg.view.find(this, "p2");
this.count = 0;
},
start() {
},
update(dt) {
if (!this.p0) return;
this.count++;
let m = Math.floor(this.count / 20) % 4;
this[`p0`].scaleX = m == 1 ? 1.3 : 1.0;
this[`p0`].scaleY = m == 1 ? 1.3 : 1.0;
this[`p1`].scaleX = m == 2 ? 1.3 : 1.0;
this[`p1`].scaleY = m == 2 ? 1.3 : 1.0;
this[`p2`].scaleX = m == 3 ? 1.3 : 1.0;
this[`p2`].scaleY = m == 3 ? 1.3 : 1.0;
},
});
{
"ver": "1.0.8",
"uuid": "bea9617c-f6be-43d4-8fcf-2472770a4244",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import pg from "./pg";
cc.Class({
extends: cc.Component,
properties: {
costtime: 4,
// foo: {
// // ATTRIBUTES:
// default: null, // The default value will be used only when the component attaching
// // to a node for the first time
// type: cc.SpriteFrame, // optional, default is typeof default
// serializable: true, // optional, default is true
// },
// bar: {
// get () {
// return this._bar;
// },
// set (value) {
// this._bar = value;
// }
// },
},
// LIFE-CYCLE CALLBACKS:
// onLoad () {},
start() {
let progressBar = pg.view.findComponent(this, cc.ProgressBar);
progressBar.progress = 0;
this._interval = setInterval(() => {
if (!this.node.active) {
progressBar.progress = 0;
return;
}
this.updateTime();
}, 30);//30ms 执行一次
},
updateTime() {
let progressBar = pg.view.findComponent(this, cc.ProgressBar);
progressBar.progress = progressBar.progress + (1 / (1000 / 30) / this.costtime);
},
update(dt) {
//1 60 2000 1
},
// 生命周期
onDestroy() {
clearInterval(this._interval);
},
});
{
"ver": "1.0.8",
"uuid": "45e8ddf3-fcf2-4728-8f88-66f7e27c22cc",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
class CalculativeResize {
static resizeInfo() {
//0.设计尺寸
let baseSize = cc.size(1280, 720);
//1.获取屏幕尺寸
let canvasSize = cc.view.getCanvasSize();
//2.将屏幕宽高 以高度对齐的方式 换算出场景 宽度
let sumSizeW = cc.size(canvasSize.width * baseSize.height / canvasSize.height, baseSize.height)
//3.计算场景宽度与设计宽度比率
let scaleX = sumSizeW.width / baseSize.width;
//高屏幕适配
if (scaleX <= 1) {
let sumSizeY = cc.size(baseSize.width, canvasSize.height * (baseSize.width / canvasSize.width))
let scaleY = sumSizeY.height / baseSize.height;
let posY = sumSizeY.height - baseSize.height;
return {
scaleX: 1,
posX: 0,
moveX: 0,
scaleY: scaleY,
posY: posY,
moveY: - posY / 2
}
} else {
let posX = sumSizeW.width - baseSize.width;
//需要拓展的宽度缩放比
return {
scaleX: scaleX,
posX: posX,
moveX: - posX / 2,
scaleY: 1,
posY: 0,
moveY: 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
}
//动态下移
if (this.p_bottom == 1) {
this.node.y = nodeY - posY / 2
}
},
//长屏幕适配
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
export const defaultData = {
"contentObj": {
"picArr": {
"cat": {
"start": "http://staging-teach.cdn.ireadabc.com/c3db5ac421ef039cf540edfa5116c831.mp3",
"record": "http://staging-teach.cdn.ireadabc.com/2db9fa7c28a11fdbcecfa6a5b5e62319.mp3",
"wait": "http://staging-teach.cdn.ireadabc.com/aaeb274c49f400c26b05583d481aca09.mp3",
"finish": "http://staging-teach.cdn.ireadabc.com/f1ce89b2162d82214369265e47d3dda3.mp3"
},
"tryagain": {
"one": "http://staging-teach.cdn.ireadabc.com/bdc09d9eb89b73e67357b502ae2158dd.mp3",
"two": "http://staging-teach.cdn.ireadabc.com/aaeb274c49f400c26b05583d481aca09.mp3",
"three": "http://staging-teach.cdn.ireadabc.com/301ec5c708d22928ccf2162215f429fe.mp3"
},
"list": [
{
"titleObj": [
{
"card": "a",
"color": 0,
"order": 0
},
{
"card": "p",
"color": 1,
"order": 1
},
{
"card": "p",
"color": 1,
"order": 1
},
{
"card": "l",
"color": 1,
"order": 2
},
{
"card": "e",
"color": 1,
"order": 3
}
],
"orderAudio": [
"http://staging-teach.cdn.ireadabc.com/a8ed9422993b0865fe0625fcb3253070.mp3",
"http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610.mp3",
"http://staging-teach.cdn.ireadabc.com/65c62cd89703cce9cec9c68b41b92f5d.mp3",
"http://staging-teach.cdn.ireadabc.com/aa8d4f0add5c41218fb7c94097641b8b.mp3",
],
"bgImg": "http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png",
"wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3",
"imgAni": {
"ske": {
"url": "http://staging-teach.cdn.ireadabc.com/c81816bbb714b22c57267ac5150ee1fe.json",
"name": "apple_ske.json"
},
"tex": {
"url": "http://staging-teach.cdn.ireadabc.com/6088eec0273bc0488d5f66dfb63c1003.json",
"name": "apple_tex.json"
},
"png": {
"url": "http://staging-teach.cdn.ireadabc.com/a51151d68bd74d430e2e586d86c6ddd3.png",
"name": "apple_tex.png"
}
}
},
{
"titleObj": [
{
"card": "a",
"color": 0,
"order": 0
},
{
"card": "n",
"color": 0,
"order": 0
},
{
"card": "t",
"color": 1,
"order": 3
}
],
"orderAudio": [
"http://staging-teach.cdn.ireadabc.com/a8ed9422993b0865fe0625fcb3253070.mp3",
"http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610.mp3",
"http://staging-teach.cdn.ireadabc.com/65c62cd89703cce9cec9c68b41b92f5d.mp3",
"http://staging-teach.cdn.ireadabc.com/aa8d4f0add5c41218fb7c94097641b8b.mp3",
],
"bgImg": "http://staging-teach.cdn.ireadabc.com/0600790c4336c3839d90756aca5da45e.png",
"wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3",
"imgAni": {
"ske": {
"url": "http://staging-teach.cdn.ireadabc.com/dd4ede22a761f1f8ec261c93a5306f5c.json",
"name": "ant_ske.json"
},
"tex": {
"url": "http://staging-teach.cdn.ireadabc.com/56078bcdcc7116843a56ecc4c23d3665.json",
"name": "ant_tex.json"
},
"png": {
"url": "http://staging-teach.cdn.ireadabc.com/1a0c95cab05487b003a8dec9dd151ba4.png",
"name": "ant_tex.png"
}
}
},
{
"titleObj": [
{
"card": "a",
"color": 0
},
{
"card": "l",
"color": 0
},
{
"card": "l",
"color": 1
},
{
"card": "a",
"color": 1
},
{
"card": "i",
"color": 1
},
{
"card": "g",
"color": 1
},
{
"card": "n",
"color": 1
}
],
"bgImg": "http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png",
"wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3",
"imgAni": {
"ske": {
"url": "http://staging-teach.cdn.ireadabc.com/cf0fd816076652f64cc992c084248a80.json",
"name": "alligator_ske.json"
},
"tex": {
"url": "http://staging-teach.cdn.ireadabc.com/5ece588b347d8fbe05eba19a40c985f0.json",
"name": "alligator_tex.json"
},
"png": {
"url": "http://staging-teach.cdn.ireadabc.com/a84eff5545eca41f3e997ea8a53ac66f.png",
"name": "alligator_tex.png"
}
}
}
]
}
}
}
\ No newline at end of file
......@@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/
cc.sys.capabilities["touches"] = true;
!(function (global) {
"use strict";
......
......@@ -71,64 +71,64 @@ export function setSprNodeMaxLen(sprNode, maxW, maxH) {
}
export function localPosTolocalPos(baseNode, targetNode) {
const worldPos = targetNode.parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y));
const localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
return localPos;
const worldPos = targetNode.parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y));
const localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
return localPos;
}
export function worldPosToLocalPos(worldPos, baseNode) {
const localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
return localPos;
const localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
return localPos;
}
export function getScaleRateBy2Node(baseNode, targetNode, maxFlag = true) {
const worldRect1 = targetNode.getBoundingBoxToWorld();
const worldRect2 = baseNode.getBoundingBoxToWorld();
const sx = worldRect1.width / worldRect2.width;
const sy = worldRect1.height / worldRect2.height;
if (maxFlag) {
return Math.max(sx, sy);
} else {
return Math.min(sx, sy);
}
const worldRect1 = targetNode.getBoundingBoxToWorld();
const worldRect2 = baseNode.getBoundingBoxToWorld();
const sx = worldRect1.width / worldRect2.width;
const sy = worldRect1.height / worldRect2.height;
if (maxFlag) {
return Math.max(sx, sy);
} else {
return Math.min(sx, sy);
}
}
export function getDistance (start, end){
var pos = cc.v2(start.x - end.x, start.y - end.y);
var dis = Math.sqrt(pos.x*pos.x + pos.y*pos.y);
return dis;
export function getDistance(start, end) {
var pos = cc.v2(start.x - end.x, start.y - end.y);
var dis = Math.sqrt(pos.x * pos.x + pos.y * pos.y);
return dis;
}
export function playAudioByUrl(audio_url, cb=null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
export function 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 btnClickAnima(btn, time=0.15, rate=1.05) {
export function btnClickAnima(btn, time = 0.15, rate = 1.05) {
btn.tmpScale = btn.scale;
btn.on(cc.Node.EventType.TOUCH_START, () => {
cc.tween(btn)
.to(time / 2, {scale: btn.scale * rate})
.to(time / 2, { scale: btn.scale * rate })
.start()
})
btn.on(cc.Node.EventType.TOUCH_CANCEL, () => {
cc.tween(btn)
.to(time / 2, {scale: btn.tmpScale})
.to(time / 2, { scale: btn.tmpScale })
.start()
})
btn.on(cc.Node.EventType.TOUCH_END, () => {
cc.tween(btn)
.to(time / 2, {scale: btn.tmpScale})
.to(time / 2, { scale: btn.tmpScale })
.start()
})
}
......@@ -165,7 +165,7 @@ export function getSprNodeByUrl(url, cb) {
export function playAudio(audioClip, cb = null) {
if (audioClip) {
const audioId = cc.audioEngine.playEffect(audioClip, false);
const audioId = cc.audioEngine.playEffect(audioClip, false, 0.8);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
......@@ -174,88 +174,15 @@ export function playAudio(audioClip, cb = null) {
}
}
export async function asyncDelay(time) {
export async function asyncDelay(time, func) {
return new Promise((resolve, reject) => {
try {
cc.tween(cc.find('Canvas'))
.delay(time)
.call(()=>{
resolve(null);
})
.start();
} catch (e) {
reject(e);
}
const id = setTimeout(() => {
resolve();
}, time * 1000);
func && func(id);
})
}
export async function asyncLoadDragonBoneAnime(node, { skeJsonData: { url: skeJsonDataUrl }, texJsonData: { url: texJsonDataUrl }, texPngData: { url: texPngDataUrl } }) {
if (!texPngDataUrl || !texJsonDataUrl || !texPngDataUrl
|| texPngDataUrl == '' || texJsonDataUrl == '' || texPngDataUrl == '') {
return;
}
return new Promise((resolve, reject) => {
if (node.animaNode) {
node.animaNode.removeFromParent();
}
const animaNode = new cc.Node();
animaNode.name = 'animaNode';
animaNode.parent = node;
animaNode.active = true;
node.animaNode = animaNode;
const dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
const loadTexture = new Promise((resolve, reject) => {
cc.assetManager.loadRemote(texPngDataUrl, (error, texture) => {
if (error) {
reject(error);
}
resolve(texture);
});
});
const loadTexJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadAny({ url: texJsonDataUrl }, (error, atlasJson) => {
if (error) {
reject(error);
}
resolve(atlasJson);
});
});
const loadSkeJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadAny({ url: skeJsonDataUrl }, (error, dragonBonesJson) => {
if (error) {
reject(error);
}
resolve(dragonBonesJson);
});
});
Promise.all([loadTexture, loadTexJsonData, loadSkeJsonData]).then(([texture, atlasJson, dragonBonesJson]) => {
const atlas = new dragonBones.DragonBonesAtlasAsset();
atlas.atlasJson = JSON.stringify(atlasJson);
atlas.texture = texture;
const asset = new dragonBones.DragonBonesAsset();
asset.dragonBonesJson = JSON.stringify(dragonBonesJson);
dragonDisplay.dragonAtlasAsset = atlas;
dragonDisplay.dragonAsset = asset;
let armatureNames = dragonBonesJson.armature.map(data => data.name);
if (armatureNames.length > 0) {
dragonDisplay.armatureName = armatureNames[0];
}
resolve(animaNode);
});
});
}
export class FireworkSettings {
baseNode; // 父节点
nodeList; // 火花节点的array
......@@ -366,7 +293,7 @@ export async function asyncTweenTo(node, duration, obj, ease = undefined) {
cc.tween(node)
.to(duration, obj, ease)
.call(() => {
resolve(null);
resolve();
})
.start();
} catch (e) {
......@@ -381,7 +308,7 @@ export async function asyncTweenBy(node, duration, obj, ease = undefined) {
cc.tween(node)
.by(duration, obj, ease)
.call(() => {
resolve(null);
resolve();
})
.start();
} catch (e) {
......@@ -411,56 +338,14 @@ export function showTrebleFirework(baseNode, rabbonList) {
showFireworks(right);
}
export function httpHeadCall(requsetUrl: string, callback) {
let xhr = new XMLHttpRequest();
console.log("Status: Send Post Request to " + requsetUrl);
try {
xhr.onreadystatechange = () => {
try {
console.log('xhr.readyState: ', xhr.readyState);
if (xhr.readyState == 4) {
if ((xhr.status >= 200 && xhr.status < 400)) {
callback(true);
} else {
callback(false);
}
}
} catch (e) {
console.log(e)
}
};
xhr.open("HEAD", requsetUrl, true);
xhr.send();
xhr.timeout = 15000;
xhr.onerror = (e) => {
callback(false);
};
xhr.ontimeout = (e) => {
callback(false);
};
} catch (e) {
console.log("Send Get Request error: ", e);
}
}
export function onHomeworkFinish(data = "", callback = ()=>{}) {
export function onHomeworkFinish() {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.onHomeworkFinish(callback, data);
} else {
console.log('onHomeworkFinish', JSON.stringify(data));
}
}
export function callMiddleLayerFunction(apiName: string, data: any, callback: Function) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.callMiddleLayerFunction(apiName, data, callback);
if (middleLayerComponent.role == 'student') {
middleLayerComponent.onHomeworkFinish(() => { });
}
} else {
console.log('callMiddleLayerFunction: ' + apiName);
console.log('onHomeworkFinish');
}
}
}
\ No newline at end of file
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, func) {
return new Promise((resolve, reject) => {
const id = setTimeout(() => {
resolve();
}, time * 1000);
func && func(id);
})
}
export async function showFireworks(baseNode, nodeList, pos = cc.v2(0, 0), side = cc.v2(0, 100), range = 50, number = 100, func) {
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(), func);
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
{
"ver": "1.1.2",
"uuid": "29562f5c-d8d5-4628-b7eb-9a2f1038a8ae",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{"name":"alligator","version":"5.5","armature":[{"name":"Armature","slot":[{"name":"alligator","color":{},"parent":"alligator"},{"name":"egg1","color":{},"z":1,"parent":"egg1"}],"bone":[{"name":"root","transform":{}},{"name":"egg1","transform":{"x":-419.25,"skY":-90,"y":220.45,"skX":-90},"length":275,"parent":"root"},{"name":"alligator","transform":{"x":432.45,"skY":-89.372,"y":-96.5,"skX":-89.372},"length":159,"parent":"root"},{"name":"bone","transform":{"x":806.2358,"skY":115.6133,"y":-475.5656,"skX":115.6133},"length":3,"parent":"alligator"}],"frameRate":24,"aabb":{"x":-731,"height":755,"y":-428,"width":1559},"canvas":{"x":0,"height":1600,"y":0,"width":2176},"animation":[{"name":"newAnimation","frame":[],"bone":[{"name":"root","rotateFrame":[],"translateFrame":[],"scaleFrame":[]},{"name":"egg1","rotateFrame":[{"duration":5,"tweenEasing":0},{"duration":5,"rotate":-5.9102,"tweenEasing":0},{"duration":5,"tweenEasing":0},{"duration":5,"rotate":3.9844,"tweenEasing":0},{"duration":5,"tweenEasing":0},{"duration":5,"rotate":3.9844,"tweenEasing":0},{"duration":10}],"translateFrame":[],"scaleFrame":[{"tweenEasing":0,"duration":5},{"tweenEasing":0,"x":0.97,"duration":5},{"tweenEasing":0,"duration":5},{"tweenEasing":0,"x":0.97,"duration":5},{"tweenEasing":0,"duration":5},{"tweenEasing":0,"x":0.97,"duration":5},{"duration":10}]},{"name":"alligator","rotateFrame":[],"translateFrame":[{"tweenEasing":0,"x":-784.8246,"y":-11.4035,"duration":26},{"tweenEasing":0,"x":-784.8246,"y":-11.4035,"duration":14},{"x":18.6842,"y":-12.2807,"duration":0}],"scaleFrame":[{"tweenEasing":0,"x":0.3,"y":0.3,"duration":26},{"tweenEasing":0,"x":0.3,"y":0.3,"duration":14},{"duration":0}]},{"name":"bone","rotateFrame":[],"translateFrame":[],"scaleFrame":[]}],"playTimes":0,"ffd":[],"slot":[{"name":"egg1","displayFrame":[{"duration":5},{"duration":5,"value":1},{"duration":5,"value":2},{"duration":5,"value":3},{"duration":5,"value":4},{"duration":5,"value":6},{"duration":10,"value":5}],"colorFrame":[]},{"name":"alligator","displayFrame":[],"colorFrame":[]}],"ik":[],"duration":40}],"skin":[{"name":"","slot":[{"name":"alligator","display":[{"name":"alligator/alligator","transform":{"x":-19.0738,"skY":89.372,"y":-52.2441,"skX":89.372},"type":"image","path":"alligator/alligator"}]},{"name":"egg1","display":[{"name":"alligator/egg1","transform":{"x":270.95,"skY":90,"y":-14.75,"skX":90},"type":"image","path":"alligator/egg1"},{"name":"alligator/egg2","transform":{"x":270.95,"skY":90,"y":-14.75,"skX":90},"type":"image","path":"alligator/egg2"},{"name":"alligator/egg3","transform":{"x":270.95,"skY":90,"y":-14.75,"skX":90},"type":"image","path":"alligator/egg3"},{"name":"alligator/egg4","transform":{"x":270.95,"skY":90,"y":-14.75,"skX":90},"type":"image","path":"alligator/egg4"},{"name":"alligator/egg5","transform":{"x":270.95,"skY":90,"y":-14.75,"skX":90},"type":"image","path":"alligator/egg5"},{"name":"alligator/egg6","transform":{"x":270.95,"skY":90,"y":-14.75,"skX":90},"type":"image","path":"alligator/egg6"},{"name":"alligator/egg6_0","transform":{"x":270.95,"skY":90,"y":-14.75,"skX":90},"type":"image","path":"alligator/egg6_0"}]}]}],"defaultActions":[{"gotoAndPlay":"newAnimation"}],"ik":[],"type":"Armature"}],"frameRate":24,"isGlobal":0}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "15504af4-d637-42ff-a1bc-e6f12ecc637a",
"subMetas": {}
}
\ No newline at end of file
{"name":"alligator","imagePath":"alligator_tex.png","SubTexture":[{"name":"alligator/alligator","x":1,"height":488,"y":2272,"width":896},{"name":"alligator/egg1","x":1193,"height":755,"y":1,"width":594},{"name":"alligator/egg5","x":1,"height":755,"y":1515,"width":594},{"name":"alligator/egg3","x":1,"height":755,"y":758,"width":594},{"name":"alligator/egg6","x":1193,"height":755,"y":758,"width":594},{"name":"alligator/egg4","x":1,"height":755,"y":1,"width":594},{"name":"alligator/egg6_0","x":597,"height":755,"y":758,"width":594},{"name":"alligator/egg2","x":597,"height":755,"y":1,"width":594}],"height":4096,"width":2048}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "b4a89414-6bd9-4fe5-8d94-da2011ede24c",
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "2.3.5",
"uuid": "b736853d-8d7d-4ae0-9f95-e925c080daf2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 2048,
"height": 4096,
"platformSettings": {},
"subMetas": {
"alligator_tex": {
"ver": "1.0.4",
"uuid": "af7146c6-3d69-4849-9e99-264d043c6ee3",
"rawTextureUuid": "b736853d-8d7d-4ae0-9f95-e925c080daf2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -130,
"offsetY": 667.5,
"trimX": 1,
"trimY": 1,
"width": 1786,
"height": 2759,
"rawWidth": 2048,
"rawHeight": 4096,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "aee44df0-1ced-4216-ac8a-b5ff1cb75f5b",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{"name":"ant","version":"5.5","armature":[{"name":"Armature","slot":[{"name":"1","color":{},"displayIndex":1,"parent":"root"},{"name":"ant/apple4","color":{},"z":1,"parent":"apple1"},{"name":"ant/apple3","color":{},"z":2,"parent":"apple1"},{"name":"ant/apple2","color":{},"z":3,"parent":"apple1"},{"name":"apple1","color":{},"z":4,"parent":"apple1"},{"name":"ant","color":{},"z":5,"parent":"ant"}],"bone":[{"name":"root","transform":{}},{"name":"ant","transform":{"x":450.5,"skY":-90,"y":-128,"skX":-90},"length":126,"parent":"root"},{"name":"apple1","transform":{"x":-434.6,"skY":-90,"y":-59.2,"skX":-90},"length":110,"parent":"root"}],"frameRate":24,"aabb":{"x":-662,"height":552,"y":-414.00000000000006,"width":1472},"canvas":{"x":0,"height":1600,"y":0,"width":2176},"animation":[{"name":"newAnimation","frame":[],"bone":[{"name":"root","rotateFrame":[],"translateFrame":[],"scaleFrame":[]},{"name":"ant","rotateFrame":[{"duration":10,"rotate":-38.3686,"tweenEasing":0},{"duration":10,"rotate":-56.5741,"tweenEasing":0},{"duration":10,"rotate":-69.0413,"tweenEasing":0},{"duration":10,"rotate":-81.1856,"tweenEasing":0},{"duration":8}],"translateFrame":[{"tweenEasing":0,"x":-713.6523,"y":-51.7589,"duration":10},{"tweenEasing":0,"x":-737.1135,"y":8.7348,"duration":10},{"tweenEasing":0,"x":-737.1135,"y":57.4618,"duration":10},{"tweenEasing":0,"x":-718.3445,"y":96.9487,"duration":10},{"x":-63.2368,"y":9.6732,"duration":8}],"scaleFrame":[{"tweenEasing":0,"x":0.13,"y":0.13,"duration":30},{"tweenEasing":0,"x":0.13,"y":0.13,"duration":10},{"tweenEasing":0,"duration":4},{"tweenEasing":0,"x":0.96,"duration":4},{"duration":0}]},{"name":"apple1","rotateFrame":[{"duration":8,"tweenEasing":0},{"duration":8,"rotate":2.031,"tweenEasing":0},{"duration":8,"tweenEasing":0},{"duration":24,"rotate":2.031}],"translateFrame":[],"scaleFrame":[{"tweenEasing":0,"duration":8},{"tweenEasing":0,"x":0.98,"duration":8},{"tweenEasing":0,"duration":8},{"x":0.98,"duration":24}]}],"playTimes":0,"ffd":[],"slot":[{"name":"apple1","displayFrame":[],"colorFrame":[{"duration":8,"tweenEasing":0},{"duration":40,"color":{"aM":0}}]},{"name":"1","displayFrame":[{"duration":4},{"duration":4,"value":1},{"duration":4},{"duration":4,"value":1},{"duration":4},{"duration":4,"value":1},{"duration":4},{"duration":20,"value":1}],"colorFrame":[]},{"name":"ant","displayFrame":[],"colorFrame":[]},{"name":"ant/apple2","displayFrame":[],"colorFrame":[{"duration":8},{"duration":8,"tweenEasing":0},{"duration":32,"color":{"aM":0}}]},{"name":"ant/apple3","displayFrame":[],"colorFrame":[{"duration":16},{"duration":8,"tweenEasing":0},{"duration":24,"color":{"aM":0}}]},{"name":"ant/apple4","displayFrame":[],"colorFrame":[]}],"ik":[],"duration":48}],"skin":[{"name":"","slot":[{"name":"1","display":[{"name":"ant/1","transform":{"x":-197,"y":-188},"type":"image","path":"ant/1"},{"name":"ant/2","transform":{"x":-202.5,"y":-158.5},"type":"image","path":"ant/2"}]},{"name":"ant","display":[{"name":"ant/ant","transform":{"x":10,"skY":90,"y":-43,"skX":90},"type":"image","path":"ant/ant"}]},{"name":"ant/apple4","display":[{"name":"ant/apple4","transform":{"x":40.8,"skY":90,"y":-4.9,"skX":90},"type":"image","path":"ant/apple4"}]},{"name":"ant/apple3","display":[{"name":"ant/apple3","transform":{"x":40.8,"skY":90,"y":-4.9,"skX":90},"type":"image","path":"ant/apple3"}]},{"name":"ant/apple2","display":[{"name":"ant/apple2","transform":{"x":40.8,"skY":90,"y":-4.9,"skX":90},"type":"image","path":"ant/apple2"}]},{"name":"apple1","display":[{"name":"ant/apple1","transform":{"x":40.8,"skY":90,"y":-4.9,"skX":90},"type":"image","path":"ant/apple1"}]}]}],"defaultActions":[{"gotoAndPlay":"newAnimation"}],"ik":[],"type":"Armature"}],"frameRate":24,"isGlobal":0}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "430f14b7-59ac-4f6d-a79d-838296c9713c",
"subMetas": {}
}
\ No newline at end of file
{"name":"ant","imagePath":"ant_tex.png","SubTexture":[{"name":"ant/1","x":885,"height":80,"y":1,"width":74},{"name":"ant/2","x":808,"height":155,"y":1,"width":75},{"name":"ant/apple4","x":448,"height":430,"y":987,"width":445},{"name":"ant/apple3","x":1,"height":430,"y":987,"width":445},{"name":"ant/apple2","x":448,"height":430,"y":555,"width":445},{"name":"ant/apple1","x":1,"height":430,"y":555,"width":445},{"name":"ant/ant","x":1,"height":552,"y":1,"width":805}],"height":2048,"width":1024}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "b49c0c6a-b9af-4989-946a-24d24ea4759f",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2cfd8b17-0d23-4e0b-93bf-731bfd0aea9f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 2048,
"platformSettings": {},
"subMetas": {
"ant_tex": {
"ver": "1.0.4",
"uuid": "f413a87e-539b-496a-823a-b5f5aceaa9c6",
"rawTextureUuid": "2cfd8b17-0d23-4e0b-93bf-731bfd0aea9f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -32,
"offsetY": 315,
"trimX": 1,
"trimY": 1,
"width": 958,
"height": 1416,
"rawWidth": 1024,
"rawHeight": 2048,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "15e5bf20-3417-4166-849e-c41799aaceb0",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{"name":"apple","version":"5.5","armature":[{"name":"Armature","slot":[{"name":"grass","color":{},"parent":"root"},{"name":"trunk","color":{},"z":1,"parent":"trunk1"},{"name":"leaf","color":{},"z":2,"parent":"leaf"},{"name":"apple","color":{},"z":3,"parent":"apple"},{"name":"apple_拷贝_3","color":{},"z":4,"parent":"apple_拷贝_3"},{"name":"apple_拷贝_4","color":{},"z":5,"parent":"apple_拷贝_4"},{"name":"apple-right","color":{},"z":6,"parent":"apple-right"}],"bone":[{"name":"root","transform":{}},{"name":"trunk","transform":{"x":-380.15,"skY":-89.212,"y":279.55,"skX":-89.212},"length":123,"parent":"root"},{"name":"trunk1","transform":{"x":234.9542,"skY":-9.0231,"y":-11.841,"skX":-9.0231},"length":208,"parent":"trunk"},{"name":"apple_拷贝_3","transform":{"x":354.4537,"skY":6.7757,"y":-157.0405,"skX":6.7757},"parent":"trunk1"},{"name":"apple-right","transform":{"x":304.8128,"skY":8.2351,"y":71.4344,"skX":8.2351},"length":144,"parent":"trunk1"},{"name":"leaf","transform":{"x":277.4203,"skY":6.7757,"y":-17.4854,"skX":6.7757},"length":233,"parent":"trunk1"},{"name":"apple_拷贝_4","transform":{"x":551.5805,"skY":6.7757,"y":-168.1698,"skX":6.7757},"parent":"trunk1"},{"name":"apple","transform":{"x":460.6752,"skY":6.7757,"y":120.991,"skX":6.7757},"parent":"trunk1"}],"frameRate":24,"aabb":{"x":-841.0000000000007,"height":1000.0000000000008,"y":-625.0000000000008,"width":773},"canvas":{"x":0,"height":1600,"y":0,"width":2176},"animation":[{"name":"apple","frame":[],"bone":[{"name":"root","rotateFrame":[],"translateFrame":[],"scaleFrame":[]},{"name":"apple-right","rotateFrame":[{"duration":16},{"duration":8,"rotate":-21.4686,"tweenEasing":0},{"duration":8,"rotate":2.135,"curve":[0.5,0,1,1]},{"duration":10,"rotate":27.0497,"tweenEasing":0},{"duration":8,"rotate":-2.1746}],"translateFrame":[{"tweenEasing":0,"x":-2.7035,"y":44.3605,"duration":14},{"tweenEasing":0,"x":-2.7035,"y":44.3605,"duration":2},{"tweenEasing":0,"x":-2.7035,"y":44.3605,"duration":8},{"curve":[0.6506550218340612,0.0036290322580645167,1,1],"x":-24.1274,"y":62.0149,"duration":8},{"tweenEasing":0,"x":-431.6818,"y":131.9618,"duration":10},{"x":-201.1672,"y":703.3942,"duration":8}],"scaleFrame":[{"tweenEasing":0,"x":0.28,"y":0.28,"duration":14},{"tweenEasing":0,"x":0.28,"y":0.28,"duration":18},{"tweenEasing":0,"x":0.28,"y":0.28,"duration":10},{"tweenEasing":0,"duration":4},{"tweenEasing":0,"x":0.89,"duration":4},{"duration":0}]},{"name":"trunk","rotateFrame":[{"duration":8,"curve":[0,0,0.5,1]},{"duration":8,"rotate":-3.6523,"curve":[0.5,0,1,1]},{"duration":6,"rotate":4.9399,"curve":[0,0,0.5,1]},{"duration":6,"rotate":0.2875,"tweenEasing":0},{"duration":4,"rotate":4.9399,"curve":[0,0,0.5,1]},{"duration":4,"rotate":-4.1735,"tweenEasing":0},{"duration":4,"rotate":-1.4239,"tweenEasing":0},{"duration":10,"rotate":-1.5202}],"translateFrame":[],"scaleFrame":[]},{"name":"trunk1","rotateFrame":[{"duration":8,"tweenEasing":0},{"duration":8,"rotate":-4.2973,"tweenEasing":0},{"duration":6,"rotate":13.4533,"curve":[0,0,0.5,1]},{"duration":6,"rotate":7.8667,"tweenEasing":0},{"duration":4,"rotate":13.4533,"curve":[0,0,0.5,1]},{"duration":4,"rotate":5.1101,"tweenEasing":0},{"duration":4,"rotate":7.8651,"tweenEasing":0},{"duration":10,"rotate":4.021}],"translateFrame":[],"scaleFrame":[]},{"name":"leaf","rotateFrame":[],"translateFrame":[],"scaleFrame":[{"tweenEasing":0,"duration":8},{"tweenEasing":0,"x":1.1,"duration":6},{"duration":36}]},{"name":"apple","rotateFrame":[{"duration":8,"curve":[0,0,0.5,1]},{"duration":6,"rotate":16.4327,"tweenEasing":0},{"duration":2,"tweenEasing":0},{"duration":6,"rotate":11.8408,"tweenEasing":0},{"duration":6,"tweenEasing":0},{"duration":22,"rotate":11.8408}],"translateFrame":[],"scaleFrame":[]},{"name":"apple_拷贝_4","rotateFrame":[{"duration":8,"curve":[0,0,0.5,1]},{"duration":6,"rotate":14.1412,"tweenEasing":0},{"duration":2,"curve":[0,0,0.5,1]},{"duration":6,"rotate":6.0539,"tweenEasing":0},{"duration":6,"curve":[0,0,0.5,1]},{"duration":22,"rotate":6.0539}],"translateFrame":[],"scaleFrame":[]},{"name":"apple_拷贝_3","rotateFrame":[{"duration":8,"curve":[0,0,0.5,1]},{"duration":6,"rotate":11.295,"tweenEasing":0},{"duration":2,"curve":[0,0,0.5,1]},{"duration":6,"rotate":10.3318,"tweenEasing":0},{"duration":6,"curve":[0,0,0.5,1]},{"duration":22,"rotate":10.3318}],"translateFrame":[],"scaleFrame":[]}],"playTimes":0,"ffd":[],"slot":[{"name":"grass","displayFrame":[],"colorFrame":[]},{"name":"trunk","displayFrame":[],"colorFrame":[]},{"name":"leaf","displayFrame":[],"colorFrame":[]},{"name":"apple","displayFrame":[],"colorFrame":[]},{"name":"apple_拷贝_3","displayFrame":[],"colorFrame":[]},{"name":"apple_拷贝_4","displayFrame":[],"colorFrame":[]},{"name":"apple-right","displayFrame":[],"colorFrame":[]}],"ik":[],"duration":50}],"skin":[{"name":"","slot":[{"name":"apple-right","display":[{"name":"apple/apple-right","transform":{"x":36.95,"skY":90,"y":-4.9,"skX":90},"type":"image","path":"apple/apple-right"}]},{"name":"trunk","display":[{"bonePose":[1,0.013752744539744436,-0.9999054265367423,0.9999054265367423,0.013752744539744436,-380.15,279.55,2,-0.14323494834957837,-0.9896887134707022,0.9896887134707022,-0.14323494834957837,-388.7586206896555,44.455172413793015],"userEdges":[],"slotPose":[1,-6.661338147750939e-16,6.661338147750939e-16,1,-397.5000000000001,72.99999999999994],"weights":[1,2,1,2,1,0.28383161233905957,2,0.7161683876609405,2,1,0.6224004474861904,2,0.37759955251380967,2,1,0.9009136778129336,2,0.09908632218706628,1,1,1,1,1,1,2,1,0.83576885015101,2,0.16423114984899007,2,1,0.5333009755569753,2,0.46669902444302475,2,1,0.17971475711662627,2,0.8202852428833737,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,2,1,0.004049944466725675,2,0.9959500555332743,1,2,1,1,2,1],"transform":{"x":-26.9984,"skY":98.2351,"y":-12.7399,"skX":98.2351},"type":"mesh","width":207,"name":"apple/trunk","uvs":[1,0.18929,0.95435,0.43739,0.87923,0.66197,0.84589,0.88834,0.80845,1.00011,0.3587,1.00011,0.32126,0.80305,0.28382,0.64023,0.20048,0.4229,0.08792,0.23992,-0.00024,0.09506,-0.00024,0,0.27971,0,0.46691,0.1458,0.55459,0.34317,0.74179,0,1,0],"height":476,"vertices":[103.5,-147.9,94.05,-29.8,78.5,77.1,71.6,184.85,63.85,238.05,-29.25,238.05,-37,144.25,-44.75,66.75,-62,-36.7,-85.3,-123.8,-103.55,-192.75,-103.55,-238,-45.6,-238,-6.85,-168.6,11.3,-74.65,50.05,-238,103.5,-238],"path":"apple/trunk","triangles":[7,2,1,14,7,1,14,1,0,15,0,16,6,3,2,8,7,14,7,6,2,5,4,3,6,5,3,13,9,14,9,8,14,12,10,13,10,9,13,11,10,12,0,14,15],"edges":[0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,0]}]},{"name":"grass","display":[{"name":"apple/grass","transform":{"x":-417.5,"y":286},"type":"image","path":"apple/grass"}]},{"name":"leaf","display":[{"name":"apple/leaf","transform":{"x":143.0752,"skY":91.4594,"y":-5.0578,"skX":91.4594},"type":"image","path":"apple/leaf"}]},{"name":"apple","display":[{"name":"apple/apple","transform":{"x":10.7857,"skY":91.4594,"y":-3.2264,"skX":91.4594},"type":"image","path":"apple/apple"}]},{"name":"apple_拷贝_3","display":[{"name":"apple/apple_拷贝_3","transform":{"x":17.5564,"skY":91.4594,"y":3.8984,"skX":91.4594},"type":"image","path":"apple/apple_拷贝_3"}]},{"name":"apple_拷贝_4","display":[{"name":"apple/apple_拷贝_4","transform":{"x":11.154,"skY":91.4594,"y":-0.0159,"skX":91.4594},"type":"image","path":"apple/apple_拷贝_4"}]}]}],"defaultActions":[{"gotoAndPlay":"apple"}],"ik":[],"type":"Armature"}],"frameRate":24,"isGlobal":0}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "0c3549c9-9951-47a1-9c7d-c1eeb12ceff2",
"subMetas": {}
}
\ No newline at end of file
{"name":"apple","imagePath":"apple_tex.png","SubTexture":[{"name":"apple/grass","x":1,"height":178,"y":1049,"width":515},{"name":"apple/trunk","x":776,"height":476,"y":1,"width":207},{"name":"apple/leaf","x":1,"height":509,"y":1,"width":773},{"name":"apple/apple","x":557,"height":137,"y":512,"width":141},{"name":"apple/apple_拷贝_3","x":700,"height":137,"y":618,"width":141},{"name":"apple/apple_拷贝_4","x":776,"height":137,"y":479,"width":141},{"name":"apple/apple-right","x":1,"height":535,"y":512,"width":554}],"height":2048,"width":1024}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "bd58c477-0554-44be-8fde-701542d0ce66",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "61ca985d-fe63-4927-a454-25038ce57ab7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 2048,
"platformSettings": {},
"subMetas": {
"apple_tex": {
"ver": "1.0.4",
"uuid": "21969a63-04a1-4e41-a8b8-cf09c609d3a1",
"rawTextureUuid": "61ca985d-fe63-4927-a454-25038ce57ab7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -20,
"offsetY": 410,
"trimX": 1,
"trimY": 1,
"width": 982,
"height": 1226,
"rawWidth": 1024,
"rawHeight": 2048,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "8541f4ce-82c3-4f46-baed-233893b50b0a",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{"name":"ax","version":"5.5","armature":[{"name":"Armature","slot":[{"name":"wood","color":{},"parent":"root"},{"name":"ax","color":{},"z":1,"parent":"ax"},{"name":"痕迹","color":{},"z":2,"parent":"root"}],"bone":[{"name":"root","transform":{}},{"name":"ax","transform":{"x":349.5,"skY":-170.2833,"y":-118.6,"skX":-170.2833},"length":340,"parent":"root"}],"frameRate":24,"aabb":{"x":-807,"height":705,"y":-315,"width":1188},"canvas":{"x":0,"height":1600,"y":0,"width":2176},"animation":[{"name":"newAnimation","frame":[],"bone":[{"name":"root","rotateFrame":[],"translateFrame":[],"scaleFrame":[]},{"name":"ax","rotateFrame":[{"duration":12,"curve":[0.5,0,1,1]},{"duration":2,"rotate":20.8703,"curve":[0,0,0.3253275109170305,1.0036290322580645]},{"duration":6,"rotate":20.8703,"curve":[0,0,0.3253275109170305,1.0036290322580645]},{"duration":3,"rotate":6.957,"tweenEasing":0},{"duration":9,"rotate":6.957,"curve":[0.5,0,1,1]},{"duration":4,"rotate":44.2233,"tweenEasing":0},{"duration":12,"rotate":44.2233,"curve":[0.6746724890829694,-0.0012096774193548392,1,1]},{"duration":0}],"translateFrame":[],"scaleFrame":[]}],"playTimes":0,"ffd":[],"slot":[{"name":"wood","displayFrame":[],"colorFrame":[]},{"name":"ax","displayFrame":[],"colorFrame":[]},{"name":"痕迹","displayFrame":[{"duration":48,"value":-1},{"duration":0}],"colorFrame":[]}],"ik":[],"duration":48}],"skin":[{"name":"","slot":[{"name":"ax","display":[{"name":"ax/ax","transform":{"x":394.4474,"skY":170.2833,"y":-21.9889,"skX":170.2833},"type":"image","path":"ax/ax"}]},{"name":"痕迹","display":[{"name":"ax/痕迹","transform":{"x":-367.5,"y":-31},"type":"image","path":"ax/痕迹"}]},{"name":"wood","display":[{"name":"ax/wood","transform":{"x":-381.5,"y":114},"type":"image","path":"ax/wood"}]}]}],"defaultActions":[{"gotoAndPlay":"newAnimation"}],"ik":[],"type":"Armature"}],"frameRate":24,"isGlobal":0}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "3dea3437-c958-4db1-8892-577532882929",
"subMetas": {}
}
\ No newline at end of file
{"name":"ax","imagePath":"ax_tex.png","SubTexture":[{"name":"ax/wood","x":1,"height":552,"y":1,"width":851},{"name":"ax/ax","x":1,"height":303,"y":555,"width":848},{"name":"ax/痕迹","x":1,"height":82,"y":860,"width":191}],"height":1024,"width":1024}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment