Commit 8f546ac3 authored by ZhangZeyu's avatar ZhangZeyu

feat: new

parent f97d21f1
...@@ -40,13 +40,13 @@ export class Flop extends Scene { ...@@ -40,13 +40,13 @@ export class Flop extends Scene {
let nnn = null let nnn = null
// 切图 // 切图
await createCutTextures('//yun.duiba.com.cn/spark/assets/22950e2c20abdc8e06fd0844d6f680e760915ac8.png', 5, 5).then((res) => { await createCutTextures('//yun.duiba.com.cn/spark/assets/22950e2c20abdc8e06fd0844d6f680e760915ac8.png', 4, 4).then((res) => {
PIC_URLS = res PIC_URLS = res
}) })
this.addChild(bigImg) this.addChild(bigImg)
const picUnit = new FYGE.Sprite(PIC_URLS[0]) const picUnit = new FYGE.Sprite(PIC_URLS[0])
PIC_SIZE = picUnit.width;//图片宽 PIC_SIZE = picUnit.width;//图片宽
const GAME_SIZE = 5; const GAME_SIZE = 4;
const INIT_DATA: any = fill(GAME_SIZE * GAME_SIZE); //数据为图片id,从0开始(图片索引) const INIT_DATA: any = fill(GAME_SIZE * GAME_SIZE); //数据为图片id,从0开始(图片索引)
console.log("INIT_DATA", INIT_DATA); console.log("INIT_DATA", INIT_DATA);
......
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