Commit e759e5d8 authored by 邱旭's avatar 邱旭

换了点皮

parent 1afe1a37
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
resource/playScene/lineLight.png

39 KB | W: | H:

resource/playScene/lineLight.png

35.3 KB | W: | H:

resource/playScene/lineLight.png
resource/playScene/lineLight.png
resource/playScene/lineLight.png
resource/playScene/lineLight.png
  • 2-up
  • Swipe
  • Onion skin
{ {
"groups": [ "groups": [
{
"keys": "18986110-634a-4248-a956-b2861424ff16.png,24131c00-9062-43a1-b52d-00d788f75b79.png,2d6cba7b-b5f7-42ef-81e9-bb15a5e6266b.png,2e5f1f43-9af3-4b9b-a8fc-db17964eecb6.png,52e8af6a-f83c-4c95-9f44-d5bb1c20493b.png,5d6129c5-6206-47d5-bb42-b9274ad37e9d.png,6e5ccdc9-ce62-4e1b-88ca-0e269f492ec1.png,778a9647-034e-4fad-8a79-d9226ae2ed5d.png,796267bf-092e-44c9-999b-574d305c8769.png,7d410e98-3af4-4bb8-98ac-acf1a8bd48fa.png,93ea4980-6258-4413-bbd7-3260e1117bb6.png,b9f72eac-22ea-4505-b043-24c8a83acd05.png",
"name": "BonusTime"
},
{ {
"keys": "failedBtn.png,failedTxt.png", "keys": "failedBtn.png,failedTxt.png",
"name": "FailedPanel" "name": "FailedPanel"
...@@ -48,10 +52,6 @@ ...@@ -48,10 +52,6 @@
"keys": "useStepCancel.png,useStepOk.png", "keys": "useStepCancel.png,useStepOk.png",
"name": "UseStep" "name": "UseStep"
}, },
{
"keys": "0d5e3eff-7726-4e3a-a2d4-409a9e68c2ec.png,16eb7a4a-34a0-45f3-8c02-154b638b1049.png,2c17dca6-ec35-4184-ae72-25813cf8f5dc.png,79040d0c-04ba-4c98-a512-5707d7ed37f5.png,93bcd69f-9897-4b12-8bf0-c0659817ccd2.png,e8c749fe-2a3b-4941-8527-37ba70a66e34.png,fdcf57c3-b91e-44d2-a011-7a0bbf4e5bb4.png",
"name": "bonus_lottie"
},
{ {
"keys": "boomBtn.png,comCloseBtn.png,comm_light.png,e305be55-fdfd-453b-9e6d-41edfe68c0f1.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,panelBgS.png,powerIcon.png,powerImg.png,stepBtn.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,target0.png,target1.png,target2.png,target3.png,target4.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,确定.png,继续闯关大.png,继续闯关小.png", "keys": "boomBtn.png,comCloseBtn.png,comm_light.png,e305be55-fdfd-453b-9e6d-41edfe68c0f1.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,panelBgS.png,powerIcon.png,powerImg.png,stepBtn.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,target0.png,target1.png,target2.png,target3.png,target4.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common" "name": "common"
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
"name": "fiveVerHorDis" "name": "fiveVerHorDis"
}, },
{ {
"keys": "loadingBg.jpg,loadingPro.png", "keys": "loadingBg.jpg,loadingLight0.png,loadingLight1.png,loadingLight10.png,loadingLight11.png,loadingLight12.png,loadingLight13.png,loadingLight14.png,loadingLight15.png,loadingLight16.png,loadingLight17.png,loadingLight18.png,loadingLight19.png,loadingLight2.png,loadingLight20.png,loadingLight21.png,loadingLight22.png,loadingLight23.png,loadingLight24.png,loadingLight25.png,loadingLight26.png,loadingLight27.png,loadingLight28.png,loadingLight29.png,loadingLight3.png,loadingLight4.png,loadingLight5.png,loadingLight6.png,loadingLight7.png,loadingLight8.png,loadingLight9.png,loadingPro.png",
"name": "loadingScene" "name": "loadingScene"
}, },
{ {
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
"name": "playScene" "name": "playScene"
}, },
{ {
"keys": "bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom21.png,boom22.png,boom23.png,boom24.png,boom25.png,boom26.png,boom27.png,boom28.png,boom29.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar20.png,bubbleStar21.png,bubbleStar22.png,bubbleStar23.png,bubbleStar24.png,bubbleStar25.png,bubbleStar26.png,bubbleStar27.png,bubbleStar28.png,bubbleStar29.png,bubbleStar3.png,bubbleStar30.png,bubbleStar31.png,bubbleStar32.png,bubbleStar33.png,bubbleStar34.png,bubbleStar35.png,bubbleStar36.png,bubbleStar37.png,bubbleStar38.png,bubbleStar39.png,bubbleStar4.png,bubbleStar40.png,bubbleStar41.png,bubbleStar42.png,bubbleStar43.png,bubbleStar44.png,bubbleStar45.png,bubbleStar46.png,bubbleStar47.png,bubbleStar48.png,bubbleStar49.png,bubbleStar5.png,bubbleStar50.png,bubbleStar51.png,bubbleStar52.png,bubbleStar53.png,bubbleStar54.png,bubbleStar55.png,bubbleStar56.png,bubbleStar57.png,bubbleStar58.png,bubbleStar59.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,exLighting0.png,exLighting1.png,exLighting10.png,exLighting11.png,exLighting12.png,exLighting13.png,exLighting14.png,exLighting15.png,exLighting2.png,exLighting3.png,exLighting4.png,exLighting5.png,exLighting6.png,exLighting7.png,exLighting8.png,exLighting9.png,stepAni1.png,stepAni10.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png", "keys": "bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom21.png,boom22.png,boom23.png,boom24.png,boom25.png,boom26.png,boom27.png,boom28.png,boom29.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar20.png,bubbleStar21.png,bubbleStar22.png,bubbleStar23.png,bubbleStar24.png,bubbleStar25.png,bubbleStar26.png,bubbleStar27.png,bubbleStar28.png,bubbleStar29.png,bubbleStar3.png,bubbleStar30.png,bubbleStar31.png,bubbleStar32.png,bubbleStar33.png,bubbleStar34.png,bubbleStar35.png,bubbleStar36.png,bubbleStar37.png,bubbleStar38.png,bubbleStar39.png,bubbleStar4.png,bubbleStar40.png,bubbleStar41.png,bubbleStar42.png,bubbleStar43.png,bubbleStar44.png,bubbleStar45.png,bubbleStar46.png,bubbleStar47.png,bubbleStar48.png,bubbleStar49.png,bubbleStar5.png,bubbleStar50.png,bubbleStar51.png,bubbleStar52.png,bubbleStar53.png,bubbleStar54.png,bubbleStar55.png,bubbleStar56.png,bubbleStar57.png,bubbleStar58.png,bubbleStar59.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting2.png,exLighting4.png,exLighting6.png,exLighting8.png,stepAni1.png,stepAni10.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png",
"name": "playSceneEffect" "name": "playSceneEffect"
}, },
{ {
......
...@@ -3,13 +3,22 @@ var iconv = require('iconv-lite'); ...@@ -3,13 +3,22 @@ var iconv = require('iconv-lite');
var path = require('path'); var path = require('path');
//用于处理带base64图片的lottie文件,取出图片,同名lottie文件夹,写入代码"./src/lotties/"中; //用于处理带base64图片的lottie文件,取出图片,同名lottie文件夹,写入代码"./src/lotties/"中;
var pathName = "./lotties" //别再执行,会覆盖
// return
var hashBase64 = {};
var pathName = "./lotties";
var outPath = "./resource"
//读文件夹 //读文件夹
var files = fs.readdirSync(pathName); var files = fs.readdirSync(pathName);
//对每个json文件作处理 //对每个json文件作处理
files.forEach(function (lottiesFileName) { files.forEach(function (lottiesFileName) {
// console.log(lottiesFileName)
//后缀不是json的,不处理 //后缀不是json的,不处理
if (path.extname(lottiesFileName).indexOf(".json") < 0) return; if (path.extname(lottiesFileName).indexOf(".json") < 0) return;
//用文件名作为类名和资源文件夹名
const cusName = lottiesFileName.substring(0, lottiesFileName.lastIndexOf(".json"));
//读数据 //读数据
var data = iconv.decode(fs.readFileSync(pathName + "/" + lottiesFileName), "utf-8");//GBK var data = iconv.decode(fs.readFileSync(pathName + "/" + lottiesFileName), "utf-8");//GBK
//反序列化 //反序列化
...@@ -19,37 +28,61 @@ files.forEach(function (lottiesFileName) { ...@@ -19,37 +28,61 @@ files.forEach(function (lottiesFileName) {
if (!assets || !assets.length) return; if (!assets || !assets.length) return;
//删除属性 //删除属性
delete data.assets; delete data.assets;
var imgOutPath = pathName + "/" + data.nm var imgOutPath = outPath + "/" + cusName//data.nm
//建文件夹data.nm //建文件夹data.nm
if (!fs.existsSync(imgOutPath)) fs.mkdirSync(imgOutPath); if (!fs.existsSync(imgOutPath)) fs.mkdirSync(imgOutPath);
assets.forEach((e) => { assets.forEach((e) => {
//没有base64数据 //没有base64数据
if (!e.p) return if (!e.p) return
let id = e.id; let id = e.id;
let uuid = guid(); // let uuid = guid();
//存图片 // //存图片
var base64 = e.p.replace(/^data:image\/\w+;base64,/, "");//去掉图片base64码前面部分data:image/png;base64 var base64 = e.p.replace(/^data:image\/\w+;base64,/, "");//去掉图片base64码前面部分data:image/png;base64
var dataBuffer = new Buffer(base64, 'base64'); //把base64码转成buffer对象, var dataBuffer = /*new Buffer*/Buffer.from(base64, 'base64'); //把base64码转成buffer对象,
fs.writeFile(imgOutPath + "/" + uuid + ".png", dataBuffer, ()=>0);
//修改用到id的所有refId //用用到该图片的图层的名字当作图片名,必须是.png结尾,为了图片去重
data.layers.forEach((l) => { l.refId === id && (l.refId = uuid) }) var name = data.layers.find((l) => { return l.refId === id })
//没找到图层,不存
if (!name) return;
//如果缓存过了,refId,统一把refId当作必有图片
if (hashBase64[base64]) {
name = hashBase64[base64];
} else {
//取图层名字,如果没有。png,用uuid
// if (name.nm.indexOf(".png") == -1) {
name = guid();
// } else {
// //取名字
// name = name.nm.replace(".png", "");
// }
hashBase64[base64] = name
}
//修改所有的refId
data.layers.forEach((l) => { l.refId === id && (l.refId = name) })
fs.writeFile(imgOutPath + "/" + name + ".png", dataBuffer, () => { });
}) })
//开始删东西 //开始删东西
//是否3d
delete data.ddd; delete data.ddd;
//版本号,版本必须5.6.10,否则可能有问题
delete data.v;
//遍历删除图层东西 //遍历删除图层东西
for (var i = 0; i < data.layers.length; i++) { for (var i = 0; i < data.layers.length; i++) {
var l = data.layers[i]; var l = data.layers[i];
//是否3d,后缀,sr,ap,开始时间,混合模式,特效 //是否3d,后缀,sr,ao,开始时间,混合模式,特效
["ddd", "cl", "sr", "ao", "st", "bm", "ef"].forEach((e) => { delete l[e]; }); ["ddd", "cl", "sr", "ao", "st", "bm", "ef"].forEach((e) => { delete l[e]; });
//ks删除 //ks删除
["o", "r", "p", "a", "s"].forEach((e) => { ["o", "r", "p", "a", "s"].forEach((e) => {
var d = l.ks[e]; var d = l.ks[e];
//ix不知道干嘛用,删了 //ix不知道干嘛用,删了
delete d.ix; delete d.ix;
//删除k里数据 //貌似标记0是没有关键帧的,1是有关键帧的
delete d.a;
//删除k里数据,都要用了,不能删,看情况用吧,如果不需要补间的,用Tween拼的,就删掉,不删只是文件大点
if (d.k.length && typeof d.k[0] == "object") { if (d.k.length && typeof d.k[0] == "object") {
d.k.forEach((ee) => { d.k.forEach((ee) => {
["i", "o", "ti", "to"].forEach((eee) => { delete ee[eee]; }) ["i", "o", "ti", "to"/*, "h"*/].forEach((eee) => { delete ee[eee]; })//h需要判断是否是缓动
}) })
} }
}) })
...@@ -58,10 +91,14 @@ files.forEach(function (lottiesFileName) { ...@@ -58,10 +91,14 @@ files.forEach(function (lottiesFileName) {
//导出代码到src的lotties文件夹,名字就是lottie动画名字,资源名字临时处理了,首页加载动画用图层的nm,bonustime用refid //导出代码到src的lotties文件夹,名字就是lottie动画名字,资源名字临时处理了,首页加载动画用图层的nm,bonustime用refid
var endPath = './src/lotties'; var endPath = './src/lotties';
if (!fs.existsSync(endPath)) fs.mkdirSync(endPath); if (!fs.existsSync(endPath)) fs.mkdirSync(endPath);
//文件名字修改,中划线变成下划线,中文变拼音
var fileName = (cusName/*data.nm*/).replace(/-/g, "_")
//导出对象直接用lottie动画名字 //导出对象直接用lottie动画名字
var endFile = `export const ${data.nm} = ${JSON.stringify(data, "", "\t")}` var endFile = `export const ${fileName} = ${JSON.stringify(data, "", "\t")}`
//文件名字用lottie动画名字 //文件名字用lottie动画名字
fs.writeFileSync(endPath + "/" + data.nm + ".ts", endFile); fs.writeFileSync(endPath + "/" + fileName + ".ts", endFile);
console.log("生成文件:" + fileName + ".ts")
}) })
function guid() { function guid() {
......
var fs = require("fs");
var iconv = require('iconv-lite');
var path = require('path');
//用于处理带base64图片的lottie文件,取出图片,同名lottie文件夹,写入代码"./src/lotties/"中;
var pathName = "./lotties"
//读文件夹
var files = fs.readdirSync(pathName);
//对每个json文件作处理
files.forEach(function (lottiesFileName) {
//后缀不是json的,不处理
if (path.extname(lottiesFileName).indexOf(".json") < 0) return;
//读数据
var data = iconv.decode(fs.readFileSync(pathName + "/" + lottiesFileName), "utf-8");//GBK
//反序列化
data = JSON.parse(data);
//存图片
var assets = data.assets;
if (!assets || !assets.length) return;
//删除属性
delete data.assets;
var imgOutPath = pathName + "/" + data.nm
//建文件夹data.nm
if (!fs.existsSync(imgOutPath)) fs.mkdirSync(imgOutPath);
assets.forEach((e) => {
//没有base64数据
if (!e.p) return
let id = e.id;
let uuid = guid();
//存图片
var base64 = e.p.replace(/^data:image\/\w+;base64,/, "");//去掉图片base64码前面部分data:image/png;base64
var dataBuffer = new Buffer(base64, 'base64'); //把base64码转成buffer对象,
fs.writeFile(imgOutPath + "/" + uuid + ".png", dataBuffer, ()=>0);
//修改用到id的所有refId
data.layers.forEach((l) => { l.refId === id && (l.refId = uuid) })
})
//开始删东西
delete data.ddd;
//遍历删除图层东西
for (var i = 0; i < data.layers.length; i++) {
var l = data.layers[i];
//是否3d,后缀,sr,ap,开始时间,混合模式,特效
["ddd", "cl", "sr", "ao", "st", "bm", "ef"].forEach((e) => { delete l[e]; });
//ks删除
["o", "r", "p", "a", "s"].forEach((e) => {
var d = l.ks[e];
//ix不知道干嘛用,删了
delete d.ix;
//删除k里数据
if (d.k.length && typeof d.k[0] == "object") {
d.k.forEach((ee) => {
["i", "o", "ti", "to"].forEach((eee) => { delete ee[eee]; })
})
}
})
}
//导出代码到src的lotties文件夹,名字就是lottie动画名字,资源名字临时处理了,首页加载动画用图层的nm,bonustime用refid
var endPath = './src/lotties';
if (!fs.existsSync(endPath)) fs.mkdirSync(endPath);
//导出对象直接用lottie动画名字
var endFile = `export const ${data.nm} = ${JSON.stringify(data, "", "\t")}`
//文件名字用lottie动画名字
fs.writeFileSync(endPath + "/" + data.nm + ".ts", endFile);
})
function guid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
export const ResJson = { export const ResJson = {
"groups": [ "groups": [
{
"keys": "18986110-634a-4248-a956-b2861424ff16.png,24131c00-9062-43a1-b52d-00d788f75b79.png,2d6cba7b-b5f7-42ef-81e9-bb15a5e6266b.png,2e5f1f43-9af3-4b9b-a8fc-db17964eecb6.png,52e8af6a-f83c-4c95-9f44-d5bb1c20493b.png,5d6129c5-6206-47d5-bb42-b9274ad37e9d.png,6e5ccdc9-ce62-4e1b-88ca-0e269f492ec1.png,778a9647-034e-4fad-8a79-d9226ae2ed5d.png,796267bf-092e-44c9-999b-574d305c8769.png,7d410e98-3af4-4bb8-98ac-acf1a8bd48fa.png,93ea4980-6258-4413-bbd7-3260e1117bb6.png,b9f72eac-22ea-4505-b043-24c8a83acd05.png",
"name": "BonusTime"
},
{ {
"keys": "failedBtn.png,failedTxt.png", "keys": "failedBtn.png,failedTxt.png",
"name": "FailedPanel" "name": "FailedPanel"
...@@ -48,10 +52,6 @@ export const ResJson = { ...@@ -48,10 +52,6 @@ export const ResJson = {
"keys": "useStepCancel.png,useStepOk.png", "keys": "useStepCancel.png,useStepOk.png",
"name": "UseStep" "name": "UseStep"
}, },
{
"keys": "0d5e3eff-7726-4e3a-a2d4-409a9e68c2ec.png,16eb7a4a-34a0-45f3-8c02-154b638b1049.png,2c17dca6-ec35-4184-ae72-25813cf8f5dc.png,79040d0c-04ba-4c98-a512-5707d7ed37f5.png,93bcd69f-9897-4b12-8bf0-c0659817ccd2.png,e8c749fe-2a3b-4941-8527-37ba70a66e34.png,fdcf57c3-b91e-44d2-a011-7a0bbf4e5bb4.png",
"name": "bonus_lottie"
},
{ {
"keys": "boomBtn.png,comCloseBtn.png,comm_light.png,e305be55-fdfd-453b-9e6d-41edfe68c0f1.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,panelBgS.png,powerIcon.png,powerImg.png,stepBtn.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,target0.png,target1.png,target2.png,target3.png,target4.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,确定.png,继续闯关大.png,继续闯关小.png", "keys": "boomBtn.png,comCloseBtn.png,comm_light.png,e305be55-fdfd-453b-9e6d-41edfe68c0f1.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,panelBgS.png,powerIcon.png,powerImg.png,stepBtn.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,target0.png,target1.png,target2.png,target3.png,target4.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common" "name": "common"
...@@ -65,7 +65,7 @@ export const ResJson = { ...@@ -65,7 +65,7 @@ export const ResJson = {
"name": "fiveVerHorDis" "name": "fiveVerHorDis"
}, },
{ {
"keys": "loadingBg.jpg,loadingPro.png", "keys": "loadingBg.jpg,loadingLight0.png,loadingLight1.png,loadingLight10.png,loadingLight11.png,loadingLight12.png,loadingLight13.png,loadingLight14.png,loadingLight15.png,loadingLight16.png,loadingLight17.png,loadingLight18.png,loadingLight19.png,loadingLight2.png,loadingLight20.png,loadingLight21.png,loadingLight22.png,loadingLight23.png,loadingLight24.png,loadingLight25.png,loadingLight26.png,loadingLight27.png,loadingLight28.png,loadingLight29.png,loadingLight3.png,loadingLight4.png,loadingLight5.png,loadingLight6.png,loadingLight7.png,loadingLight8.png,loadingLight9.png,loadingPro.png",
"name": "loadingScene" "name": "loadingScene"
}, },
{ {
...@@ -85,7 +85,7 @@ export const ResJson = { ...@@ -85,7 +85,7 @@ export const ResJson = {
"name": "playScene" "name": "playScene"
}, },
{ {
"keys": "bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom21.png,boom22.png,boom23.png,boom24.png,boom25.png,boom26.png,boom27.png,boom28.png,boom29.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar20.png,bubbleStar21.png,bubbleStar22.png,bubbleStar23.png,bubbleStar24.png,bubbleStar25.png,bubbleStar26.png,bubbleStar27.png,bubbleStar28.png,bubbleStar29.png,bubbleStar3.png,bubbleStar30.png,bubbleStar31.png,bubbleStar32.png,bubbleStar33.png,bubbleStar34.png,bubbleStar35.png,bubbleStar36.png,bubbleStar37.png,bubbleStar38.png,bubbleStar39.png,bubbleStar4.png,bubbleStar40.png,bubbleStar41.png,bubbleStar42.png,bubbleStar43.png,bubbleStar44.png,bubbleStar45.png,bubbleStar46.png,bubbleStar47.png,bubbleStar48.png,bubbleStar49.png,bubbleStar5.png,bubbleStar50.png,bubbleStar51.png,bubbleStar52.png,bubbleStar53.png,bubbleStar54.png,bubbleStar55.png,bubbleStar56.png,bubbleStar57.png,bubbleStar58.png,bubbleStar59.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,exLighting0.png,exLighting1.png,exLighting10.png,exLighting11.png,exLighting12.png,exLighting13.png,exLighting14.png,exLighting15.png,exLighting2.png,exLighting3.png,exLighting4.png,exLighting5.png,exLighting6.png,exLighting7.png,exLighting8.png,exLighting9.png,stepAni1.png,stepAni10.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png", "keys": "bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom21.png,boom22.png,boom23.png,boom24.png,boom25.png,boom26.png,boom27.png,boom28.png,boom29.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar20.png,bubbleStar21.png,bubbleStar22.png,bubbleStar23.png,bubbleStar24.png,bubbleStar25.png,bubbleStar26.png,bubbleStar27.png,bubbleStar28.png,bubbleStar29.png,bubbleStar3.png,bubbleStar30.png,bubbleStar31.png,bubbleStar32.png,bubbleStar33.png,bubbleStar34.png,bubbleStar35.png,bubbleStar36.png,bubbleStar37.png,bubbleStar38.png,bubbleStar39.png,bubbleStar4.png,bubbleStar40.png,bubbleStar41.png,bubbleStar42.png,bubbleStar43.png,bubbleStar44.png,bubbleStar45.png,bubbleStar46.png,bubbleStar47.png,bubbleStar48.png,bubbleStar49.png,bubbleStar5.png,bubbleStar50.png,bubbleStar51.png,bubbleStar52.png,bubbleStar53.png,bubbleStar54.png,bubbleStar55.png,bubbleStar56.png,bubbleStar57.png,bubbleStar58.png,bubbleStar59.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting2.png,exLighting4.png,exLighting6.png,exLighting8.png,stepAni1.png,stepAni10.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png",
"name": "playSceneEffect" "name": "playSceneEffect"
}, },
{ {
......
...@@ -10,6 +10,8 @@ import TextField = FYGE.TextField; ...@@ -10,6 +10,8 @@ import TextField = FYGE.TextField;
import Tween = FYGE.Tween; import Tween = FYGE.Tween;
import { MapScene } from "./map/MapScene"; import { MapScene } from "./map/MapScene";
import { PlayScene } from "./PlayScene"; import { PlayScene } from "./PlayScene";
import FrameAni = FYGE.FrameAni;
import Texture = FYGE.Texture;
export class LoadingScene extends Scene { export class LoadingScene extends Scene {
get groupNames() { get groupNames() {
...@@ -31,6 +33,15 @@ export class LoadingScene extends Scene { ...@@ -31,6 +33,15 @@ export class LoadingScene extends Scene {
//@ts-ignore 进度条托管 //@ts-ignore 进度条托管
this.progressBar = new ProgressBarS(pro); this.progressBar = new ProgressBarS(pro);
const frames = [];
for (let i = 0; i<= 29; i++){
frames.push(RES.getRes(`loadingLight${i}.png`));
}
const ani = new FrameAni(frames);
this.addChild(ani);
ani.position.set(375, 665);
ani.play(1);
} }
dotTween = null; dotTween = null;
......
...@@ -60,10 +60,10 @@ import { sendTbNet, TbNetName } from '../TaoBaoNet'; ...@@ -60,10 +60,10 @@ import { sendTbNet, TbNetName } from '../TaoBaoNet';
import { MapScene } from './map/MapScene'; import { MapScene } from './map/MapScene';
import { NoStepPanel } from '../panels/NoStepPanel'; import { NoStepPanel } from '../panels/NoStepPanel';
import { FirstPropGift } from '../something/uis/FirstPropGift'; import { FirstPropGift } from '../something/uis/FirstPropGift';
import { bonus_lottie } from '../lotties/bonus_lottie';
import { GDispatcher } from '../Main'; import { GDispatcher } from '../Main';
import { G_EVENT } from '../common/G_EVENT'; import { G_EVENT } from '../common/G_EVENT';
import { UseStep } from "../panels/UseStep"; import { UseStep } from "../panels/UseStep";
import { BonusTime } from "../lotties/BonusTime";
const aniClass = { const aniClass = {
"BoomAni": BoomAni, "BoomAni": BoomAni,
...@@ -121,7 +121,7 @@ const festivalIndex: number = 40 ...@@ -121,7 +121,7 @@ const festivalIndex: number = 40
export class PlayScene extends Scene { export class PlayScene extends Scene {
get groupNames() { get groupNames() {
return ["playScene", "fiveVerHorDis", "playSceneEffect", "playSceneGuide", "playSceneNum", "bonus_lottie"] return ["playScene", "fiveVerHorDis", "playSceneEffect", "playSceneGuide", "playSceneNum", "BonusTime"]
} }
//关卡数据 //关卡数据
...@@ -352,7 +352,7 @@ export class PlayScene extends Scene { ...@@ -352,7 +352,7 @@ export class PlayScene extends Scene {
*/ */
async initSvgas() { async initSvgas() {
//这里加载资源吧 //这里加载资源吧
var bonusTime = new Lottie(bonus_lottie) var bonusTime = new Lottie(BonusTime);
bonusTime.position.set( bonusTime.position.set(
(750 - bonusTime.videoWidth) / 2, (750 - bonusTime.videoWidth) / 2,
(1624 - bonusTime.videoHeight) / 2 - layers.stageOffsetY - 200 (1624 - bonusTime.videoHeight) / 2 - layers.stageOffsetY - 200
......
...@@ -32,7 +32,8 @@ export class MapScene extends Scene { ...@@ -32,7 +32,8 @@ export class MapScene extends Scene {
public get groupNames(): string[] { public get groupNames(): string[] {
return [ return [
'map', 'map',
'mapCheckPrizeEffect' 'mapCheckPrizeEffect',
'BonusTime',
]; ];
} }
......
...@@ -10,6 +10,8 @@ import { RulePanel } from "../../panels/RulePanel"; ...@@ -10,6 +10,8 @@ import { RulePanel } from "../../panels/RulePanel";
import { sendTbNet, TbNetName } from "../../TaoBaoNet"; import { sendTbNet, TbNetName } from "../../TaoBaoNet";
import { layers } from "../../../module/views/layers"; import { layers } from "../../../module/views/layers";
import { LotteryPanel } from "../../panels/LotteryPanel"; import { LotteryPanel } from "../../panels/LotteryPanel";
import { Lottie } from "../../Lottie";
import { BonusTime } from "../../lotties/BonusTime";
export default class MapUI extends Container { export default class MapUI extends Container {
public energyBox: EnergyBox = null; public energyBox: EnergyBox = null;
...@@ -99,6 +101,11 @@ export default class MapUI extends Container { ...@@ -99,6 +101,11 @@ export default class MapUI extends Container {
this.clearanceBtn = this.addChild(new Button(RES.getRes('clearanceBtn.png'))); this.clearanceBtn = this.addChild(new Button(RES.getRes('clearanceBtn.png')));
this.clearanceBtn.position.set(0, _y + 174); this.clearanceBtn.position.set(0, _y + 174);
this.clearanceBtn.visible = false; this.clearanceBtn.visible = false;
var bonusTime = new Lottie(BonusTime);
this.addChild(bonusTime);
bonusTime.play();
} }
public updateUI() { public updateUI() {
......
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