Commit 55068487 authored by AU-Pro-mac's avatar AU-Pro-mac

fix conflect

parents 904eaecc 229b0962
var fs = require("fs");
// fs.writeFileSync(
// "./released/output.js",
// fs.readFileSync("./output.js")
// )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var endPath = '/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/';
var version = Math.round(new Date().getTime() / 1000);
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
fs.writeFileSync(endPath + "output.js", fs.readFileSync("./released/output.js"));
// console.log("js覆盖完成")
console.log(`版本号:
var fs = require("fs");
// fs.writeFileSync(
// "./released/output.js",
// fs.readFileSync("./output.js")
// )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var endPath = '/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/';
var version = Math.round(new Date().getTime() / 1000);
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
fs.writeFileSync(endPath + "output.js", fs.readFileSync("./released/output.js"));
// console.log("js覆盖完成")
console.log(`版本号:
${version}`)
\ No newline at end of file
......@@ -3,7 +3,6 @@ import { RES } from "../../module/RES";
import Root from "./Root";
// import res from "../../test/output.json"
import resCanvasList from "../../../game/resCanvasList"
import { MainScene } from "../xiaoxiaole/MainScene";
import { Ins } from "../Ins";
import { changeScene, showPanel } from "../../module/ctrls";
import { SelectCatPanel } from "../panels/selectcatpanel/SelectCatPanel";
......
import { RES } from "../../module/RES";
import resCanvasList from "../../resCanvasList";
declare interface point {
x: number;
y: number;
}
export default class CircleItem extends FYGE.Sprite {
//类型
type: number
circleRes = ['2a747211-0210-4215-86a2-a6955b37c45b', '7d1ec658-9371-4d52-b4d7-e75d04037daf', '6a1345f6-969c-4969-8bfb-f4de637df34d', '2e12a9ec-46be-487f-a9cd-550dd0af3746']
point: point
index: number
nnnn: number
constructor(type: number, point: point, index: number) {
super();
this.type = type
this.point = { x: point.x + 39, y: point.y + 39 }
this.x = point.x
this.y = point.y
this.index = index
this.texture = RES.getRes(
resCanvasList[this.circleRes[type]].url
);
}
toBig() {
console.log("变大")
this.scaleX = 1.1
this.scaleY = 1.1
}
toNormal() {
this.scaleY = this.scaleX = 1
}
changeConfig(type: number, point: point, index: number) {
this.type = type
this.point = { x: point.x + 39, y: point.y + 39 }
this.x = point.x
this.y = point.y
this.index = index
this.texture = RES.getRes(
resCanvasList[this.circleRes[type]].url
);
}
}
import { Scene } from "../../module/views/Scene";
import resCanvasList from "../../resCanvasList";
import { RES } from "../../module/RES";
import { Ins } from "../Ins";
import { MainSceneBtnUi } from "../ui/mainSceneBtnUi";
import { MSG, SCENETYPE } from "../Enum";
import { showToast } from "../../module/ctrls";
import { GDispatcher } from "../Main";
import { Cat } from "../cat/Cat";
import { Tools } from "../Tools";
export class MainScene extends Scene {
bg: FYGE.Sprite
initUi() {
var that = this;
that.initSceneEle();
this.bg = Ins.initSprite("7fcd3fb3-57bd-436a-afca-989b68b6b311")
this.addChild(this.bg);
this.x = (Ins.stageW - 750) >> 1;
this.y = (Ins.stageH - 1624) >> 1;
this.setHexagram(7)
}
// 初始化六角形4/7/10/13/16....
setHexagram(max: number) {
let c = Math.ceil(max / 2)
let x = (2 * max + 1) / 3
let str = ""
for (let i = 0; i < 2 * max - x; i++) {
if (i < max - x) {
for (let j = 0; j <= i; j++) {
str += `${j}`
}
str += '\n'
} else if (i >= max - x && i <= c) {
console.log(i, max - i - 2 + x)
for (let j = max - i - 2 + x; j > 0; j--) {
str += `${j}`
}
str += '\n'
} else if (i > c && i < max) {
for (let j = 0; j < i + 1; j++) {
str += `${j}`
}
str += '\n'
} else {
for (let j = max - i - 2 + x; j > 0; j--) {
str += `${j}`
}
str += '\n'
}
}
console.log(str)
}
/**初始化场景元素 */
initSceneEle() {
console.log(1111)
}
initEvents() {
var that = this;
console.log("主场景添加事件")
// that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK,()=>{that.changeMainScene(SCENETYPE.CLASSROOM)},that);
// that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK,()=>{that.changeMainScene(SCENETYPE.PLAYGROUND)},that);
// FYGE.GDispatcher.addEventListener(MSG.CHANGE_SCENE,()=>{that.changeMainScene(SCENETYPE.BEADROOM)},that);
}
removeEvents() {
var that = this;
console.log("主场景移除事件")
// that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK,()=>{that.changeMainScene(SCENETYPE.CLASSROOM)},that);
// that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK,()=>{that.changeMainScene(SCENETYPE.PLAYGROUND)},that);
// FYGE.GDispatcher.removeEventListener(MSG.CHANGE_SCENE,()=>{that.changeMainScene(SCENETYPE.BEADROOM)},that);
}
}
\ No newline at end of file
import CircleItem from "./CircleItem"
declare interface point {
x: number;
y: number;
}
export class ObjectPool {
_circleItemPool: CircleItem[] = []
getItem(type: number, ponit: point, index: number): CircleItem {
// console.log(this._circleItemPool.length)
let co = this._circleItemPool.shift()
if (co) {
co.changeConfig(type, ponit, index)
}
return co || new CircleItem(type, ponit, index)
}
putItem(co: CircleItem) {
if (co.parent) {
co.parent.removeChild(co)
}
this._circleItemPool.push(co)
}
}
\ No newline at end of file
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