Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
xiaoxiaole
Commits
cb2d2ac6
Commit
cb2d2ac6
authored
Aug 29, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
82ea1c0d
e32a30b9
Changes
23
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
86 additions
and
59 deletions
+86
-59
blood.tmproject
egret/resource/TextureMerger/blood.tmproject
+1
-1
box.tmproject
egret/resource/TextureMerger/box.tmproject
+1
-1
box2.tmproject
egret/resource/TextureMerger/box2.tmproject
+1
-1
buy1.tmproject
egret/resource/TextureMerger/buy1.tmproject
+1
-1
buy2.tmproject
egret/resource/TextureMerger/buy2.tmproject
+1
-1
buy3.tmproject
egret/resource/TextureMerger/buy3.tmproject
+1
-1
common.tmproject
egret/resource/TextureMerger/common.tmproject
+1
-1
fail.tmproject
egret/resource/TextureMerger/fail.tmproject
+1
-1
failed.tmproject
egret/resource/TextureMerger/failed.tmproject
+1
-1
main2.tmproject
egret/resource/TextureMerger/main2.tmproject
+1
-1
map.tmproject
egret/resource/TextureMerger/map.tmproject
+1
-1
noprize.tmproject
egret/resource/TextureMerger/noprize.tmproject
+1
-1
preload.tmproject
egret/resource/TextureMerger/preload.tmproject
+5
-1
prize.tmproject
egret/resource/TextureMerger/prize.tmproject
+5
-1
prize2.tmproject
egret/resource/TextureMerger/prize2.tmproject
+5
-1
quit.tmproject
egret/resource/TextureMerger/quit.tmproject
+1
-1
rule.tmproject
egret/resource/TextureMerger/rule.tmproject
+1
-1
shop.tmproject
egret/resource/TextureMerger/shop.tmproject
+1
-1
start.tmproject
egret/resource/TextureMerger/start.tmproject
+1
-1
startpanel.tmproject
egret/resource/TextureMerger/startpanel.tmproject
+1
-1
MainScene.ts
egret/src/mainScene/MainScene.ts
+48
-37
Chapters.ts
egret/src/something/Chapters.ts
+1
-1
Tool.ts
egret/src/something/Tool.ts
+5
-1
No files found.
egret/resource/TextureMerger/blood.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood","version":5,"files":["../assets/blood/blood体力补济站.png","../assets/blood/blood按钮.png","../assets/blood/blood按钮 副本1.png","../assets/blood/blood按钮 副本.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood","version":5,"files":["..\\assets\\blood\\blood体力补济站.png","..\\assets\\blood\\blood按钮.png","..\\assets\\blood\\blood按钮 副本1.png","..\\assets\\blood\\blood按钮 副本.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/box.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"box","version":5,"files":["../assets/box/boxbtn.png","../assets/box/boxbg.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"box","version":5,"files":["..\\assets\\box\\boxbtn.png","..\\assets\\box\\boxbg.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/box2.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"box2","version":5,"files":["../assets/box2/box2_bg.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"box2","version":5,"files":["..\\assets\\box2\\box2_bg.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/buy1.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy1","version":5,"files":["../assets/buy1/购买锤子.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy1","version":5,"files":["..\\assets\\buy1\\购买锤子.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/buy2.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy2","version":5,"files":["../assets/buy2/购买炸弹.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy2","version":5,"files":["..\\assets\\buy2\\购买炸弹.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/buy3.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy3","version":5,"files":["../assets/buy3/购买步数增加.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy3","version":5,"files":["..\\assets\\buy3\\购买步数增加.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/common.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"common","version":5,"files":["../assets/common/toast.png","../assets/common/closeCommonBtn.png","../assets/common/btn.png","../assets/common/alertbg.png","../assets/common/按钮 副本 4.png","../assets/common/按钮 副本 3.png","../assets/common/share_btn2.png","../assets/common/share_btn1.png","../assets/common/commmon_okbtn1.png","../assets/common/lightani.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"common","version":5,"files":["..\\assets\\common\\toast.png","..\\assets\\common\\closeCommonBtn.png","..\\assets\\common\\btn.png","..\\assets\\common\\alertbg.png","..\\assets\\common\\按钮 副本 4.png","..\\assets\\common\\按钮 副本 3.png","..\\assets\\common\\share_btn2.png","..\\assets\\common\\share_btn1.png","..\\assets\\common\\commmon_okbtn1.png","..\\assets\\common\\lightani.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/fail.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"fail","version":5,"files":["../assets/faild/闯关失败.png","../assets/faild/按钮 副本 9.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"fail","version":5,"files":["..\\assets\\faild\\闯关失败.png","..\\assets\\faild\\按钮 副本 9.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/failed.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"failed","version":5,"files":["../assets/faild/闯关失败.png","../assets/faild/按钮 副本 9.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"failed","version":5,"files":["..\\assets\\faild\\闯关失败.png","..\\assets\\faild\\按钮 副本 9.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/main2.tmproject
View file @
cb2d2ac6
This diff is collapsed.
Click to expand it.
egret/resource/TextureMerger/map.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"map","version":5,"files":["../assets/map/progress2.png","../assets/map/progress1.png","../assets/map/icon.png","../assets/map/animal1.png","../assets/map/元宝bg.png","../assets/map/有星星.png","../assets/map/音乐.png","../assets/map/星星bg.png","../assets/map/星星.png","../assets/map/无星星.png","../assets/map/问题.png","../assets/map/退出.png","../assets/map/狮子.png","../assets/map/声音.png","../assets/map/设置bg.png","../assets/map/设置.png","../assets/map/关闭 拷贝.png","../assets/map/道具.png","../assets/map/宝箱btn.png","../assets/map/宝箱bg.png","../assets/map/宝箱.png","../assets/map/宝箱3.png","../assets/map/宝箱2.png","../assets/map/宝箱1.png","../assets/map/iconbg.png","../assets/map/光 副本 4.png","../assets/map/音乐关闭.png","../assets/map/声音关闭.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"map","version":5,"files":["..\\assets\\map\\progress2.png","..\\assets\\map\\progress1.png","..\\assets\\map\\icon.png","..\\assets\\map\\animal1.png","..\\assets\\map\\元宝bg.png","..\\assets\\map\\有星星.png","..\\assets\\map\\音乐.png","..\\assets\\map\\星星bg.png","..\\assets\\map\\星星.png","..\\assets\\map\\无星星.png","..\\assets\\map\\问题.png","..\\assets\\map\\退出.png","..\\assets\\map\\狮子.png","..\\assets\\map\\声音.png","..\\assets\\map\\设置bg.png","..\\assets\\map\\设置.png","..\\assets\\map\\关闭 拷贝.png","..\\assets\\map\\道具.png","..\\assets\\map\\宝箱btn.png","..\\assets\\map\\宝箱bg.png","..\\assets\\map\\宝箱.png","..\\assets\\map\\宝箱3.png","..\\assets\\map\\宝箱2.png","..\\assets\\map\\宝箱1.png","..\\assets\\map\\iconbg.png","..\\assets\\map\\光 副本 4.png","..\\assets\\map\\音乐关闭.png","..\\assets\\map\\声音关闭.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/noprize.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"noprize","version":5,"files":["../assets/nprize/擦肩而过弹窗 .png","../assets/nprize/得分- 无发券.png","../assets/nprize/再来一次.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"noprize","version":5,"files":["..\\assets\\nprize\\擦肩而过弹窗 .png","..\\assets\\nprize\\得分- 无发券.png","..\\assets\\nprize\\再来一次.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/preload.tmproject
View file @
cb2d2ac6
<<<<<<< HEAD
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["..\\assets\\common\\prizePanelbg.png"]}
=======
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/common/prizePanelbg.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/common/prizePanelbg.png"]}
>>>>>>> 983aa8d0e137ab6ac947ff8d15f79d5e2a402b74
egret/resource/TextureMerger/prize.tmproject
View file @
cb2d2ac6
<<<<<<< HEAD
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["..\\assets\\prize\\PrizePanelX.png","..\\assets\\prize\\prizePanelUseBtn.png","..\\assets\\prize\\点亮.png","..\\assets\\prize\\点亮 副本 2.png"]}
=======
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["../assets/prize/PrizePanelX.png","../assets/prize/prizePanelUseBtn.png","../assets/prize/点亮.png","../assets/prize/点亮 副本 2.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["../assets/prize/PrizePanelX.png","../assets/prize/prizePanelUseBtn.png","../assets/prize/点亮.png","../assets/prize/点亮 副本 2.png"]}
>>>>>>> 983aa8d0e137ab6ac947ff8d15f79d5e2a402b74
egret/resource/TextureMerger/prize2.tmproject
View file @
cb2d2ac6
<<<<<<< HEAD
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize2","version":5,"files":["..\\assets\\prize2\\prize2_icon.png"]}
=======
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize2","version":5,"files":["../assets/prize2/prize2_icon.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize2","version":5,"files":["../assets/prize2/prize2_icon.png"]}
>>>>>>> 983aa8d0e137ab6ac947ff8d15f79d5e2a402b74
egret/resource/TextureMerger/quit.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"quit","version":5,"files":["../assets/quit/quit_bg.png","../assets/quit/关闭按钮.png","../assets/quit/按钮 副本 8.png","../assets/quit/按钮 副本 7.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"quit","version":5,"files":["..\\assets\\quit\\quit_bg.png","..\\assets\\quit\\关闭按钮.png","..\\assets\\quit\\按钮 副本 8.png","..\\assets\\quit\\按钮 副本 7.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/rule.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rule","version":5,"files":["../assets/rule/ruleBg.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rule","version":5,"files":["..\\assets\\rule\\ruleBg.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/shop.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"shop","version":5,"files":["../assets/shop/道具商城.png","../assets/shop/按钮 副本.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"shop","version":5,"files":["..\\assets\\shop\\道具商城.png","..\\assets\\shop\\按钮 副本.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/start.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["../assets/startScene/mask3.png","../assets/startScene/mask2.png","../assets/startScene/mask.png","../assets/startScene/loadingbg.png","../assets/startScene/头顶树丛.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["..\\assets\\startScene\\mask3.png","..\\assets\\startScene\\mask2.png","..\\assets\\startScene\\mask.png","..\\assets\\startScene\\loadingbg.png","..\\assets\\startScene\\头顶树丛.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/TextureMerger/startpanel.tmproject
View file @
cb2d2ac6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"startpanel","version":5,"files":["../assets/startpanel2/通关条件.png","../assets/startpanel2/数量.png","../assets/startpanel2/数量 副本 3.png","../assets/startpanel2/按钮.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"startpanel","version":5,"files":["..\\assets\\startpanel2\\通关条件.png","..\\assets\\startpanel2\\数量.png","..\\assets\\startpanel2\\数量 副本 3.png","..\\assets\\startpanel2\\按钮.png"]}
\ No newline at end of file
\ No newline at end of file
egret/src/mainScene/MainScene.ts
View file @
cb2d2ac6
...
@@ -94,6 +94,8 @@ export default class MainScene extends Scene {
...
@@ -94,6 +94,8 @@ export default class MainScene extends Scene {
chapter
:
number
chapter
:
number
//所有的格子数组
//所有的格子数组
lattices
:
Lattice
[];
lattices
:
Lattice
[];
//生成口
generateIndexs
:
number
[];
//最后一行的行数
//最后一行的行数
endRowNum
:
number
=
0
;
endRowNum
:
number
=
0
;
//元素的容器,为了移动事件简单
//元素的容器,为了移动事件简单
...
@@ -333,7 +335,7 @@ export default class MainScene extends Scene {
...
@@ -333,7 +335,7 @@ export default class MainScene extends Scene {
this
.
addChild
(
this
.
stepNumber
);
this
.
addChild
(
this
.
stepNumber
);
//分数进度条,托管
//分数进度条,托管
this
.
scoreProgress
=
new
ScoreProgress
(
this
.
starProgress
,
this
.
scoreTxt
,
this
.
chapterData
.
starScores
);
this
.
scoreProgress
=
new
ScoreProgress
(
this
.
starProgress
,
this
.
scoreTxt
,
this
.
chapterData
.
starScores
);
// this.scoreTxt.textColor = 0x5e1f0c
this
.
scoreTxt
.
y
-=
2
;
//背景图生成
//背景图生成
// var bg = drawBg(this.chapterData.map.paths, this.chapterData.map.lattices)
// var bg = drawBg(this.chapterData.map.paths, this.chapterData.map.lattices)
var
path
=
generateMapBg
(
this
.
chapterData
.
map
.
lattices
);
var
path
=
generateMapBg
(
this
.
chapterData
.
map
.
lattices
);
...
@@ -538,7 +540,7 @@ export default class MainScene extends Scene {
...
@@ -538,7 +540,7 @@ export default class MainScene extends Scene {
}
}
}
}
//设置生成口
//设置生成口
Tool
.
setGenerateLats
(
this
.
lattices
,
generateLats
)
this
.
generateIndexs
=
Tool
.
setGenerateLats
(
this
.
lattices
,
generateLats
)
//联通口
//联通口
var
connectedLats
=
this
.
chapterData
.
map
.
connectedLats
||
[];
var
connectedLats
=
this
.
chapterData
.
map
.
connectedLats
||
[];
for
(
var
i
=
0
;
i
<
connectedLats
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
connectedLats
.
length
;
i
++
)
{
...
@@ -1115,9 +1117,9 @@ export default class MainScene extends Scene {
...
@@ -1115,9 +1117,9 @@ export default class MainScene extends Scene {
//先把竖直的掉落完,掉满后
//先把竖直的掉落完,掉满后
var
maxCount
=
1
;
var
maxCount
=
1
;
for
(
var
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
{
for
(
var
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
{
//同一列
//同一列
,先原有的填满,再查是否有生成口
for
(
var
n
=
Tool
.
rowNum
-
1
;
n
>=
0
;
n
--
)
{
for
(
var
n
=
Tool
.
rowNum
-
1
;
n
>=
0
;
n
--
)
{
var
index
=
Tool
.
rcToIndex
(
n
,
m
);
let
index
=
Tool
.
rcToIndex
(
n
,
m
);
let
lat
=
this
.
lattices
[
index
];
let
lat
=
this
.
lattices
[
index
];
if
(
Tool
.
judgeFall
(
lat
))
{
if
(
Tool
.
judgeFall
(
lat
))
{
var
emptyIndex
=
Tool
.
findBottom
(
lat
,
this
.
emptys
,
this
.
lattices
);
var
emptyIndex
=
Tool
.
findBottom
(
lat
,
this
.
emptys
,
this
.
lattices
);
...
@@ -1132,8 +1134,14 @@ export default class MainScene extends Scene {
...
@@ -1132,8 +1134,14 @@ export default class MainScene extends Scene {
this
.
emptys
.
push
(
index
);
this
.
emptys
.
push
(
index
);
lat
.
element
=
null
lat
.
element
=
null
}
}
}
else
{
}
else
{
}
}
//找m列的生成口
if
(
this
.
generateIndexs
[
m
]
!=
undefined
)
{
let
lat
=
this
.
lattices
[
this
.
generateIndexs
[
m
]];
let
index
=
this
.
generateIndexs
[
m
];
//如果有格子。无元素,是生成口,要补齐下面能掉落的
//如果有格子。无元素,是生成口,要补齐下面能掉落的
if
(
lat
&&
!
lat
.
element
&&
lat
.
isGenerate
)
{
if
(
lat
&&
!
lat
.
element
&&
lat
.
isGenerate
)
{
//找出从生成口一直到能掉落的空格
//找出从生成口一直到能掉落的空格
...
@@ -1168,7 +1176,6 @@ export default class MainScene extends Scene {
...
@@ -1168,7 +1176,6 @@ export default class MainScene extends Scene {
}
}
}
}
}
}
}
anis
[
"maxCount"
]
=
maxCount
>
1
?
maxCount
/
2
:
maxCount
;
anis
[
"maxCount"
]
=
maxCount
>
1
?
maxCount
/
2
:
maxCount
;
return
anis
;
return
anis
;
}
}
...
@@ -1180,7 +1187,7 @@ export default class MainScene extends Scene {
...
@@ -1180,7 +1187,7 @@ export default class MainScene extends Scene {
//排序从大到小
//排序从大到小
emptys
.
sort
(
function
(
a
,
b
)
{
return
a
<
b
?
1
:
-
1
})
emptys
.
sort
(
function
(
a
,
b
)
{
return
a
<
b
?
1
:
-
1
})
for
(
var
i
=
0
;
i
<
emptys
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
emptys
.
length
;
i
++
)
{
var
indexMy
=
emptys
[
i
];
let
indexMy
=
emptys
[
i
];
var
lat
=
this
.
lattices
[
indexMy
];
var
lat
=
this
.
lattices
[
indexMy
];
//判断是否是生成口
//判断是否是生成口
if
(
lat
.
isGenerate
)
{
if
(
lat
.
isGenerate
)
{
...
@@ -1230,11 +1237,15 @@ export default class MainScene extends Scene {
...
@@ -1230,11 +1237,15 @@ export default class MainScene extends Scene {
//能掉落,记录元素动画
//能掉落,记录元素动画
anis
.
push
([
latFall
.
element
,
indexMy
]);
anis
.
push
([
latFall
.
element
,
indexMy
]);
//去掉
//去掉
// console.log(emptys)
// console.log(indexFall)
emptys
.
splice
(
i
,
1
);
emptys
.
splice
(
i
,
1
);
//在剩下emptys的加上一个,正上方的那个
//在剩下emptys的加上一个,正上方的那个
// Tool.insert(indexFall, emptys)
// Tool.insertEX(indexFall, emptys)
// console.log(emptys)
// emptys.push(indexFall)
// emptys.push(indexFall)
emptys
.
splice
(
i
+
1
,
0
,
indexFall
);
emptys
.
splice
(
i
+
1
,
0
,
indexFall
);
// Tool.removeEle(indexMy,emptys)
//掉落的格子上的元素致null
//掉落的格子上的元素致null
latFall
.
element
=
null
;
latFall
.
element
=
null
;
//长度加了,多加+
//长度加了,多加+
...
@@ -1320,7 +1331,7 @@ export default class MainScene extends Scene {
...
@@ -1320,7 +1331,7 @@ export default class MainScene extends Scene {
* @param callback
* @param callback
*/
*/
fallAni
(
anis
:
any
[],
callback
:
Function
)
{
fallAni
(
anis
:
any
[],
callback
:
Function
)
{
playSound
(
SoundType
.
fall
);
//
playSound(SoundType.fall);
let
count
=
0
;
let
count
=
0
;
let
countAll
=
anis
.
length
;
let
countAll
=
anis
.
length
;
for
(
let
i
=
0
;
i
<
anis
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
anis
.
length
;
i
++
)
{
...
...
egret/src/something/Chapters.ts
View file @
cb2d2ac6
...
@@ -1181,7 +1181,7 @@ export const Chapters: ChapterData[] = [
...
@@ -1181,7 +1181,7 @@ export const Chapters: ChapterData[] = [
],
],
generateLats
:
[
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
],
generateLats
:
[
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
],
elements
:
[
elements
:
[
3
,
1
,
3
,
1
,
1
,
1
,
3
,
1
,
3
,
3
,
3
,
1
,
1
,
1
,
1
,
1
,
3
,
3
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
1
,
0
,
0
,
1
,
1
,
1
,
1
,
0
,
0
,
1
,
0
,
0
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
...
...
egret/src/something/Tool.ts
View file @
cb2d2ac6
...
@@ -148,9 +148,10 @@ export class Tool {
...
@@ -148,9 +148,10 @@ export class Tool {
if
(
num
>
arr
[
i
])
{
if
(
num
>
arr
[
i
])
{
//在arr[i]后加num
//在arr[i]后加num
arr
.
splice
(
i
,
0
,
num
);
arr
.
splice
(
i
,
0
,
num
);
break
return
}
}
}
}
arr
.
push
(
num
)
}
}
/**
/**
* 判断格子是否能掉落,
* 判断格子是否能掉落,
...
@@ -517,6 +518,7 @@ export class Tool {
...
@@ -517,6 +518,7 @@ export class Tool {
* @param generateLats [0,1,1,1,1,1,1,1,0]
* @param generateLats [0,1,1,1,1,1,1,1,0]
*/
*/
public
static
setGenerateLats
(
lattices
:
Lattice
[],
generateLats
:
number
[])
{
public
static
setGenerateLats
(
lattices
:
Lattice
[],
generateLats
:
number
[])
{
var
indexs
=
[]
for
(
var
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
{
for
(
var
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
{
//找每列第一个元素
//找每列第一个元素
for
(
var
g
=
0
;
g
<
Tool
.
rowNum
;
g
++
)
{
for
(
var
g
=
0
;
g
<
Tool
.
rowNum
;
g
++
)
{
...
@@ -524,10 +526,12 @@ export class Tool {
...
@@ -524,10 +526,12 @@ export class Tool {
//如果格子存在,并且该列g的数据为1;
//如果格子存在,并且该列g的数据为1;
if
(
lattices
[
index
]
&&
generateLats
[
m
])
{
if
(
lattices
[
index
]
&&
generateLats
[
m
])
{
lattices
[
index
].
isGenerate
=
true
;
lattices
[
index
].
isGenerate
=
true
;
indexs
[
m
]
=
index
;
break
break
}
}
}
}
}
}
return
indexs
}
}
/**
/**
* 将9*9都转化成01格子
* 将9*9都转化成01格子
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment