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
fb53ec69
Commit
fb53ec69
authored
Jan 16, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
75d8750d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
24 deletions
+40
-24
MainScene.ts
egret/src/mainScene/MainScene.ts
+6
-1
Chapter14.ts
egret/src/something/chapters/Chapter14.ts
+8
-6
Element.ts
egret/src/something/class/Element.ts
+26
-17
No files found.
egret/src/mainScene/MainScene.ts
View file @
fb53ec69
...
...
@@ -3012,7 +3012,12 @@ export default class MainScene extends Scene {
let
index
=
indexs
[
i
];
let
lat
=
this
.
lattices
[
index
];
if
(
lat
&&
lat
.
element
&&
lat
.
element
.
type
==
ElementType
.
FIREWORKS_SHOOTER
)
{
console
.
log
(
fireworksTypeMap
(
ele
.
type
));
const
type
=
fireworksTypeMap
[
ele
.
type
];
if
(
this
.
passElements
&&
this
.
passElements
[
type
]
!=
undefined
)
{
lat
.
element
.
canFire
&&
lat
.
element
.
fire
();
// this.goElementTarget(type, [this.stage.stageWidth/2, this.stage.stageHeight/2]);
this
.
goElementTarget
(
type
,
[
ele
.
x
,
ele
.
y
]);
}
}
}
}
...
...
egret/src/something/chapters/Chapter14.ts
View file @
fb53ec69
...
...
@@ -153,11 +153,11 @@ export const Chapters14: ChapterData[] = [
baseElementTypes
:
[
0
,
2
,
3
,
4
],
bubbleProbability
:
0
,
stepCount
:
26
,
passTarget
:
{
type
:
1
,
elements
:
[
// { type: 22, count: 5 },
// { type: 23, count: 1 },
{
type
:
24
,
count
:
2
},
{
type
:
25
,
count
:
3
},
{
type
:
26
,
count
:
4
}
// { type: 22, count: 5
0
},
// { type: 23, count: 1
0
},
{
type
:
24
,
count
:
2
0
},
{
type
:
25
,
count
:
3
00
},
{
type
:
26
,
count
:
4
00
}
]
},
starScores
:
[
15000
,
20000
,
25000
],
...
...
@@ -165,7 +165,9 @@ export const Chapters14: ChapterData[] = [
lattices
:
[
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
3
,
0
,
6
,
0
,
3
,
0
,
6
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
],
connectedLats
:
[],
elements
:
[
1
,
13
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
1
,
1
,
1
,
2
,
1
,
1
,
1
,
4
,
1
,
4
,
1
,
1
,
1
,
4
,
1
,
4
,
1
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
1
,
4
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
4
,
4
,
2
,
4
,
2
,
4
,
2
,
4
,
2
,
4
,
1
,
4
,
2
,
4
,
2
,
4
,
2
,
4
,
1
],
baseElements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
recycles
:
[],
generateLats
:
[{
index
:
1
,
type
:
null
},
{
index
:
2
,
type
:
null
},
{
index
:
3
,
type
:
null
},
{
index
:
4
,
type
:
null
},
{
index
:
5
,
type
:
null
},
{
index
:
6
,
type
:
null
},
{
index
:
7
,
type
:
null
},
{
index
:
9
,
type
:
null
},
{
index
:
17
,
type
:
null
}]
elements
:
[
1
,
13
,
1
,
1
,
1
,
1
,
13
,
1
,
1
,
1
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
1
,
1
,
1
,
2
,
1
,
1
,
1
,
4
,
1
,
4
,
1
,
1
,
1
,
4
,
1
,
4
,
1
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
1
,
4
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
4
,
4
,
2
,
4
,
2
,
4
,
2
,
4
,
2
,
4
,
1
,
4
,
2
,
4
,
2
,
4
,
2
,
4
,
1
],
baseElements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
recycles
:
[],
generateLats
:
[{
index
:
1
,
type
:
null
},
{
index
:
2
,
type
:
null
},
{
index
:
3
,
type
:
null
},
{
index
:
4
,
type
:
null
},
{
index
:
5
,
type
:
null
},
{
index
:
6
,
type
:
null
},
{
index
:
7
,
type
:
null
},
{
index
:
9
,
type
:
null
},
{
index
:
17
,
type
:
null
}]
}
},
]
egret/src/something/class/Element.ts
View file @
fb53ec69
import
getResPath
from
"../../../libs/new_tc/getResPath"
;
import
{
loadSvga
}
from
"../../loadSvga"
;
import
{
createCandyDie0Ani
}
from
"../anis/candy/createCandyDie0Ani"
;
import
{
createCandyDie1Ani
}
from
"../anis/candy/createCandyDie1Ani"
;
import
{
createCandyDie2Ani
}
from
"../anis/candy/createCandyDie2Ani"
;
import
{
createCandyDie3Ani
}
from
"../anis/candy/createCandyDie3Ani"
;
import
{
createCandyDie4Ani
}
from
"../anis/candy/createCandyDie4Ani"
;
import
{
createCandyDieBgAni
}
from
"../anis/candy/createCandyDieBgAni"
;
import
{
createCandyDis0Ani
}
from
"../anis/candy/createCandyDis0Ani"
;
import
{
createCandyDis1Ani
}
from
"../anis/candy/createCandyDis1Ani"
;
import
{
createCandyDis2Ani
}
from
"../anis/candy/createCandyDis2Ani"
;
import
{
createCandyDis3Ani
}
from
"../anis/candy/createCandyDis3Ani"
;
import
{
createCandyDis4Ani
}
from
"../anis/candy/createCandyDis4Ani"
;
import
{
createCandySubAni
}
from
"../anis/candy/createCandySubAni"
;
import
{
EffectType
}
from
"../enum/EffectType"
;
import
{
ElementType
,
FiveBaseElementTypes
,
CandyBaseElementType
,
transElementRes
}
from
"../enum/ElementType"
;
import
{
CandyBaseElementType
,
ElementType
,
FiveBaseElementTypes
,
transElementRes
}
from
"../enum/ElementType"
;
import
{
RecoverName
}
from
"../enum/RecoverName"
;
import
{
stateDatas
,
StateType
}
from
"../enum/StateType"
;
import
{
ExplosiveBgAni
}
from
"../periodAni/ExplosiveBgAni"
;
...
...
@@ -8,31 +22,26 @@ import { MagicLionBgAni } from "../periodAni/MagicLionBgAni";
import
{
VerticalBgAni
}
from
"../periodAni/VerticalBgAni"
;
import
{
Pool
}
from
"../Pool"
;
import
{
Tool
}
from
"../Tool"
;
import
{
Candy
}
from
"./Candy"
;
import
{
ChickenEgg
}
from
"./ChickenEgg"
;
import
{
FestivalEle
}
from
"./FestivalEle"
;
import
{
FestivalEle2
}
from
"./FestivalEle2"
;
import
{
State
}
from
"./State"
;
import
{
Candy
}
from
"./Candy"
;
import
{
createCandySubAni
}
from
"../anis/candy/createCandySubAni"
;
import
{
createCandyDie0Ani
}
from
"../anis/candy/createCandyDie0Ani"
;
import
{
createCandyDieBgAni
}
from
"../anis/candy/createCandyDieBgAni"
;
import
{
createCandyDie1Ani
}
from
"../anis/candy/createCandyDie1Ani"
;
import
{
createCandyDie2Ani
}
from
"../anis/candy/createCandyDie2Ani"
;
import
{
createCandyDie3Ani
}
from
"../anis/candy/createCandyDie3Ani"
;
import
{
createCandyDie4Ani
}
from
"../anis/candy/createCandyDie4Ani"
;
import
{
createCandyDis0Ani
}
from
"../anis/candy/createCandyDis0Ani"
;
import
{
createCandyDis1Ani
}
from
"../anis/candy/createCandyDis1Ani"
;
import
{
createCandyDis2Ani
}
from
"../anis/candy/createCandyDis2Ani"
;
import
{
createCandyDis3Ani
}
from
"../anis/candy/createCandyDis3Ani"
;
import
{
createCandyDis4Ani
}
from
"../anis/candy/createCandyDis4Ani"
;
import
{
loadSvga
}
from
"../../loadSvga"
;
import
getResPath
from
"../../../libs/new_tc/getResPath"
;
/**
* 考虑到底继承白鹭的啥Component还是Container
* 坐标原点需要坐落在格子的中心点
* 最好到时按,底图,动效,气泡,笼子,毛球,进行分层,如果多个状态要共存时,必须分层,到时气泡的动画,要写再自己的层里
*/
export
class
Element
extends
eui
.
Component
{
private
_fireworksTimer
=
0
;
get
canFire
()
{
const
t
=
new
Date
().
getTime
();
return
t
-
this
.
_fireworksTimer
>
2
*
1000
;
}
fire
()
{
this
.
_fireworksTimer
=
new
Date
().
getTime
();
}
async
resetFireworks
()
{
}
...
...
@@ -84,7 +93,7 @@ export class Element extends eui.Component {
this
.
toStandByAction
();
}
if
(
mv
.
currentFrame
==
391
)
{
r
();
// const tex: egret.Texture = RES.getRes("ele20_png");
// const pic = new egret.Bitmap(tex);
...
...
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