Commit cabc914a authored by haiyoucuv's avatar haiyoucuv

guide

parent 4ec7aeeb
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"build": "npm run handleRes && node scripts/mergeJson && npm run upload && npm run buildTS", "build": "npm run handleRes && node scripts/mergeJson && npm run upload && npm run buildTS",
"watch": "webpack --watch", "watch": "webpack --watch",
"dev": "webpack-dev-server --open --config webpack.dev.js --host 0.0.0.0", "dev": "webpack-dev-server --open --config webpack.dev.js --host 0.0.0.0",
"buildTS": "webpack --config webpack.prod.js && node scripts/mergeJs", "buildTS": "webpack --config webpack.prod.js && node scripts/mergeJs && npm run copyJs",
"copyJs": "node scripts/copyJs", "copyJs": "node scripts/copyJs",
"lt": "node scripts/handleLotS.js" "lt": "node scripts/handleLotS.js"
}, },
......
...@@ -6,10 +6,10 @@ var fs = require("fs"); ...@@ -6,10 +6,10 @@ var fs = require("fs");
// fs.readFileSync("./output.js") // fs.readFileSync("./output.js")
// ) // )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/'; // var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var endPath = 'D:/duibaGame/淘宝项目/taobao_mini/babycare_xiaoxiaole/babycare_c_client/client/pages/index/'; var endPath = '/Users/haiyoucuv/Documents/Web/泡泡玛特消消乐/taobao_mini/popmart_xiaoxiaole/popmart_c_client/client/pages/index/';
var version = Math.round(new Date().getTime() / 1000); var version = Math.round(new Date().getTime() / 1000);
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js")); // fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
fs.writeFileSync(endPath + "output.js", fs.readFileSync("./released/output.js")); fs.writeFileSync(endPath + "output.js", fs.readFileSync("./released/output.js"));
// console.log("js覆盖完成") // console.log("js覆盖完成")
console.log(`版本号: console.log(`版本号:
${version}`) ${version}`)
\ No newline at end of file
...@@ -47,7 +47,7 @@ files.forEach(function (file) { ...@@ -47,7 +47,7 @@ files.forEach(function (file) {
var pathname = outPath + file + "/" + file + ".json"; var pathname = outPath + file + "/" + file + ".json";
//有中文命名时处理 //有中文命名时处理
var data = iconv.decode(fs.readFileSync(pathname), "GBK");//GBK,window版本只能GBK,TexturePacker版本问题,mac改成utf-8 var data = iconv.decode(fs.readFileSync(pathname), "utf-8");//GBK,window版本只能GBK,TexturePacker版本问题,mac改成utf-8
// console.log(data) // console.log(data)
//反序列化 //反序列化
data = JSON.parse(data); //eval(data) data = JSON.parse(data); //eval(data)
...@@ -99,7 +99,7 @@ function getTmCmd(src, outPath, name) { ...@@ -99,7 +99,7 @@ function getTmCmd(src, outPath, name) {
/** /**
* 对文件使用utf8编码 * 对文件使用utf8编码
* @param {string} pathname * @param {string} pathname
*/ */
function applyUtf8(pathname) { function applyUtf8(pathname) {
fs.writeFile(pathname, iconv.decode(fs.readFileSync(pathname), "GBK"), { fs.writeFile(pathname, iconv.decode(fs.readFileSync(pathname), "GBK"), {
...@@ -113,7 +113,7 @@ function applyUtf8(pathname) { ...@@ -113,7 +113,7 @@ function applyUtf8(pathname) {
/** /**
* 判断文件夹内是否有图片 * 判断文件夹内是否有图片
* @param {*} path * @param {*} path
*/ */
function judgeHasImage(path) { function judgeHasImage(path) {
var files = fs.readdirSync(path); var files = fs.readdirSync(path);
...@@ -128,4 +128,4 @@ function judgeHasImage(path) { ...@@ -128,4 +128,4 @@ function judgeHasImage(path) {
} }
} }
return false; return false;
} }
\ No newline at end of file
This diff is collapsed.
...@@ -327,7 +327,7 @@ export const SkinJson = { ...@@ -327,7 +327,7 @@ export const SkinJson = {
"alpha": 1, "alpha": 1,
"type": "sprite", "type": "sprite",
"props": { "props": {
"source": "prize.png" "source": ""
}, },
"id": "prizeImg" "id": "prizeImg"
}, },
......
...@@ -78,6 +78,7 @@ export class MapScene extends Scene { ...@@ -78,6 +78,7 @@ export class MapScene extends Scene {
const guide = this.addChild(new Container()); const guide = this.addChild(new Container());
guide.y = -layers.stageOffsetY; guide.y = -layers.stageOffsetY;
guide.y = -layers.stageOffsetY;
const g = guide.addChild(new Graphics()); const g = guide.addChild(new Graphics());
g.beginFill(0, 0.6); g.beginFill(0, 0.6);
g.drawRect(0, 0, 750, 1624); g.drawRect(0, 0, 750, 1624);
......
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