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
a25a4fef
Commit
a25a4fef
authored
Dec 14, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
66c730f0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
3 deletions
+77
-3
MainScene.ts
egret/src/mainScene/MainScene.ts
+2
-1
map.md
egret/src/mainScene/map.md
+13
-0
readme.md
egret/src/mainScene/readme.md
+28
-0
Ice.ts
egret/src/something/class/Ice.ts
+2
-1
LatticeType.ts
egret/src/something/enum/LatticeType.ts
+24
-0
MapData.ts
egret/src/something/interface/MapData.ts
+5
-1
ILattice.ts
egret/src/something/lattice/ILattice.ts
+3
-0
No files found.
egret/src/mainScene/MainScene.ts
View file @
a25a4fef
...
@@ -67,6 +67,7 @@ import { FestivalTarget } from '../something/uis/FestivalTarget';
...
@@ -67,6 +67,7 @@ import { FestivalTarget } from '../something/uis/FestivalTarget';
import
getRedBombAward
,
{
getRedBombTimes
}
from
'../getRedBombAward'
;
import
getRedBombAward
,
{
getRedBombTimes
}
from
'../getRedBombAward'
;
import
{
FesRedBombShowAni
}
from
'../something/anisCall/FesRedBombShowAni'
;
import
{
FesRedBombShowAni
}
from
'../something/anisCall/FesRedBombShowAni'
;
import
{
RectsWaveAni
}
from
'../something/anisCall/RectsWaveAni'
;
import
{
RectsWaveAni
}
from
'../something/anisCall/RectsWaveAni'
;
import
{
isSpecialLattice
}
from
'../something/enum/LatticeType'
;
const
aniClass
=
{
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
"BoomAni"
:
BoomAni
,
...
@@ -489,7 +490,7 @@ export default class MainScene extends Scene {
...
@@ -489,7 +490,7 @@ export default class MainScene extends Scene {
this
.
lattices
[
i
].
reset
(
i
);
this
.
lattices
[
i
].
reset
(
i
);
}
}
//冰块
//冰块
if
(
latticesD
[
i
]
==
2
||
latticesD
[
i
]
==
3
)
{
if
(
isSpecialLattice
(
latticesD
[
i
])
)
{
var
p
=
Tool
.
getPositionByIndex
(
i
);
var
p
=
Tool
.
getPositionByIndex
(
i
);
let
ice
=
Pool
.
takeOut
(
RecoverName
.
ICE
);
let
ice
=
Pool
.
takeOut
(
RecoverName
.
ICE
);
if
(
!
ice
)
{
if
(
!
ice
)
{
...
...
egret/src/mainScene/map.md
0 → 100644
View file @
a25a4fef
## Lattice
# 主类
-
initLattices();
# 数据
-
index 索引 0-80。最多一共81个地图格子
# 控制器
## class Lattice
## Element 元素
## class Element
\ No newline at end of file
egret/src/mainScene/readme.md
0 → 100644
View file @
a25a4fef
# 概念
-
地图配置 lattices
-
元素配置 elements
# 地图
-
需要居中,比如最多9列表,8列的需要水平居中
# lattices 地图背景配置
-
0无格子
-
1普通格子
-
2浅冰块
-
3深冰块
-
4石门
-
5石门+浅冰块
-
6石门+深冰块
# 包
-
egret/src/something/chapters
# main scene 视图
-
exchangeElementAni() 播放交换动画动画。只要交换就会播放,不管是否可以消除。
-
simpleMatch() 判断是否可以消除
# main scene 数据
-
exchangeData() 视图交换之后需要交换数据
# mainscene 控制
-
eliminate() 消除方法。
\ No newline at end of file
egret/src/something/class/Ice.ts
View file @
a25a4fef
import
{
ElementType
}
from
"../enum/ElementType"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
import
ILattice
from
"../lattice/ILattice"
;
export
class
Ice
extends
egret
.
Bitmap
{
export
class
Ice
extends
egret
.
Bitmap
implements
ILattice
{
/**
/**
* 消除次数
* 消除次数
*/
*/
...
...
egret/src/something/enum/LatticeType.ts
0 → 100644
View file @
a25a4fef
/**
* 地图格子配置
*/
export
enum
LatticeType
{
EMPTY
=
0
,
NORMAL
=
1
,
ICE
=
2
,
DARK_ICE
=
3
,
STONE
=
4
,
STONE_AND_ICE
=
5
,
STONE_AND_DARK_ICE
=
6
}
// * 0无格子
// * 1普通格子
// * 2浅冰块
// * 3深冰块
// * 4石门
// * 5石门+浅冰块
// * 6石门+深冰块
export
const
isSpecialLattice
=
(
type
:
LatticeType
)
=>
{
return
type
!=
LatticeType
.
EMPTY
&&
type
!=
LatticeType
.
NORMAL
;
}
\ No newline at end of file
egret/src/something/interface/MapData.ts
View file @
a25a4fef
import
{
GenerateLatData
}
from
"./GenerateLatData"
;
import
{
GenerateLatData
}
from
"./GenerateLatData"
;
import
{
LatticeType
}
from
"../enum/LatticeType"
;
/**
/**
* 地图数据接口
* 地图数据接口
...
@@ -13,8 +14,11 @@ export interface MapData {
...
@@ -13,8 +14,11 @@ export interface MapData {
* 1普通格子
* 1普通格子
* 2浅冰块
* 2浅冰块
* 3深冰块
* 3深冰块
* 4石门
* 5石门+浅冰块
* 6石门+深冰块
*/
*/
lattices
:
number
[];
lattices
:
LatticeType
[];
/**
/**
* 能生成元素的格子索引
* 能生成元素的格子索引
*
*
...
...
egret/src/something/lattice/ILattice.ts
0 → 100644
View file @
a25a4fef
export
default
interface
ILattice
{
reset
(
n
:
number
);
}
\ No newline at end of file
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