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
8fae03ac
Commit
8fae03ac
authored
Feb 28, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
77331f5c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
MainScene.ts
egret/src/mainScene/MainScene.ts
+8
-3
doSandAI.ts
egret/src/mainScene/doSandAI.ts
+2
-0
createCandySubAni.ts
egret/src/something/anis/candy/createCandySubAni.ts
+1
-0
BaseBlock.ts
egret/src/something/block/BaseBlock.ts
+2
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
8fae03ac
...
...
@@ -627,7 +627,7 @@ export default class MainScene extends Scene {
}
else
if
(
isSand
(
latticesD
[
i
]))
{
latticeDisplay
=
getSandDisplayBlock
();
this
.
lattices
[
i
].
sand
=
latticeDisplay
as
Sand
;
}
else
if
(
isBlock
(
latticesD
[
i
]))
{
}
else
{
latticeDisplay
=
genBlockDisplay
(
latticesD
[
i
]);
this
.
lattices
[
i
].
block
=
latticeDisplay
as
BaseBlock
;
}
...
...
@@ -2051,7 +2051,12 @@ export default class MainScene extends Scene {
return
;
};
//消除结束之后检查石门
await
this
.
checkAllBlock
();
const
blockResult
=
await
this
.
checkAllBlock
();
if
(
blockResult
&&
blockResult
.
length
&&
blockResult
.
some
(
item
=>
item
))
{
console
.
log
(
'有至少一个门翻转过来了'
,
blockResult
);
this
.
eliminate
();
return
;
}
//检查糖果
const
candyResult
=
await
this
.
checkAllCandy
();
if
(
candyResult
)
{
//是不是有融化了的
...
...
@@ -3086,7 +3091,7 @@ export default class MainScene extends Scene {
lat
.
sand
=
null
;
const
p
=
Tool
.
getPositionByIndex
(
lat
.
index
);
// this.playAni(RecoverName.SAND_ANI, p);
createSandDisAni
(
p
[
0
],
p
[
1
],
this
)
createSandDisAni
(
p
[
0
],
p
[
1
],
this
)
}
}
...
...
egret/src/mainScene/doSandAI.ts
View file @
8fae03ac
...
...
@@ -50,6 +50,8 @@ const judgeActionIndex = (index: number, lattices: Lattice[]): number => {
!
lattices
[
i
].
element
.
hasAnyState
()
&&
!
lattices
[
i
].
element
.
candy
&&
!
lattices
[
i
].
sand
&&
!
lattices
[
i
].
block
&&
!
lattices
[
i
].
ice
&&
!
lattices
[
i
].
element
.
monster
)
{
return
i
...
...
egret/src/something/anis/candy/createCandySubAni.ts
View file @
8fae03ac
...
...
@@ -2,6 +2,7 @@ import { getEffectFramesStr } from "../../../effect/createEffect1";
import
MovieClip
from
"../../../movieclip/MovieClip"
;
export
const
createCandySubAni
=
(
x
,
y
,
p
)
=>
{
if
(
!
p
)
return
;
const
spritesheet
=
RES
.
getRes
(
'candysub_json'
);
if
(
!
spritesheet
)
return
;
const
list
=
getEffectFramesStr
(
'数字减少星星_000'
,
0
,
15
);
...
...
egret/src/something/block/BaseBlock.ts
View file @
8fae03ac
...
...
@@ -64,11 +64,12 @@ export default class BaseBlock extends egret.DisplayObjectContainer {
private
_state
=
-
1
;
private
_changing
=
false
;
async
nextState
(
first
=
false
)
{
//先改数据再改视图
const
isState2
=
this
.
_state
==
2
;
this
.
_state
++
;
if
(
this
.
_state
>
5
)
this
.
_state
=
0
;
await
this
.
changeState
(
first
);
return
isState2
;
}
private
updateElementState
()
{
...
...
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