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
8d590385
Commit
8d590385
authored
May 08, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
草坪暂存
parent
e071b49f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
MainScene.ts
egret/src/mainScene/MainScene.ts
+10
-0
Tool.ts
egret/src/something/Tool.ts
+12
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
8d590385
...
@@ -6398,6 +6398,7 @@ export default class MainScene extends Scene {
...
@@ -6398,6 +6398,7 @@ export default class MainScene extends Scene {
var
i1idx
=
mainidxs
[
i1
];
var
i1idx
=
mainidxs
[
i1
];
var
i1canturff
=
this
.
judgeTurfing
(
i1idx
);
var
i1canturff
=
this
.
judgeTurfing
(
i1idx
);
var
i1canturft
=
this
.
judgeTurfto
(
i1idx
);
var
i1canturft
=
this
.
judgeTurfto
(
i1idx
);
var
i1data
=
{
var
i1data
=
{
idx
:
i1idx
,
idx
:
i1idx
,
canturff
:
i1canturff
,
canturff
:
i1canturff
,
...
@@ -6409,6 +6410,14 @@ export default class MainScene extends Scene {
...
@@ -6409,6 +6410,14 @@ export default class MainScene extends Scene {
var
i2idx
=
allidxs
[
i2
];
var
i2idx
=
allidxs
[
i2
];
var
i2canturff
=
this
.
judgeTurfing
(
i2idx
);
var
i2canturff
=
this
.
judgeTurfing
(
i2idx
);
var
i2canturft
=
this
.
judgeTurfto
(
i2idx
);
var
i2canturft
=
this
.
judgeTurfto
(
i2idx
);
var
isCannoPn
=
Tool
.
checkIsCannoPn
(
this
.
lattices
[
i2idx
]);
if
(
isCannoPn
){
this
.
turfing
(
i2idx
);
i2canturff
=
true
;
i2canturft
=
false
;
}
var
i2data
=
{
var
i2data
=
{
idx
:
i2idx
,
idx
:
i2idx
,
canturff
:
i2canturff
,
canturff
:
i2canturff
,
...
@@ -6416,6 +6425,7 @@ export default class MainScene extends Scene {
...
@@ -6416,6 +6425,7 @@ export default class MainScene extends Scene {
}
}
alldata
.
push
(
i2data
);
alldata
.
push
(
i2data
);
}
}
//炮台猩猩的直接铺草
var
turidx
=
this
.
recoverArr
.
length
;
var
turidx
=
this
.
recoverArr
.
length
;
var
newturdata
=
{
var
newturdata
=
{
turidx
:
turidx
,
turidx
:
turidx
,
...
...
egret/src/something/Tool.ts
View file @
8d590385
...
@@ -1379,5 +1379,16 @@ export class Tool {
...
@@ -1379,5 +1379,16 @@ export class Tool {
}
}
return
true
;
return
true
;
}
}
//草坪判断是否是炮台,猩猩
public
static
checkIsCannoPn
(
lat
:
Lattice
){
if
(
lat
&&
lat
.
element
){
var
ele
=
lat
.
element
;
if
(
ele
.
type
==
ElementType
.
CANNO
&&!
lat
.
grass
){
return
true
;
}
else
if
(
ele
.
type
==
ElementType
.
Pongo
&&!
ele
.
hasState
(
StateType
.
PongoLockState
)
&&!
lat
.
grass
){
return
true
;
}
}
return
false
;
}
}
}
\ 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