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
636b34c7
Commit
636b34c7
authored
Jan 02, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
af656171
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
386 additions
and
46 deletions
+386
-46
index.html
egret/index.html
+2
-2
MainBase.ts
egret/libs/new_wx/MainBase.ts
+4
-1
candynums.fnt
egret/resource/assets/common/candynums.fnt
+11
-0
candynums.png
egret/resource/assets/common/candynums.png
+0
-0
ele15.png
egret/resource/assets/mainScene/ele15.png
+0
-0
ele16.png
egret/resource/assets/mainScene/ele16.png
+0
-0
ele17.png
egret/resource/assets/mainScene/ele17.png
+0
-0
ele18.png
egret/resource/assets/mainScene/ele18.png
+0
-0
ele19.png
egret/resource/assets/mainScene/ele19.png
+0
-0
default.res.json
egret/resource/default.res.json
+39
-0
MyExmlPlugin.ts
egret/scripts/MyExmlPlugin.ts
+1
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+25
-3
Chapter13.ts
egret/src/something/chapters/Chapter13.ts
+87
-24
ElementConfigType.ts
egret/src/something/enum/ElementConfigType.ts
+76
-15
ElementType.ts
egret/src/something/enum/ElementType.ts
+15
-1
home.json
mock/happyclear/home.json
+126
-0
No files found.
egret/index.html
View file @
636b34c7
...
@@ -135,8 +135,8 @@
...
@@ -135,8 +135,8 @@
];
];
// localStorage.clear();
// localStorage.clear();
window
[
'imgver'
]
=
'11112'
;
window
[
'imgver'
]
=
'11112'
;
window
[
'total_level'
]
=
10
+
10
*
2
7
;
/// TODO 14 不能变 总数必须大于总的关卡数
window
[
'total_level'
]
=
10
+
10
*
2
9
;
/// TODO 14 不能变 总数必须大于总的关卡数
window
[
'last_level'
]
=
275
;
//必须大于等于total_level ///TODO 标记最后一关,等于最后一关即可
window
[
'last_level'
]
=
300
;
//必须大于等于total_level ///TODO 标记最后一关,等于最后一关即可
var
sharePic
=
document
.
getElementById
(
'pic'
);
var
sharePic
=
document
.
getElementById
(
'pic'
);
...
...
egret/libs/new_wx/MainBase.ts
View file @
636b34c7
...
@@ -270,6 +270,9 @@ export default class MainBase extends eui.UILayer {
...
@@ -270,6 +270,9 @@ export default class MainBase extends eui.UILayer {
RES
.
getResAsync
(
"ele"
+
i
+
"Line"
+
"_png"
)
RES
.
getResAsync
(
"ele"
+
i
+
"Line"
+
"_png"
)
RES
.
getResAsync
(
"ele"
+
i
+
"Exp"
+
"_png"
)
RES
.
getResAsync
(
"ele"
+
i
+
"Exp"
+
"_png"
)
}
}
for
(
var
i
=
0
;
i
<
20
;
i
++
)
{
RES
.
getResAsync
(
"ele"
+
i
+
"_png"
)
}
for
(
var
i
=
1
;
i
<=
27
;
i
++
)
{
for
(
var
i
=
1
;
i
<=
27
;
i
++
)
{
RES
.
getResAsync
(
"bonusFra"
+
i
+
"_png"
)
RES
.
getResAsync
(
"bonusFra"
+
i
+
"_png"
)
}
}
...
@@ -503,10 +506,10 @@ export default class MainBase extends eui.UILayer {
...
@@ -503,10 +506,10 @@ export default class MainBase extends eui.UILayer {
protected
async
createGameScene
()
{
protected
async
createGameScene
()
{
window
[
'getaward'
]
=
()
=>
{
getRedBombAward
((
param
)
=>
{
console
.
log
(
param
)
})
};
window
[
'getaward'
]
=
()
=>
{
getRedBombAward
((
param
)
=>
{
console
.
log
(
param
)
})
};
localStorage
.
setItem
(
'taskCenter'
+
window
[
'CFG'
].
consumerId
,
'true'
);
// 任务中心强提示,每次进入游戏只强提示一次
localStorage
.
setItem
(
'taskCenter'
+
window
[
'CFG'
].
consumerId
,
'true'
);
// 任务中心强提示,每次进入游戏只强提示一次
await
this
.
hcHome
();
await
Promise
.
all
([
await
Promise
.
all
([
this
.
getAd
(),
this
.
getAd
(),
this
.
ajaxElement
(),
this
.
ajaxElement
(),
this
.
hcHome
(),
this
.
hc_userInfo
(),
this
.
hc_userInfo
(),
// this.getBackReward(),
// this.getBackReward(),
this
.
hcRedBoobBaseInfo
(),
this
.
hcRedBoobBaseInfo
(),
...
...
egret/resource/assets/common/candynums.fnt
0 → 100644
View file @
636b34c7
{"file":"candynums.png","frames":{
"9":{"x":48,"y":0,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"8":{"x":69,"y":29,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"7":{"x":23,"y":29,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"6":{"x":0,"y":29,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"5":{"x":71,"y":0,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"4":{"x":24,"y":0,"w":22,"h":27,"offX":0,"offY":0,"sourceW":22,"sourceH":27},
"3":{"x":46,"y":29,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"2":{"x":94,"y":0,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"1":{"x":92,"y":29,"w":14,"h":27,"offX":0,"offY":0,"sourceW":14,"sourceH":27},
"0":{"x":0,"y":0,"w":22,"h":27,"offX":0,"offY":0,"sourceW":22,"sourceH":27}}}
\ No newline at end of file
egret/resource/assets/common/candynums.png
0 → 100644
View file @
636b34c7
6.93 KB
egret/resource/assets/mainScene/ele15.png
0 → 100644
View file @
636b34c7
3.87 KB
egret/resource/assets/mainScene/ele16.png
0 → 100644
View file @
636b34c7
4.49 KB
egret/resource/assets/mainScene/ele17.png
0 → 100644
View file @
636b34c7
6.37 KB
egret/resource/assets/mainScene/ele18.png
0 → 100644
View file @
636b34c7
5.34 KB
egret/resource/assets/mainScene/ele19.png
0 → 100644
View file @
636b34c7
5.28 KB
egret/resource/default.res.json
View file @
636b34c7
...
@@ -227,6 +227,10 @@
...
@@ -227,6 +227,10 @@
{
{
"keys"
:
"redbombalert文案_png,redAlert_btn_png,alert_yb_png,alert_prop3_png,alert_prop2_png,alert_prop1_png,alert_blood_png"
,
"keys"
:
"redbombalert文案_png,redAlert_btn_png,alert_yb_png,alert_prop3_png,alert_prop2_png,alert_prop1_png,alert_blood_png"
,
"name"
:
"redbombalert"
"name"
:
"redbombalert"
},
{
"name"
:
"preload"
,
"keys"
:
"ele15_png,ele16_png,ele17_png,ele18_png,ele19_png"
}
}
],
],
"resources"
:
[
"resources"
:
[
...
@@ -4096,6 +4100,41 @@
...
@@ -4096,6 +4100,41 @@
"type"
:
"sheet"
,
"type"
:
"sheet"
,
"name"
:
"top9_json"
,
"name"
:
"top9_json"
,
"subkeys"
:
"草绿_00000,草绿_00001,草绿_00002,草绿_00003,草绿_00004,草绿_00005,草绿_00006,草绿_00007,草绿_00008,草绿_00009,草绿_00010,草绿_00011,草绿_00012,草绿_00013,草绿_00014"
"subkeys"
:
"草绿_00000,草绿_00001,草绿_00002,草绿_00003,草绿_00004,草绿_00005,草绿_00006,草绿_00007,草绿_00008,草绿_00009,草绿_00010,草绿_00011,草绿_00012,草绿_00013,草绿_00014"
},
{
"url"
:
"assets/common/candynums.png"
,
"type"
:
"image"
,
"name"
:
"candynums_png"
},
{
"url"
:
"assets/common/candynums.fnt"
,
"type"
:
"font"
,
"name"
:
"candynums_fnt"
},
{
"name"
:
"ele15_png"
,
"type"
:
"image"
,
"url"
:
"assets/mainScene/ele15.png"
},
{
"name"
:
"ele16_png"
,
"type"
:
"image"
,
"url"
:
"assets/mainScene/ele16.png"
},
{
"name"
:
"ele17_png"
,
"type"
:
"image"
,
"url"
:
"assets/mainScene/ele17.png"
},
{
"name"
:
"ele18_png"
,
"type"
:
"image"
,
"url"
:
"assets/mainScene/ele18.png"
},
{
"name"
:
"ele19_png"
,
"type"
:
"image"
,
"url"
:
"assets/mainScene/ele19.png"
}
}
]
]
}
}
\ No newline at end of file
egret/scripts/MyExmlPlugin.ts
View file @
636b34c7
...
@@ -8,6 +8,7 @@ import { ExmlPlugin2 } from "./ExmlPlugin2";
...
@@ -8,6 +8,7 @@ import { ExmlPlugin2 } from "./ExmlPlugin2";
export
class
MyExmlPlugin
extends
ExmlPlugin2
implements
plugins
.
Command
{
export
class
MyExmlPlugin
extends
ExmlPlugin2
implements
plugins
.
Command
{
async
onFile
(
file
:
plugins
.
File
)
{
async
onFile
(
file
:
plugins
.
File
)
{
const
excludes
=
[
const
excludes
=
[
'candynums.png'
,
'top1.png'
,
'top1.png'
,
'top2.png'
,
'top2.png'
,
'top3.png'
,
'top3.png'
,
...
...
egret/src/mainScene/MainScene.ts
View file @
636b34c7
...
@@ -39,7 +39,7 @@ import { Element } from '../something/class/Element';
...
@@ -39,7 +39,7 @@ import { Element } from '../something/class/Element';
import
{
Ice
}
from
'../something/class/Ice'
;
import
{
Ice
}
from
'../something/class/Ice'
;
import
{
Lattice
}
from
'../something/class/Lattice'
;
import
{
Lattice
}
from
'../something/class/Lattice'
;
import
{
EffectType
}
from
'../something/enum/EffectType'
;
import
{
EffectType
}
from
'../something/enum/EffectType'
;
import
{
ElementConfigType
}
from
'../something/enum/ElementConfigType'
;
import
{
ElementConfigType
,
createCandy
}
from
'../something/enum/ElementConfigType'
;
import
{
codeMsgs
,
ElementType
,
FiveBaseElementTypes
,
submitTran
}
from
'../something/enum/ElementType'
;
import
{
codeMsgs
,
ElementType
,
FiveBaseElementTypes
,
submitTran
}
from
'../something/enum/ElementType'
;
import
{
isIce
,
isSpecialLattice
}
from
'../something/enum/LatticeType'
;
import
{
isIce
,
isSpecialLattice
}
from
'../something/enum/LatticeType'
;
import
{
PassType
}
from
'../something/enum/PassType'
;
import
{
PassType
}
from
'../something/enum/PassType'
;
...
@@ -627,8 +627,12 @@ export default class MainScene extends Scene {
...
@@ -627,8 +627,12 @@ export default class MainScene extends Scene {
if
(
!
this
.
lattices
[
connectedLat
[
0
]])
{
if
(
!
this
.
lattices
[
connectedLat
[
0
]])
{
throw
new
Error
(
'联通干了个空的@沈豪洲(牛奶) '
)
throw
new
Error
(
'联通干了个空的@沈豪洲(牛奶) '
)
}
}
this
.
lattices
[
connectedLat
[
0
]].
down
=
connectedLat
[
1
];
try
{
this
.
lattices
[
connectedLat
[
1
]].
up
=
connectedLat
[
0
];
this
.
lattices
[
connectedLat
[
0
]].
down
=
connectedLat
[
1
];
this
.
lattices
[
connectedLat
[
1
]].
up
=
connectedLat
[
0
];
}
catch
(
error
)
{
throw
new
Error
(
'lattices x号位没有东西'
)
}
var
colUp
=
Tool
.
indexToRc
(
connectedLat
[
0
])[
1
];
var
colUp
=
Tool
.
indexToRc
(
connectedLat
[
0
])[
1
];
var
colDown
=
Tool
.
indexToRc
(
connectedLat
[
1
])[
1
];
var
colDown
=
Tool
.
indexToRc
(
connectedLat
[
1
])[
1
];
...
@@ -734,6 +738,24 @@ export default class MainScene extends Scene {
...
@@ -734,6 +738,24 @@ export default class MainScene extends Scene {
this
.
elementContainer
.
addChild
(
rock
);
this
.
elementContainer
.
addChild
(
rock
);
this
.
lattices
[
i
].
element
=
rock
;
this
.
lattices
[
i
].
element
=
rock
;
break
;
break
;
case
ElementConfigType
.
CANDY_RANDOM
:
case
ElementConfigType
.
CANDY_1
:
case
ElementConfigType
.
CANDY_2
:
case
ElementConfigType
.
CANDY_3
:
case
ElementConfigType
.
CANDY_4
:
case
ElementConfigType
.
CANDY_5
:
const
candyType
=
createCandy
(
elements
[
i
])
let
candy
:
Element
=
Pool
.
takeOut
(
RecoverName
.
ELEMENT
);
if
(
!
candy
)
{
candy
=
new
Element
(
candyType
)
}
else
{
candy
.
reset
(
candyType
)
}
candy
.
x
=
p
[
0
];
candy
.
y
=
p
[
1
];
this
.
elementContainer
.
addChild
(
candy
);
this
.
lattices
[
i
].
element
=
candy
;
break
;
//果冻
//果冻
case
ElementConfigType
.
JELLY
:
case
ElementConfigType
.
JELLY
:
let
jelly
:
Element
=
Tool
.
getElement
(
ElementType
.
JELLY
)
let
jelly
:
Element
=
Tool
.
getElement
(
ElementType
.
JELLY
)
...
...
egret/src/something/chapters/Chapter13.ts
View file @
636b34c7
This diff is collapsed.
Click to expand it.
egret/src/something/enum/ElementConfigType.ts
View file @
636b34c7
import
{
ElementType
}
from
"./ElementType"
;
/**
/**
* 元素格子配置,需要和地图格子做区分
* 元素格子配置,需要和地图格子做区分
*/
*/
...
@@ -5,51 +7,110 @@ export enum ElementConfigType {
...
@@ -5,51 +7,110 @@ export enum ElementConfigType {
/**
/**
* 空元素格
* 空元素格
*/
*/
EMPTY
=
0
,
EMPTY
=
0
,
/**
/**
* 基础元素
* 基础元素
*/
*/
BASE
=
1
,
BASE
=
1
,
/**
/**
* 石头
* 石头
*/
*/
ROCK
=
2
,
ROCK
=
2
,
/**
/**
* 棒棒糖
* 棒棒糖
*/
*/
LOLLIPOP
=
3
,
LOLLIPOP
=
3
,
/**
/**
* 枷锁
* 枷锁
*/
*/
LOCK
=
4
,
LOCK
=
4
,
/**
/**
* JELLY
* JELLY
*/
*/
JELLY
=
5
,
JELLY
=
5
,
/**
/**
* CHICKEN_EGG
* CHICKEN_EGG
*/
*/
CHICKEN_EGG
=
6
,
CHICKEN_EGG
=
6
,
/**
/**
* 气泡
* 气泡
*/
*/
BUBBLE
=
7
,
BUBBLE
=
7
,
/**
/**
* 灰色毛球
* 灰色毛球
*/
*/
HAIRBALLGREY
=
8
,
HAIRBALLGREY
=
8
,
/**
/**
* 褐色毛球
* 褐色毛球
*/
*/
HAIRBALLBROWN
=
9
,
HAIRBALLBROWN
=
9
,
/**
/**
* 黑色毛球
* 黑色毛球
*/
*/
HAIRBALLBLACK
=
10
,
HAIRBALLBLACK
=
10
,
/**
* 随机糖果
*/
CANDY_RANDOM
=
11
,
/**
* 糖果1 2 3 4 5号
*/
CANDY_1
=
111
,
CANDY_2
=
112
,
CANDY_3
=
113
,
CANDY_4
=
114
,
CANDY_5
=
115
,
}
export
const
isCandy
=
(
t
:
ElementConfigType
)
=>
{
return
t
==
ElementConfigType
.
CANDY_RANDOM
||
t
==
ElementConfigType
.
CANDY_1
||
t
==
ElementConfigType
.
CANDY_2
||
t
==
ElementConfigType
.
CANDY_3
||
t
==
ElementConfigType
.
CANDY_4
||
t
==
ElementConfigType
.
CANDY_5
}
export
const
createCandy
=
(
t
:
ElementConfigType
)
=>
{
let
type
:
ElementType
;
if
(
t
==
ElementConfigType
.
CANDY_RANDOM
)
{
const
order
=
Math
.
ceil
(
Math
.
random
()
*
5
);
switch
(
order
)
{
case
1
:
type
=
ElementType
.
CANDY1
break
;
case
2
:
type
=
ElementType
.
CANDY2
break
;
case
3
:
type
=
ElementType
.
CANDY3
break
;
case
4
:
type
=
ElementType
.
CANDY4
break
;
case
5
:
type
=
ElementType
.
CANDY5
break
;
// /**
default
:
// * 石门。石门正面的时候,无法消除。不是锁,锁可以被打破。
break
;
// */
}
// BLOCK_LOCK=11,
}
else
if
(
t
==
ElementConfigType
.
CANDY_1
)
{
type
=
ElementType
.
CANDY1
;
}
else
if
(
t
==
ElementConfigType
.
CANDY_2
)
{
type
=
ElementType
.
CANDY2
;
}
else
if
(
t
==
ElementConfigType
.
CANDY_3
)
{
type
=
ElementType
.
CANDY3
;
}
else
if
(
t
==
ElementConfigType
.
CANDY_4
)
{
type
=
ElementType
.
CANDY4
;
}
else
if
(
t
==
ElementConfigType
.
CANDY_5
)
{
type
=
ElementType
.
CANDY5
;
};
return
type
;
}
}
\ No newline at end of file
egret/src/something/enum/ElementType.ts
View file @
636b34c7
...
@@ -25,12 +25,26 @@ export enum ElementType {
...
@@ -25,12 +25,26 @@ export enum ElementType {
HAIRBALLGREY
,
//灰色毛球10
HAIRBALLGREY
,
//灰色毛球10
HAIRBALLBROWN
,
//褐色毛球11
HAIRBALLBROWN
,
//褐色毛球11
HAIRBALLBLACK
,
//黑色毛球12
HAIRBALLBLACK
,
//黑色毛球12
//特殊元素 ,节日元素
//特殊元素 ,节日元素
FESTIVALELE_BIG
,
//节日元素大中间一个13
FESTIVALELE_BIG
,
//节日元素大中间一个13
FESTIVALELE_SMALL
,
//节日元素飞溅的小元素14
FESTIVALELE_SMALL
,
//节日元素飞溅的小元素14
CANDY1
,
CANDY2
,
CANDY3
,
CANDY4
,
CANDY5
,
}
}
export
const
isCandyElement
=
(
t
:
ElementType
)
=>
{
return
t
==
ElementType
.
CANDY1
||
t
==
ElementType
.
CANDY2
||
t
==
ElementType
.
CANDY3
||
t
==
ElementType
.
CANDY4
||
t
==
ElementType
.
CANDY5
};
/**
/**
* 5种基本元素的数组,每项是ElementType的枚举值
* 5种基本元素的数组,每项是ElementType的枚举值
* 判断某类型是否是基础类型用FiveBaseElementTypes.indexOf(baseType) > -1
* 判断某类型是否是基础类型用FiveBaseElementTypes.indexOf(baseType) > -1
...
...
mock/happyclear/home.json
View file @
636b34c7
...
@@ -1386,6 +1386,132 @@
...
@@ -1386,6 +1386,132 @@
"levelNum"
:
275
,
"levelNum"
:
275
,
"maxScore"
:
47440
,
"maxScore"
:
47440
,
"stars"
:
1
"stars"
:
1
},
{
"levelNum"
:
276
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
277
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
278
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
279
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
280
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
281
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
282
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
283
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
284
,
"maxScore"
:
47440
,
"stars"
:
1
}
,
{
"levelNum"
:
285
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
286
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
287
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
288
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
289
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
290
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
291
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
292
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
293
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
294
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
295
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
296
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
297
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
298
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
299
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
300
,
"maxScore"
:
47440
,
"stars"
:
1
}
}
],
],
"remainProp"
:
[
"remainProp"
:
[
...
...
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