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
87160ec3
Commit
87160ec3
authored
Apr 13, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
猩猩功能暂存
parent
0200efba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
16 deletions
+37
-16
MainScene.ts
egret/src/mainScene/MainScene.ts
+30
-6
Chapter24.ts
egret/src/something/chapters/Chapter24.ts
+2
-2
Element.ts
egret/src/something/class/Element.ts
+5
-8
No files found.
egret/src/mainScene/MainScene.ts
View file @
87160ec3
...
@@ -2629,8 +2629,7 @@ export default class MainScene extends Scene {
...
@@ -2629,8 +2629,7 @@ export default class MainScene extends Scene {
// return;
// return;
// }
// }
if
(
this
.
freepongoArr
.
length
==
1
){
//拍块
if
(
this
.
freepongoArr
.
length
==
1
){
//拍块
console
.
log
(
"有猩猩需要消除"
);
console
.
log
(
"一只猩猩拍块"
);
// console.log("一只猩猩拍块");
// this.pongoPaiKuang(this.freepongoArr[0]);
// this.pongoPaiKuang(this.freepongoArr[0]);
// var pongotl = this.freepongoArr.shift();
// var pongotl = this.freepongoArr.shift();
// if(this.gopongoArr.indexOf(pongotl)==-1){
// if(this.gopongoArr.indexOf(pongotl)==-1){
...
@@ -2639,7 +2638,6 @@ export default class MainScene extends Scene {
...
@@ -2639,7 +2638,6 @@ export default class MainScene extends Scene {
for
(
var
cp
=
0
;
cp
<
this
.
freepongoArr
.
length
;
cp
++
){
for
(
var
cp
=
0
;
cp
<
this
.
freepongoArr
.
length
;
cp
++
){
var
cptl
=
this
.
freepongoArr
[
cp
];
var
cptl
=
this
.
freepongoArr
[
cp
];
if
(
this
.
lattices
[
cptl
]
&&
this
.
lattices
[
cptl
].
element
&&
this
.
lattices
[
cptl
].
element
.
inPongoPart
==
"tl"
){
if
(
this
.
lattices
[
cptl
]
&&
this
.
lattices
[
cptl
].
element
&&
this
.
lattices
[
cptl
].
element
.
inPongoPart
==
"tl"
){
console
.
log
(
"播放猩猩消除特效"
);
var
pongoele
=
this
.
lattices
[
cptl
].
element
;
var
pongoele
=
this
.
lattices
[
cptl
].
element
;
pongoele
.
mainScene
=
this
;
pongoele
.
mainScene
=
this
;
pongoele
.
changePongoStat
(
"body"
);
pongoele
.
changePongoStat
(
"body"
);
...
@@ -2662,7 +2660,7 @@ export default class MainScene extends Scene {
...
@@ -2662,7 +2660,7 @@ export default class MainScene extends Scene {
return
;
return
;
}
}
if
(
this
.
freepongoArr
.
length
>
1
){
//清场
if
(
this
.
freepongoArr
.
length
>
1
){
//清场
console
.
log
(
"有多只猩猩需要消除"
);
// console.log("多只猩猩清场",this.freepongoArr.length,JSON.stringify(this.freepongoArr)
);
// this.pongoClearScene();
// this.pongoClearScene();
// for(var fp=this.freepongoArr.length-1;fp>=0;fp--){
// for(var fp=this.freepongoArr.length-1;fp>=0;fp--){
// var fptl = this.freepongoArr.splice(fp,1)[0];
// var fptl = this.freepongoArr.splice(fp,1)[0];
...
@@ -2673,7 +2671,6 @@ export default class MainScene extends Scene {
...
@@ -2673,7 +2671,6 @@ export default class MainScene extends Scene {
for
(
var
cp
=
0
;
cp
<
this
.
freepongoArr
.
length
;
cp
++
){
for
(
var
cp
=
0
;
cp
<
this
.
freepongoArr
.
length
;
cp
++
){
var
cptl
=
this
.
freepongoArr
[
cp
];
var
cptl
=
this
.
freepongoArr
[
cp
];
if
(
this
.
lattices
[
cptl
]
&&
this
.
lattices
[
cptl
].
element
&&
this
.
lattices
[
cptl
].
element
.
inPongoPart
==
"tl"
){
if
(
this
.
lattices
[
cptl
]
&&
this
.
lattices
[
cptl
].
element
&&
this
.
lattices
[
cptl
].
element
.
inPongoPart
==
"tl"
){
console
.
log
(
"播放猩猩消除特效"
);
var
pongoele
=
this
.
lattices
[
cptl
].
element
;
var
pongoele
=
this
.
lattices
[
cptl
].
element
;
pongoele
.
mainScene
=
this
;
pongoele
.
mainScene
=
this
;
pongoele
.
changePongoStat
(
"body"
);
pongoele
.
changePongoStat
(
"body"
);
...
@@ -3335,6 +3332,14 @@ export default class MainScene extends Scene {
...
@@ -3335,6 +3332,14 @@ export default class MainScene extends Scene {
var
prccol
=
prcdata
.
col
;
var
prccol
=
prcdata
.
col
;
if
(
prcrow
>=
0
&&
prcrow
<
Tool
.
rowNum
&&
prccol
>=
0
&&
prccol
<
Tool
.
colNum
){
if
(
prcrow
>=
0
&&
prcrow
<
Tool
.
rowNum
&&
prccol
>=
0
&&
prccol
<
Tool
.
colNum
){
this
.
checkPongoHVEle
(
prcrow
,
prccol
,
"hor"
);
this
.
checkPongoHVEle
(
prcrow
,
prccol
,
"hor"
);
for
(
var
np
=
0
;
np
<
pcannostatArr
.
length
;
np
++
){
var
npdata
=
pcannostatArr
[
np
];
var
canaddhor
=
this
.
addCannoStatByHor
(
np
,
prcrow
,
prccol
);
if
(
canaddhor
){
npdata
.
ineffect
=
true
;
}
}
}
}
}
}
for
(
var
pc1
=
0
;
pc1
<
pongoc
.
length
;
pc1
++
){
for
(
var
pc1
=
0
;
pc1
<
pongoc
.
length
;
pc1
++
){
...
@@ -3343,6 +3348,14 @@ export default class MainScene extends Scene {
...
@@ -3343,6 +3348,14 @@ export default class MainScene extends Scene {
var
prccol
=
prcdata
.
col
;
var
prccol
=
prcdata
.
col
;
if
(
prcrow
>=
0
&&
prcrow
<
Tool
.
rowNum
&&
prccol
>=
0
&&
prccol
<
Tool
.
colNum
){
if
(
prcrow
>=
0
&&
prcrow
<
Tool
.
rowNum
&&
prccol
>=
0
&&
prccol
<
Tool
.
colNum
){
this
.
checkPongoHVEle
(
prcrow
,
prccol
,
"vir"
);
this
.
checkPongoHVEle
(
prcrow
,
prccol
,
"vir"
);
for
(
var
np
=
0
;
np
<
pcannostatArr
.
length
;
np
++
){
var
npdata
=
pcannostatArr
[
np
];
var
canaddver
=
this
.
addCannoStatByVer
(
np
,
prcrow
,
prccol
);
if
(
canaddver
){
npdata
.
ineffect
=
true
;
}
}
}
}
}
}
...
@@ -5101,18 +5114,29 @@ export default class MainScene extends Scene {
...
@@ -5101,18 +5114,29 @@ export default class MainScene extends Scene {
* 猩猩的相关消除
* 猩猩的相关消除
*/
*/
clearPongoEle
(
pongoidx
:
number
){
clearPongoEle
(
pongoidx
:
number
){
console
.
log
(
"猩猩的相关消除"
);
if
(
this
.
freepongoArr
.
length
==
1
){
if
(
this
.
freepongoArr
.
length
==
1
){
this
.
pongoPaiKuang
(
this
.
freepongoArr
[
0
]);
this
.
pongoPaiKuang
(
this
.
freepongoArr
[
0
]);
}
else
if
(
this
.
freepongoArr
.
length
>
1
){
}
else
if
(
this
.
freepongoArr
.
length
>
1
){
this
.
pongoClearScene
();
this
.
pongoClearScene
();
}
}
// if(this.gopongoArr.indexOf(pongoidx)==-1){
// this.gopongoArr.push(pongoidx);
// }
// if(this.gopongoArr.length==this.freepongoArr.length){
// console.log("猩猩开始消除",JSON.stringify(this.gopongoArr),JSON.stringify(this.freepongoArr))
// this.gopongoArr = new Array();
// this.freepongoArr = new Array();
// }
}
checkEliminatePongo
(
pongoidx
:
number
){
if
(
this
.
gopongoArr
.
indexOf
(
pongoidx
)
==-
1
){
if
(
this
.
gopongoArr
.
indexOf
(
pongoidx
)
==-
1
){
this
.
gopongoArr
.
push
(
pongoidx
);
this
.
gopongoArr
.
push
(
pongoidx
);
}
}
if
(
this
.
gopongoArr
.
length
==
this
.
freepongoArr
.
length
){
if
(
this
.
gopongoArr
.
length
==
this
.
freepongoArr
.
length
){
// console.log("猩猩开始消除",JSON.stringify(this.gopongoArr),JSON.stringify(this.freepongoArr))
this
.
gopongoArr
=
new
Array
();
this
.
gopongoArr
=
new
Array
();
this
.
freepongoArr
=
new
Array
();
this
.
freepongoArr
=
new
Array
();
this
.
eliminate
();
}
}
}
}
}
}
\ No newline at end of file
egret/src/something/chapters/Chapter24.ts
View file @
87160ec3
...
@@ -47,8 +47,8 @@ export const Chapters24: ChapterData[] = [
...
@@ -47,8 +47,8 @@ export const Chapters24: ChapterData[] = [
1
,
1
,
1
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
2
,
1
,
1
,
1
,
4
,
4
,
1
,
1
,
2
,
1
,
2
,
1
,
1
,
4
,
4
,
1
,
1
,
2
,
1
,
2
,
1
,
23
,
23
,
23
,
23
,
1
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
1
,
1
,
1
,
23
,
23
,
23
,
23
,
23
,
23
,
1
,
23
,
23
,
23
,
23
23
,
23
,
23
,
23
,
1
,
1
,
1
,
23
,
23
],
baseElements
:
[
],
baseElements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
...
...
egret/src/something/class/Element.ts
View file @
87160ec3
...
@@ -321,7 +321,7 @@ export class Element extends eui.Component {
...
@@ -321,7 +321,7 @@ export class Element extends eui.Component {
this
.
pongoMvend
=
101
;
this
.
pongoMvend
=
101
;
this
.
pongoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
pongoFrameAni
,
this
);
this
.
pongoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
pongoFrameAni
,
this
);
egret
.
ticker
.
$startTick
(
this
.
update
,
this
);
//
egret.ticker.$startTick(this.update,this);
}
}
initPongoMvLeftJio
(){
initPongoMvLeftJio
(){
var
boxwidth
=
80
;
var
boxwidth
=
80
;
...
@@ -351,7 +351,7 @@ export class Element extends eui.Component {
...
@@ -351,7 +351,7 @@ export class Element extends eui.Component {
//调整猩猩显示
//调整猩猩显示
changePongoStop
(
type
:
string
){
changePongoStop
(
type
:
string
){
var
curframe
=
this
.
pongoMoveClip
.
currentFrame
;
var
curframe
=
this
.
pongoMoveClip
.
currentFrame
;
console
.
log
(
"当前猩猩cur"
+
curframe
);
//
console.log("当前猩猩cur"+curframe);
if
(
type
==
"add"
){
if
(
type
==
"add"
){
curframe
+=
10
;
curframe
+=
10
;
}
else
if
(
type
==
"cut"
){
}
else
if
(
type
==
"cut"
){
...
@@ -398,7 +398,7 @@ export class Element extends eui.Component {
...
@@ -398,7 +398,7 @@ export class Element extends eui.Component {
// }
// }
if
(
curframe
==
(
this
.
pongoMvend
-
1
)){
if
(
curframe
==
(
this
.
pongoMvend
-
1
)){
if
(
this
.
ispongoMvloop
){
if
(
this
.
ispongoMvloop
){
console
.
log
(
"重播猩猩"
);
//
console.log("重播猩猩");
this
.
pongoMoveClip
.
gotoAndPlay
(
this
.
pongoMvstart
,
1
);
this
.
pongoMoveClip
.
gotoAndPlay
(
this
.
pongoMvstart
,
1
);
}
else
{
}
else
{
if
((
curframe
==
230
||
curframe
==
350
)
&&
this
.
goFree
){
if
((
curframe
==
230
||
curframe
==
350
)
&&
this
.
goFree
){
...
@@ -419,7 +419,8 @@ export class Element extends eui.Component {
...
@@ -419,7 +419,8 @@ export class Element extends eui.Component {
alpha
:
0.2
alpha
:
0.2
},
600
)
},
600
)
.
call
(()
=>
{
.
call
(()
=>
{
this
.
mainScene
.
eliminate
();
// this.mainScene.eliminate();
this
.
mainScene
.
checkEliminatePongo
(
this
.
index
);
})
})
}
}
}
}
...
@@ -428,14 +429,12 @@ export class Element extends eui.Component {
...
@@ -428,14 +429,12 @@ export class Element extends eui.Component {
}
}
//猩猩脚的动画
//猩猩脚的动画
pongoRmLeftJio
(){
pongoRmLeftJio
(){
console
.
log
(
"猩猩左脚动画播放完毕"
);
this
.
pongoMvLeftJio
.
stop
();
this
.
pongoMvLeftJio
.
stop
();
if
(
this
.
pongoMvLeftJio
.
parent
){
if
(
this
.
pongoMvLeftJio
.
parent
){
this
.
pongoMvLeftJio
.
parent
.
removeChild
(
this
.
pongoMvLeftJio
);
this
.
pongoMvLeftJio
.
parent
.
removeChild
(
this
.
pongoMvLeftJio
);
}
}
}
}
pongoRmRightJio
(){
pongoRmRightJio
(){
console
.
log
(
"猩猩右脚动画播放完毕"
);
this
.
pongoMvRightJio
.
stop
();
this
.
pongoMvRightJio
.
stop
();
if
(
this
.
pongoMvRightJio
.
parent
){
if
(
this
.
pongoMvRightJio
.
parent
){
this
.
pongoMvRightJio
.
parent
.
removeChild
(
this
.
pongoMvRightJio
);
this
.
pongoMvRightJio
.
parent
.
removeChild
(
this
.
pongoMvRightJio
);
...
@@ -536,7 +535,6 @@ export class Element extends eui.Component {
...
@@ -536,7 +535,6 @@ export class Element extends eui.Component {
this
.
lessPart
.
push
(
part
);
this
.
lessPart
.
push
(
part
);
}
}
}
}
console
.
log
(
"剩余显示"
,
this
.
lessPart
);
}
}
update
(
t
:
number
){
update
(
t
:
number
){
// if(this.pongoMoveClip&&this.pongoMoveClip.numChildren>10){
// if(this.pongoMoveClip&&this.pongoMoveClip.numChildren>10){
...
@@ -550,7 +548,6 @@ export class Element extends eui.Component {
...
@@ -550,7 +548,6 @@ export class Element extends eui.Component {
}
}
addDisable
(){
addDisable
(){
if
(
this
.
inPongoPart
&&
this
.
inPongoPart
==
"tl"
){
if
(
this
.
inPongoPart
&&
this
.
inPongoPart
==
"tl"
){
console
.
log
(
"猩猩消除ticker"
);
if
(
this
.
pongoMoveClip
&&
this
.
pongoMoveClip
.
parent
){
if
(
this
.
pongoMoveClip
&&
this
.
pongoMoveClip
.
parent
){
this
.
pongoMoveClip
.
parent
.
removeChild
(
this
.
pongoMoveClip
);
this
.
pongoMoveClip
.
parent
.
removeChild
(
this
.
pongoMoveClip
);
}
}
...
...
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