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
c49cdf1e
Commit
c49cdf1e
authored
Feb 26, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2e5c2c2c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
122 deletions
+62
-122
MainScene.ts
egret/src/mainScene/MainScene.ts
+14
-6
Sand.ts
egret/src/something/Sand.ts
+19
-0
SandAni.ts
egret/src/something/anis/SandAni.ts
+26
-0
Lattice.ts
egret/src/something/class/Lattice.ts
+2
-1
RecoverName.ts
egret/src/something/enum/RecoverName.ts
+1
-0
home.json
mock/happyclear/home.json
+0
-115
No files found.
egret/src/mainScene/MainScene.ts
View file @
c49cdf1e
...
...
@@ -98,10 +98,13 @@ import doHoneyPotAI from './doHoneyPotAI';
import
doMonsterAI
from
'./doMonsterAI'
;
import
jellyMonsterAI
from
'./jellyMonsterAI'
;
import
{
createHoneyDisAni
}
from
'../effect/createHoneyDisAni'
;
import
Sand
,
{
getSandDisplayBlock
}
from
'../something/Sand'
;
import
{
SandAni
}
from
'../something/anis/SandAni'
;
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
"IceAni"
:
IceAni
,
"SandAni"
:
SandAni
,
"RockAni"
:
RockAni
,
"HorizontalAni"
:
HorizontalAni
,
"VerticalAni"
:
VerticalAni
,
...
...
@@ -620,13 +623,13 @@ export default class MainScene extends Scene {
latticeDisplay
=
ice
;
this
.
lattices
[
i
].
ice
=
ice
;
}
else
if
(
isSand
(
latticesD
[
i
]))
{
// latticeDisplay = genBlockDisplay(latticesD[i]
);
// this.lattices[i].block = latticeDisplay as BaseBlock
;
}
else
if
(
isBlock
(
latticesD
[
i
]))
{
latticeDisplay
=
getSandDisplayBlock
(
);
this
.
lattices
[
i
].
sand
=
latticeDisplay
as
Sand
;
}
else
if
(
isBlock
(
latticesD
[
i
]))
{
latticeDisplay
=
genBlockDisplay
(
latticesD
[
i
]);
this
.
lattices
[
i
].
block
=
latticeDisplay
as
BaseBlock
;
}
if
(
latticeDisplay
)
{
if
(
latticeDisplay
)
{
this
.
map
.
addChild
(
latticeDisplay
);
latticeDisplay
.
x
=
p
[
0
];
latticeDisplay
.
y
=
p
[
1
];
...
...
@@ -3075,8 +3078,13 @@ export default class MainScene extends Scene {
const
p
=
Tool
.
getPositionByIndex
(
lat
.
index
);
//动画
this
.
playAni
(
RecoverName
.
ICE_ANI
,
p
);
}
else
if
(
lat
.
sand
)
{
lat
.
sand
&&
lat
.
sand
.
parent
&&
lat
.
sand
.
parent
.
removeChild
(
lat
.
sand
);
this
.
goElementTarget
(
ElementType
.
SAND
,
[
lat
.
sand
.
x
,
lat
.
sand
.
y
]);
lat
.
sand
=
null
;
const
p
=
Tool
.
getPositionByIndex
(
lat
.
index
);
this
.
playAni
(
RecoverName
.
SAND_ANI
,
p
);
}
}
goElementTarget
(
type
:
ElementType
,
fromP
:
number
[])
{
...
...
egret/src/something/Sand.ts
0 → 100644
View file @
c49cdf1e
import
centerAnchor
from
"./block/centerAnchor"
;
export
default
class
Sand
extends
egret
.
Sprite
{
constructor
()
{
super
();
const
sand
=
new
egret
.
Bitmap
(
RES
.
getRes
(
"ele36_png"
));
this
.
addChild
(
sand
);
centerAnchor
(
sand
);
}
}
export
const
getSandDisplayBlock
=
()
=>
{
return
new
Sand
();
}
\ No newline at end of file
egret/src/something/anis/SandAni.ts
0 → 100644
View file @
c49cdf1e
import
{
Ani
}
from
"../class/Ani"
;
import
{
ImageAni
}
from
"../class/ImageAni"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
//原点已是中心
export
class
SandAni
extends
Ani
{
/**
* 图片
*/
showImage
:
ImageAni
;
constructor
()
{
super
();
this
.
aniName
=
"SandAni"
;
this
.
showImage
=
new
ImageAni
([
"ele"
+
ElementType
.
ICE
+
"_png"
,
"ice2_png"
,
"ice3_png"
,
"ice4_png"
,
"ice5_png"
,
"ice6_png"
]);
this
.
addChild
(
this
.
showImage
)
}
play
()
{
//重置图片
this
.
showImage
.
currentFrame
=
0
;
this
.
showImage
.
source
=
this
.
showImage
.
sourceAll
[
0
];
this
.
showImage
.
play
(()
=>
{
this
.
recover
();
})
}
}
\ No newline at end of file
egret/src/something/class/Lattice.ts
View file @
c49cdf1e
...
...
@@ -2,6 +2,7 @@ import BaseBlock from "../block/BaseBlock";
import
{
Tool
}
from
"../Tool"
;
import
{
Element
}
from
"./Element"
;
import
{
Ice
}
from
"./Ice"
;
import
Sand
from
"../Sand"
;
/**
* 位置信息直接用一个二维数组记录,然后用row,col取
...
...
@@ -18,7 +19,7 @@ export class Lattice {
* 石门,冰石门,深冰石门
*/
block
:
BaseBlock
;
sand
:
BaseBlock
;
sand
:
Sand
;
/**
* 上面的元素(null,消除元素,石头,冰激凌等),
*/
...
...
egret/src/something/enum/RecoverName.ts
View file @
c49cdf1e
...
...
@@ -47,6 +47,7 @@ export enum RecoverName {
//所有继承ani的,能单独播放的,不带回调的
ROCK_ANI
=
"RockAni"
,
ICE_ANI
=
"IceAni"
,
SAND_ANI
=
"SandAni"
,
BOOM_ANI
=
"BoomAni"
,
CANDY_DIS_ANI
=
"CandyDisAni"
,
ELEDIS_ANI
=
"EleDisAni"
,
...
...
mock/happyclear/home.json
View file @
c49cdf1e
...
...
@@ -2272,121 +2272,6 @@
"levelNum"
:
452
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
453
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
454
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
455
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
456
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
457
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
458
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
459
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
460
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
461
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
462
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
463
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
464
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
465
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
466
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
467
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
468
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
469
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
470
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
471
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
472
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
473
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
474
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
475
,
"maxScore"
:
47440
,
"stars"
:
1
}
],
...
...
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