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
bd1f14de
Commit
bd1f14de
authored
Mar 31, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
66e558cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+46
-0
No files found.
egret/src/mainScene/MainScene.ts
View file @
bd1f14de
...
@@ -3894,4 +3894,50 @@ export default class MainScene extends Scene {
...
@@ -3894,4 +3894,50 @@ export default class MainScene extends Scene {
RES
.
getResAsync
(
'playSceneBg_jpg'
)
RES
.
getResAsync
(
'playSceneBg_jpg'
)
]);
]);
}
}
//新大炮充能
//相邻加
addCannoStatByNext
(
cannoid
:
number
,
eleidx
:
number
){
if
(
!
this
.
lattices
[
eleidx
]
||
!
this
.
lattices
[
eleidx
].
element
)
return
false
;
var
cannoidx
:
number
=
this
.
cannoArr
[
cannoid
].
idx
;
var
isnext
=
Tool
.
checkNebByidx
(
cannoidx
,
eleidx
);
var
ele
=
this
.
lattices
[
eleidx
].
element
;
if
(
isnext
&&
Tool
.
judgeChosen
(
ele
)){
return
true
;
}
else
{
return
false
;
}
}
//横向特效加
addCannoStatByHor
(
cannoid
:
number
,
row
:
number
,
col
:
number
){
var
cannoidx
:
number
=
this
.
cannoArr
[
cannoid
].
idx
;
var
cannorc
=
Tool
.
indexToRc
(
cannoidx
);
var
cannorow
=
cannorc
[
0
];
var
cannocol
=
cannorc
[
1
];
var
addhor
:
boolean
=
false
;
if
(
cannocol
>
col
){
for
(
var
i
=
0
;
i
<
Tool
.
colNum
;
i
++
){
var
eleidx
=
Tool
.
rcToIndex
(
row
,
i
);
if
(
!
this
.
lattices
[
eleidx
]
||
!
this
.
lattices
[
eleidx
].
element
)
continue
;
var
lat
=
this
.
lattices
[
eleidx
];
var
iscannoblock
=
Tool
.
judgeIscannoBlock
(
lat
);
if
(
iscannoblock
){
break
;
}
if
(
cannorow
==
row
){
if
(
cannocol
==
i
){
addhor
=
true
;
break
;
}
}
else
{
var
addhortemp
=
this
.
addCannoStatByNext
(
cannoid
,
eleidx
);
if
(
addhortemp
){
addhor
=
true
;
break
;
}
}
}
}
}
}
}
\ 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