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
9f6b9747
Commit
9f6b9747
authored
Dec 17, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
05de78d0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
18 deletions
+43
-18
MainScene.ts
egret/src/mainScene/MainScene.ts
+17
-16
Chapter2.ts
egret/src/something/chapters/Chapter2.ts
+1
-1
ElementConfigType.ts
egret/src/something/enum/ElementConfigType.ts
+24
-0
LatticeType.ts
egret/src/something/enum/LatticeType.ts
+1
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
9f6b9747
...
...
@@ -68,6 +68,7 @@ import getRedBombAward, { getRedBombTimes } from '../getRedBombAward';
import
{
FesRedBombShowAni
}
from
'../something/anisCall/FesRedBombShowAni'
;
import
{
RectsWaveAni
}
from
'../something/anisCall/RectsWaveAni'
;
import
{
isSpecialLattice
}
from
'../something/enum/LatticeType'
;
import
{
ElementConfigType
}
from
'../something/enum/ElementConfigType'
;
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
...
...
@@ -558,16 +559,16 @@ export default class MainScene extends Scene {
var
p
=
Tool
.
getPositionByIndex
(
i
);
switch
(
elements
[
i
])
{
//如果为0记录空格
case
0
:
case
ElementConfigType
.
EMPTY
:
this
.
emptys
.
push
(
i
);
break
;
//基础元素,枷锁,气泡,灰色毛球,褐色毛球,黑色毛球
case
1
:
case
4
:
case
7
:
case
8
:
case
9
:
case
10
:
case
ElementConfigType
.
BASE
:
case
ElementConfigType
.
LOCK
:
case
ElementConfigType
.
BUBBLE
:
case
ElementConfigType
.
HAIRBALLGREY
:
case
ElementConfigType
.
HAIRBALLBROWN
:
case
ElementConfigType
.
HAIRBALLBLACK
:
var
type
=
Tool
.
returnType
(
i
,
this
.
lattices
,
this
.
chapterData
.
baseElementTypes
);
let
ele
:
Element
=
Pool
.
takeOut
(
RecoverName
.
ELEMENT
);
if
(
!
ele
)
{
...
...
@@ -579,30 +580,30 @@ export default class MainScene extends Scene {
ele
.
y
=
p
[
1
];
this
.
elementContainer
.
addChild
(
ele
);
this
.
lattices
[
i
].
element
=
ele
;
if
(
elements
[
i
]
==
4
)
{
if
(
elements
[
i
]
==
ElementConfigType
.
LOCK
)
{
ele
.
setState
(
StateType
.
LOCK
,
true
)
}
//气泡
else
if
(
elements
[
i
]
==
7
)
{
else
if
(
elements
[
i
]
==
ElementConfigType
.
BUBBLE
)
{
//气泡要设定type
ele
.
setState
(
StateType
.
BUBBLE
,
true
,
type
)
}
//灰色毛球
else
if
(
elements
[
i
]
==
8
)
{
else
if
(
elements
[
i
]
==
ElementConfigType
.
HAIRBALLGREY
)
{
ele
.
setState
(
StateType
.
HAIRBALLGREY
,
true
)
}
//褐色毛球
else
if
(
elements
[
i
]
==
9
)
{
else
if
(
elements
[
i
]
==
ElementConfigType
.
HAIRBALLBROWN
)
{
ele
.
setState
(
StateType
.
HAIRBALLBROWN
,
true
)
}
//黑色毛球
else
if
(
elements
[
i
]
==
10
)
{
else
if
(
elements
[
i
]
==
ElementConfigType
.
HAIRBALLBLACK
)
{
ele
.
setState
(
StateType
.
HAIRBALLBLACK
,
true
)
}
break
;
//棒棒糖
case
3
:
case
ElementConfigType
.
LOLLIPOP
:
this
.
lollipopCount
++
;
let
lol
:
Element
=
Pool
.
takeOut
(
RecoverName
.
ELEMENT
);
if
(
!
lol
)
{
...
...
@@ -616,7 +617,7 @@ export default class MainScene extends Scene {
this
.
lattices
[
i
].
element
=
lol
;
break
;
//石头
case
2
:
case
ElementConfigType
.
ROCK
:
let
rock
:
Element
=
Pool
.
takeOut
(
RecoverName
.
ELEMENT
);
if
(
!
rock
)
{
rock
=
new
Element
(
ElementType
.
ROCK
)
...
...
@@ -629,7 +630,7 @@ export default class MainScene extends Scene {
this
.
lattices
[
i
].
element
=
rock
;
break
;
//果冻
case
5
:
case
ElementConfigType
.
JELLY
:
let
jelly
:
Element
=
Tool
.
getElement
(
ElementType
.
JELLY
)
jelly
.
x
=
p
[
0
];
jelly
.
y
=
p
[
1
];
...
...
@@ -637,7 +638,7 @@ export default class MainScene extends Scene {
this
.
lattices
[
i
].
element
=
jelly
;
break
;
//鸡蛋
case
6
:
case
ElementConfigType
.
CHICKEN_EGG
:
let
egg
:
Element
=
Tool
.
getElement
(
ElementType
.
CHICKEN_EGG
)
egg
.
x
=
p
[
0
];
egg
.
y
=
p
[
1
];
...
...
egret/src/something/chapters/Chapter2.ts
View file @
9f6b9747
...
...
@@ -23,7 +23,7 @@ export const Chapters2: ChapterData[] = [
starScores
:
[
4000
,
8000
,
12000
],
map
:
{
lattices
:
[
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
0
,
4
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
0
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
0
,
0
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
0
,
...
...
egret/src/something/enum/ElementConfigType.ts
View file @
9f6b9747
...
...
@@ -6,6 +6,30 @@ export enum ElementConfigType {
* 空元素格
*/
EMPTY
=
0
,
/**
* 基础元素
*/
BASE
=
1
,
/**
* 石头
*/
ROCK
=
2
,
/**
* 石头
*/
LOLLIPOP
=
3
,
/**
* 枷锁
*/
LOCK
=
4
,
/**
* JELLY
*/
JELLY
=
5
,
/**
* CHICKEN_EGG
*/
CHICKEN_EGG
=
6
,
/**
* 气泡
*/
...
...
egret/src/something/enum/LatticeType.ts
View file @
9f6b9747
...
...
@@ -6,7 +6,7 @@ export enum LatticeType {
NORMAL
=
1
,
ICE
=
2
,
DARK_ICE
=
3
,
STONE
=
4
,
STONE
=
4
,
//会持续存在,无法像冰块一样被消除,但是上方可以存在元素。只是展示的时候
STONE_AND_ICE
=
5
,
STONE_AND_DARK_ICE
=
6
}
...
...
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