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
24b122e3
Commit
24b122e3
authored
Jun 05, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改石门内河豚的问题
parent
213c27b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
doFishAI.ts
egret/src/mainScene/doFishAI.ts
+7
-3
Element.ts
egret/src/something/class/Element.ts
+2
-1
Food.ts
egret/src/something/class/Food.ts
+2
-2
No files found.
egret/src/mainScene/doFishAI.ts
View file @
24b122e3
...
...
@@ -5,6 +5,7 @@ import { Tool } from "../something/Tool";
import
{
Lattice
}
from
"../something/class/Lattice"
;
import
{
RecoverName
}
from
"../something/enum/RecoverName"
;
import
{
StateType
}
from
"../something/enum/StateType"
;
import
Block
from
"../something/block/Block"
;
/**
* fish爆炸
*/
...
...
@@ -15,9 +16,12 @@ export default async (thisObj: MainScene) => {
for
(
var
i
=
0
;
i
<
thisObj
.
lattices
.
length
;
i
++
)
{
const
lattice
=
thisObj
.
lattices
[
i
]
if
(
lattice
&&
lattice
.
element
&&
lattice
.
element
.
type
==
ElementType
.
FISH
&&
lattice
.
element
.
isNeb
)
{
lattice
.
element
.
fishCanEliFlag
=
true
;
indexs
.
push
(
lattice
.
index
);
thisObj
.
eliminatedElements
.
push
(
lattice
.
index
);
// console.log("遗漏河豚---",lattice.element.hasState(StateType.BLOCK_LOCK));
if
(
!
lattice
.
element
.
hasState
(
StateType
.
BLOCK_LOCK
)){
lattice
.
element
.
fishCanEliFlag
=
true
;
indexs
.
push
(
lattice
.
index
);
thisObj
.
eliminatedElements
.
push
(
lattice
.
index
);
}
}
}
...
...
egret/src/something/class/Element.ts
View file @
24b122e3
...
...
@@ -72,9 +72,10 @@ export class Element extends eui.Component {
}
}
async
nextFishState
()
{
// console.log("河豚充能");
// console.log("河豚充能"
,this.hasState(StateType.BLOCK_LOCK),this.index
);
await
wait
(
1000
);
this
.
_fishState
++
;
// console.log(this._fishState,this.index);
if
(
this
.
_fishState
==
1
)
{
this
[
'fish'
].
toActive
();
}
...
...
egret/src/something/class/Food.ts
View file @
24b122e3
...
...
@@ -60,7 +60,7 @@ export default class Food extends eui.Component{
var
icol
:
number
=
[
this
.
usecol
,
this
.
userow
][
inidx
];
//row和col反了
console
.
log
(
this
.
type
+
'食物占位'
+
inidx
+
'row:'
+
irow
+
';col:'
+
icol
);
//
console.log(this.type+'食物占位'+inidx+'row:'+irow+';col:'+icol);
this
.
lockidxs
=
new
Array
();
this
.
freeidxs
=
new
Array
();
for
(
var
i
=
0
;
i
<
icol
;
i
++
){
...
...
@@ -70,7 +70,7 @@ export default class Food extends eui.Component{
this
.
lockidxs
.
push
(
latidx
);
}
}
console
.
log
(
'解锁idxs'
,
this
.
lockidxs
);
//
console.log('解锁idxs',this.lockidxs);
this
.
showImage
.
rotation
=
roa
;
...
...
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