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
b6fecd81
Commit
b6fecd81
authored
Jun 02, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
樱花元素暂存
parent
8d38115d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
MainScene.ts
egret/src/mainScene/MainScene.ts
+7
-8
getChapter.ts
egret/src/something/chapters/getChapter.ts
+0
-1
shuzhi.ts
egret/src/something/class/shuzhi.ts
+0
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
b6fecd81
...
@@ -1391,7 +1391,6 @@ export default class MainScene extends Scene {
...
@@ -1391,7 +1391,6 @@ export default class MainScene extends Scene {
console
.
error
(
"检查樱花分布"
,
idx
,
lastidx
,
i
,
j
);
console
.
error
(
"检查樱花分布"
,
idx
,
lastidx
,
i
,
j
);
}
}
if
(
szp
){
if
(
szp
){
console
.
log
(
"树枝位置"
,
szp
[
0
],
szp
[
1
]);
let
onesz
=
new
shuzhi
();
let
onesz
=
new
shuzhi
();
onesz
.
name
=
"sz_"
+
idx
+
"_"
+
lastidx
;
onesz
.
name
=
"sz_"
+
idx
+
"_"
+
lastidx
;
onesz
.
x
=
szp
[
0
];
onesz
.
x
=
szp
[
0
];
...
@@ -1408,7 +1407,6 @@ export default class MainScene extends Scene {
...
@@ -1408,7 +1407,6 @@ export default class MainScene extends Scene {
}
else
{
}
else
{
ele
.
reset
(
ElementType
.
cherry
);
ele
.
reset
(
ElementType
.
cherry
);
}
}
console
.
log
(
"樱花位置"
,
p
[
0
],
p
[
1
]);
ele
.
x
=
p
[
0
];
ele
.
x
=
p
[
0
];
ele
.
y
=
p
[
1
];
ele
.
y
=
p
[
1
];
...
@@ -3185,7 +3183,7 @@ export default class MainScene extends Scene {
...
@@ -3185,7 +3183,7 @@ export default class MainScene extends Scene {
this
.
waitCherry
=
true
;
this
.
waitCherry
=
true
;
return
;
return
;
}
else
{
}
else
{
console
.
log
(
"樱花消除完毕,自动掉落"
);
//
console.log("樱花消除完毕,自动掉落");
}
}
//没有可消除元素,执行掉落,
//没有可消除元素,执行掉落,
// setTimeout(() => {
// setTimeout(() => {
...
@@ -7505,7 +7503,7 @@ export default class MainScene extends Scene {
...
@@ -7505,7 +7503,7 @@ export default class MainScene extends Scene {
}
}
//激活樱花
//激活樱花
activeCherry
(
idx
:
number
){
activeCherry
(
idx
:
number
){
console
.
log
(
"1消除樱花----------------------"
,
idx
);
//
console.log("1消除樱花----------------------",idx);
var
lat
=
this
.
lattices
[
idx
];
var
lat
=
this
.
lattices
[
idx
];
var
ele
=
this
.
lattices
[
idx
].
element
;
var
ele
=
this
.
lattices
[
idx
].
element
;
ele
.
activeCherry
();
ele
.
activeCherry
();
...
@@ -7519,7 +7517,7 @@ export default class MainScene extends Scene {
...
@@ -7519,7 +7517,7 @@ export default class MainScene extends Scene {
//消除自身时,把连接自身的棍消除
//消除自身时,把连接自身的棍消除
this
.
removeCherryGun
(
idx
,
nearidxs
);
this
.
removeCherryGun
(
idx
,
nearidxs
);
console
.
log
(
"2消除樱花----------------------"
,
JSON
.
stringify
(
nearidxs
));
//
console.log("2消除樱花----------------------",JSON.stringify(nearidxs));
// var pro2 = new Promise(res=>{
// var pro2 = new Promise(res=>{
// setTimeout(() => {
// setTimeout(() => {
// res();
// res();
...
@@ -7535,7 +7533,7 @@ export default class MainScene extends Scene {
...
@@ -7535,7 +7533,7 @@ export default class MainScene extends Scene {
this
.
activeCherry
(
nidx
);
this
.
activeCherry
(
nidx
);
}
}
}
}
},
3
00
);
},
1
00
);
}
}
//樱花动画
//樱花动画
playCherryAni
(
idx
:
number
){
playCherryAni
(
idx
:
number
){
...
@@ -7549,13 +7547,12 @@ export default class MainScene extends Scene {
...
@@ -7549,13 +7547,12 @@ export default class MainScene extends Scene {
oneani
.
x
=
p
[
0
];
oneani
.
x
=
p
[
0
];
oneani
.
y
=
p
[
1
];
oneani
.
y
=
p
[
1
];
this
.
effectContainer
.
addChild
(
oneani
);
this
.
effectContainer
.
addChild
(
oneani
);
console
.
log
(
"樱花动画"
);
egret
.
Tween
.
get
(
oneani
)
egret
.
Tween
.
get
(
oneani
)
.
to
({
.
to
({
alpha
:
0
,
alpha
:
0
,
scaleX
:
2
,
scaleX
:
2
,
scaleY
:
2
scaleY
:
2
},
8
00
)
},
5
00
)
.
call
(()
=>
{
.
call
(()
=>
{
var
lat
=
this
.
lattices
[
idx
];
var
lat
=
this
.
lattices
[
idx
];
var
ele
=
lat
.
element
;
var
ele
=
lat
.
element
;
...
@@ -7576,6 +7573,8 @@ export default class MainScene extends Scene {
...
@@ -7576,6 +7573,8 @@ export default class MainScene extends Scene {
this
.
eliminate
();
this
.
eliminate
();
}
}
}
}
//移除樱花动画
this
.
effectContainer
.
removeChild
(
oneani
);
})
})
}
}
//获取相邻樱花
//获取相邻樱花
...
...
egret/src/something/chapters/getChapter.ts
View file @
b6fecd81
...
@@ -89,7 +89,6 @@ chapters.forEach((chapter,index) => {
...
@@ -89,7 +89,6 @@ chapters.forEach((chapter,index) => {
*/
*/
export
function
getChapterData
(
index
:
number
):
ChapterData
{
export
function
getChapterData
(
index
:
number
):
ChapterData
{
//没有数据就返回第一关数据
//没有数据就返回第一关数据
return
chapters
[
801
];
return
chapters
[
index
]
||
chapters
[
1
];
return
chapters
[
index
]
||
chapters
[
1
];
}
}
...
...
egret/src/something/class/shuzhi.ts
View file @
b6fecd81
...
@@ -23,6 +23,5 @@ export default class shuzhi extends egret.Bitmap{
...
@@ -23,6 +23,5 @@ export default class shuzhi extends egret.Bitmap{
roa
=
90
;
roa
=
90
;
}
}
this
.
rotation
=
roa
;
this
.
rotation
=
roa
;
console
.
log
(
"树枝啦啦啦啦"
,
this
);
}
}
}
}
\ No newline at end of file
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