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
13da983c
Commit
13da983c
authored
Mar 31, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
特效充能暂存
parent
722fd25f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
18 deletions
+31
-18
MainScene.ts
egret/src/mainScene/MainScene.ts
+31
-18
No files found.
egret/src/mainScene/MainScene.ts
View file @
13da983c
...
@@ -2383,7 +2383,7 @@ export default class MainScene extends Scene {
...
@@ -2383,7 +2383,7 @@ export default class MainScene extends Scene {
},
200
)
},
200
)
}
else
{
}
else
{
//新大炮充能
//新大炮充能
console
.
log
(
"新炮台充能"
,
JSON
.
parse
(
JSON
.
stringify
(
pcannostatArr
)));
//
console.log("新炮台充能",JSON.parse(JSON.stringify(pcannostatArr)));
for
(
var
np
=
0
;
np
<
pcannostatArr
.
length
;
np
++
){
for
(
var
np
=
0
;
np
<
pcannostatArr
.
length
;
np
++
){
var
npdata
=
pcannostatArr
[
np
];
var
npdata
=
pcannostatArr
[
np
];
var
npineffect
=
npdata
.
ineffect
;
var
npineffect
=
npdata
.
ineffect
;
...
@@ -2392,7 +2392,11 @@ export default class MainScene extends Scene {
...
@@ -2392,7 +2392,11 @@ export default class MainScene extends Scene {
if
(
npineffect
){
if
(
npineffect
){
npadd
=
1
;
npadd
=
1
;
}
else
{
}
else
{
npadd
=
npaddnum
;
if
(
npaddnum
>
2
){
npadd
=
npaddnum
;
}
else
{
npadd
=
npaddnum
;
}
}
}
var
npcanno
=
this
.
cannoArr
[
np
].
ele
;
var
npcanno
=
this
.
cannoArr
[
np
].
ele
;
// console.log("新炮台充能",np,npadd)
// console.log("新炮台充能",np,npadd)
...
@@ -2434,23 +2438,23 @@ export default class MainScene extends Scene {
...
@@ -2434,23 +2438,23 @@ export default class MainScene extends Scene {
}
}
//炮台充能发射
//炮台充能发射
var
emitcanno
:
Element
;
//
var emitcanno:Element;
if
(
this
.
readyCannoArr
.
length
>
0
){
if
(
this
.
readyCannoArr
.
length
>
0
){
var
readyCannoIdx
=
this
.
readyCannoArr
[
0
];
// var readyCannoIdx = this.readyCannoArr[0];
emitcanno
=
this
.
cannoArr
[
readyCannoIdx
].
ele
;
// emitcanno = this.cannoArr[readyCannoIdx].ele;
}
// for(var p=0;p<this.cannoArr.length;p++){
for
(
var
p
=
0
;
p
<
this
.
readyCannoArr
.
length
;
p
++
){
// var pcanno = this.cannoArr[p].ele;
var
preadyCannoIdx
=
this
.
readyCannoArr
[
p
];
// var pcannostat = pcanno.checkCannoStat();
var
pemitcanno
=
this
.
cannoArr
[
preadyCannoIdx
].
ele
;
// if(pcannostat){
this
.
fireCanno
(
pemitcanno
);
// emitcanno = pcanno;
}
// break;
// }
// }
if
(
emitcanno
){
this
.
fireCanno
(
emitcanno
);
return
;
return
;
}
}
// if(emitcanno){
// this.fireCanno(emitcanno);
// return;
// }
if
(
this
.
_converyorTag
)
{
if
(
this
.
_converyorTag
)
{
...
@@ -2658,8 +2662,17 @@ export default class MainScene extends Scene {
...
@@ -2658,8 +2662,17 @@ export default class MainScene extends Scene {
* 炮台发射完毕,开始炮台消除
* 炮台发射完毕,开始炮台消除
*/
*/
callBackFireCanno
(
canno
:
Element
){
callBackFireCanno
(
canno
:
Element
){
this
.
eliminate
();
var
cannoidx
=
canno
.
index
;
this
.
readyCannoArr
.
shift
();
for
(
var
i
=
0
;
i
<
this
.
readyCannoArr
.
length
;
i
++
){
var
ireadycannoidx
=
this
.
cannoArr
[
this
.
readyCannoArr
[
i
]].
idx
;
if
(
ireadycannoidx
==
cannoidx
){
this
.
readyCannoArr
.
splice
(
i
,
1
);
break
;
}
}
if
(
this
.
readyCannoArr
.
length
==
0
){
this
.
eliminate
();
}
canno
.
resetCannoStat
();
canno
.
resetCannoStat
();
}
}
checkAllBlock
()
{
checkAllBlock
()
{
...
...
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