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
e662614e
Commit
e662614e
authored
Aug 23, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
3013960d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
164 additions
and
64 deletions
+164
-64
MainBase.ts
egret/libs/new_wx/MainBase.ts
+3
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+58
-24
Chapters.ts
egret/src/something/Chapters.ts
+15
-32
Loading2.ts
egret/src/something/uis/Loading2.ts
+74
-0
PropGuide.ts
egret/src/something/uis/PropGuide.ts
+0
-7
home.json
mock/happyclear/home.json
+14
-1
No files found.
egret/libs/new_wx/MainBase.ts
View file @
e662614e
...
...
@@ -32,11 +32,13 @@ import FailedPanel from "../../src/panels/FailedPanel";
import
QuitPanel
from
"../../src/panels/QuitPanel"
;
import
BoxPanel
from
"../../src/panels/BoxPanel"
;
import
MainScene
from
"../../src/mainScene/MainScene"
;
import
{
Loading2
}
from
"../../src/something/uis/Loading2"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
super
();
Loading
.
instace
.
loadImage
();
Loading2
.
instace
.
loadImage
();
DataManager
.
ins
.
customCfgData
=
window
[
'CFG'
];
this
.
getData
();
}
...
...
@@ -103,6 +105,7 @@ export default class MainBase extends eui.UILayer {
layers
.
init
(
this
);
Loading
.
init
(
layers
.
topLayer
);
Loading2
.
init
(
layers
.
topLayer
);
Loading
.
instace
.
show
();
PanelCtrl
.
instance
.
init
(
layers
.
popupLayer
);
...
...
egret/src/mainScene/MainScene.ts
View file @
e662614e
...
...
@@ -38,13 +38,13 @@ import { Chapters } from '../something/Chapters';
import
{
FlyTargetAni
}
from
'../something/anis/FlyTargetAni'
;
import
{
BonusShootAni
,
stepPosition
}
from
'../something/anis/BonusShootAni'
;
import
{
GuideMsg
}
from
'../something/uis/GuideMsg'
;
import
Loading
from
'../../libs/new_wx/components/Loading'
;
import
{
getlogItem
}
from
'../Main'
;
import
getHomeData
,
{
getPropNums
}
from
'../getHomeData'
;
import
PropType
from
'../PropType'
;
import
{
PropNumShow
}
from
'../something/uis/PropNumShow'
;
import
SceneCtrl
from
'../../libs/new_wx/ctrls/sceneCtrl'
;
import
{
PropGuide
}
from
'../something/uis/PropGuide'
;
import
{
Loading2
}
from
'../something/uis/Loading2'
;
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
...
...
@@ -57,6 +57,7 @@ const aniClass = {
"EleDisAni"
:
EleDisAni
,
"MagicLionAni"
:
MagicLionAni
,
}
const
baseScore
=
20
;
/**
* 直线特效(4) 1.5倍
* 爆炸特效(L) 2.0倍
...
...
@@ -188,14 +189,14 @@ export default class MainScene extends Scene {
//道具使用引导
propGuide
:
PropGuide
;
//步数道具引导时的圆
stepCircle
:
egret
.
Shape
;
stepCircle
:
egret
.
Shape
;
start
(
data
)
{
super
.
start
();
//初始化索引信息
Tool
.
init
();
//第几关
//
this.chapter = (data && data.chapter) ? data.chapter : 1;
this
.
chapter
=
20
;
this
.
chapter
=
(
data
&&
data
.
chapter
)
?
data
.
chapter
:
1
;
// this.chapter = 19
;
this
.
chapterTxt
.
text
=
"第"
+
this
.
chapter
+
"关"
;
//关卡数据
this
.
chapterData
=
Chapters
[
this
.
chapter
];
...
...
@@ -239,10 +240,10 @@ export default class MainScene extends Scene {
//引导提示
if
(
this
.
chapter
<=
5
)
{
Loading
.
instace
.
show
()
Loading
2
.
instace
.
show
()
let
g
=
new
GuideMsg
();
g
.
init
(
this
.
chapter
,
()
=>
{
Loading
.
instace
.
hide
()
Loading
2
.
instace
.
hide
()
this
.
addChild
(
g
);
this
.
enableMouseEvt
(
true
);
})
...
...
@@ -518,7 +519,7 @@ export default class MainScene extends Scene {
}
//
侦听事件
//侦听事件
initEvents
()
{
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
this
.
settingBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_settingBtn
,
this
)
...
...
@@ -680,19 +681,52 @@ export default class MainScene extends Scene {
if
(
this
.
SELECTED
&&
this
.
choosed
.
parent
)
{
this
.
choosed
.
parent
.
removeChild
(
this
.
choosed
)
}
let
fun
:
Function
;
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
=
function
()
{
this
.
elementContainer
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
,
this
);
this
.
sendPropUse
(
prop
);
},
this
)
}
else
{
if
(
!
this
.
stepCircle
)
{
if
(
!
this
.
stepCircle
)
{
this
.
stepCircle
=
new
egret
.
Shape
();
this
.
stepCircle
.
graphics
.
beginFill
(
0xff0000
,
0.5
);
this
.
stepCircle
.
touchEnabled
=
true
;
this
.
stepCircle
.
graphics
.
beginFill
(
0xff0000
,
0
);
this
.
stepCircle
.
graphics
.
drawCircle
(
123
,
98
,
72
);
this
.
stepCircle
.
graphics
.
endFill
();
// this.stepCircle.addEventListener()
this
.
stepCircle
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
sendPropUse
(
PropType
.
CHANCE_NUM
)
},
this
)
}
this
.
addChild
(
this
.
stepCircle
)
}
}
sendPropUse
(
prop
){
sendPropUse
(
prop
:
PropType
)
{
Loading2
.
instace
.
show
();
this
.
removeChild
(
this
.
propGuide
);
NetManager
.
ins
.
hc_useProp
((
s
)
=>
{
Loading2
.
instace
.
hide
();
//还原事件
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
if
(
prop
==
PropType
.
BOOM
||
prop
==
PropType
.
HAMMER
)
{
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
mouseDownE
,
this
);
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_MOVE
,
this
.
mouseMoveE
,
this
);
}
else
{
this
.
removeChild
(
this
.
stepCircle
)
showToast
(
"步数增加成功"
)
}
if
(
!
s
)
return
switch
(
prop
)
{
case
PropType
.
BOOM
:
break
;
case
PropType
.
HAMMER
:
break
;
case
PropType
.
CHANCE_NUM
:
this
.
steps
+=
5
;
break
;
}
},
prop
)
}
mouseDownE
(
e
:
egret
.
TextEvent
)
{
// if (!this.enableTouch) return
...
...
@@ -1361,7 +1395,7 @@ export default class MainScene extends Scene {
for
(
var
aa
=
0
;
aa
<
this
.
eliminatedElements
.
length
;
aa
++
)
{
var
index
=
this
.
eliminatedElements
[
aa
];
if
(
!
this
.
lattices
[
index
].
element
.
isLock
)
{
this
.
pushScoreAni
(
10
*
this
.
commonContinuityTimes
,
Tool
.
getPositionByIndex
(
index
))
this
.
pushScoreAni
(
baseScore
*
this
.
commonContinuityTimes
,
Tool
.
getPositionByIndex
(
index
))
}
}
return
this
.
eliminatedElements
.
length
>
0
;
...
...
@@ -1521,7 +1555,7 @@ export default class MainScene extends Scene {
this
.
eliminatedElements
.
push
(
i
);
//5倍
if
(
!
lat
.
element
.
isLock
/*&&lat.element.effectType==null*/
)
{
this
.
pushScoreAni
(
10
*
this
.
effectContinuityTimes
*
5
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
5
,
Tool
.
getPositionByIndex
(
i
))
}
}
}
...
...
@@ -1571,7 +1605,7 @@ export default class MainScene extends Scene {
}
if
(
!
lat
.
element
.
isLock
)
{
//2.5倍
this
.
pushScoreAni
(
10
*
this
.
effectContinuityTimes
*
2.5
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
2.5
,
Tool
.
getPositionByIndex
(
i
))
}
}
}
...
...
@@ -1593,7 +1627,7 @@ export default class MainScene extends Scene {
this
.
eliminatedElements
.
push
(
i
);
if
(
!
lat
.
element
.
isLock
)
{
//3倍
this
.
pushScoreAni
(
10
*
this
.
effectContinuityTimes
*
3
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
3
,
Tool
.
getPositionByIndex
(
i
))
}
}
}
...
...
@@ -1617,7 +1651,7 @@ export default class MainScene extends Scene {
this
.
eliminatedElements
.
push
(
i
);
if
(
!
lat
.
element
.
isLock
)
{
//3.5倍
this
.
pushScoreAni
(
10
*
this
.
effectContinuityTimes
*
3.5
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
3.5
,
Tool
.
getPositionByIndex
(
i
))
}
}
}
...
...
@@ -1642,7 +1676,7 @@ export default class MainScene extends Scene {
this
.
eliminatedElements
.
push
(
i
);
if
(
!
lat
.
element
.
isLock
)
{
//4倍
this
.
pushScoreAni
(
10
*
this
.
effectContinuityTimes
*
4
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
4
,
Tool
.
getPositionByIndex
(
i
))
}
}
}
...
...
@@ -1751,7 +1785,7 @@ export default class MainScene extends Scene {
}
//2.5倍
if
(
!
this
.
lattices
[
i
].
element
.
isLock
)
{
this
.
pushScoreAni
(
10
*
this
.
effectContinuityTimes
*
2.5
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
2.5
,
Tool
.
getPositionByIndex
(
i
))
}
}
}
...
...
@@ -1771,7 +1805,7 @@ export default class MainScene extends Scene {
this
.
eliminatedElements
.
push
(
i
);
//2倍
if
(
!
this
.
lattices
[
i
].
element
.
isLock
)
{
this
.
pushScoreAni
(
10
*
this
.
effectContinuityTimes
*
2
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
2
,
Tool
.
getPositionByIndex
(
i
))
}
}
}
...
...
@@ -1790,7 +1824,7 @@ export default class MainScene extends Scene {
this
.
eliminatedElements
.
push
(
ein
);
//1.5倍
if
(
!
this
.
lattices
[
ein
].
element
.
isLock
)
{
this
.
pushScoreAni
(
10
*
this
.
effectContinuityTimes
*
1.5
,
Tool
.
getPositionByIndex
(
ein
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
1.5
,
Tool
.
getPositionByIndex
(
ein
))
}
}
}
...
...
@@ -1809,7 +1843,7 @@ export default class MainScene extends Scene {
this
.
eliminatedElements
.
push
(
ein
);
//1.5倍
if
(
!
this
.
lattices
[
ein
].
element
.
isLock
)
{
this
.
pushScoreAni
(
10
*
this
.
effectContinuityTimes
*
1.5
,
Tool
.
getPositionByIndex
(
ein
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
1.5
,
Tool
.
getPositionByIndex
(
ein
))
}
}
}
...
...
@@ -2055,12 +2089,12 @@ export default class MainScene extends Scene {
* @param callback
*/
submit
(
json
:
string
)
{
Loading
.
instace
.
show
();
Loading
2
.
instace
.
show
();
NetManager
.
ins
.
hc_submit
((
s
,
data
)
=>
{
if
(
s
)
{
//提交成功后捞结果
NetManager
.
ins
.
getOrderStatus
((
s
)
=>
{
Loading
.
instace
.
hide
();
Loading
2
.
instace
.
hide
();
playSound
(
SoundType
.
sucess
);
if
(
s
)
{
//区分奖品
...
...
@@ -2077,7 +2111,7 @@ export default class MainScene extends Scene {
DataManager
.
ins
.
getData
(
"hc_doJoin"
).
data
,
()
=>
{
return
DataManager
.
ins
.
getCustomOrderStatusData
.
code
==
"C000000001"
;
})
}
else
{
Loading
.
instace
.
hide
();
Loading
2
.
instace
.
hide
();
if
(
!
data
)
{
//错误弹框,网络错误
//提交失败
...
...
egret/src/something/Chapters.ts
View file @
e662614e
...
...
@@ -9,12 +9,12 @@ export const Chapters: ChapterData[] = [
{
map
:
{
lattices
:
[
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
1
,
3
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
4
,
1
,
1
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
5
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
6
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
...
...
@@ -33,33 +33,16 @@ export const Chapters: ChapterData[] = [
]
}
],
connectedLats
:
[[
27
,
45
],
[
28
,
46
],
[
29
,
47
]]
//
connectedLats: [[27, 45], [28, 46], [29, 47]]
},
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
effectInitProbability
:
0.15
,
stepCount
:
30
,
// passTarget: {
// type: PassType.SCORE_TARGET,
// score: 10000,
// },
effectInitProbability
:
0.1
,
stepCount
:
50
,
passTarget
:
{
type
:
PassType
.
ELEMENT_TARGET
,
elements
:
[
// {
// type: ElementType.ICE,
// count: 100,
// },
{
type
:
ElementType
.
RABBIT
,
count
:
56
,
},
{
type
:
ElementType
.
LOLLIPOP
,
count
:
4
,
}
],
type
:
PassType
.
SCORE_TARGET
,
score
:
2000
,
},
starScores
:
[
3000
,
5000
,
100
00
]
starScores
:
[
1200
,
1500
,
25
00
]
},
//第二关
{
...
...
@@ -574,14 +557,14 @@ export const Chapters: ChapterData[] = [
generateLats
:
[
0
,
1
,
2
,
4
,
5
,
6
,
7
,
8
],
connectedLats
:
[[
27
,
45
],
[
28
,
46
],
[
29
,
47
]]
},
baseElementTypes
:
[
0
,
1
,
2
,
3
],
baseElementTypes
:
[
0
,
1
,
2
,
4
],
effectInitProbability
:
0.05
,
stepCount
:
15
,
passTarget
:
{
type
:
PassType
.
SCORE_TARGET
,
score
:
22
000
score
:
18
000
},
starScores
:
[
8000
,
1
6000
,
22
000
]
starScores
:
[
8000
,
1
2000
,
18
000
]
},
//第二十关
{
...
...
egret/src/something/uis/Loading2.ts
0 → 100644
View file @
e662614e
export
class
Loading2
extends
egret
.
Sprite
{
private
static
_parent
:
egret
.
Sprite
;
private
static
_instance
:
Loading2
;
private
static
bg
=
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAC0CAYAAAATiCegAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQwIDc5LjE2MDQ1MSwgMjAxNy8wNS8wNi0wMTowODoyMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sb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ixQsrJuoXPTokkASSwCsR6NLpFIIfAQYAmaA+/cC+3MAAAAAASUVORK5CYII='
;
getBitmap
(
base64
:
string
,
callback
:
(
bitmap
)
=>
void
):
void
{
const
img
=
new
Image
();
img
[
"avaliable"
]
=
true
;
img
.
src
=
base64
;
img
.
onload
=
()
=>
{
const
texture
=
new
egret
.
Texture
();
const
bitmapdata
=
new
egret
.
BitmapData
(
img
);
texture
.
_setBitmapData
(
bitmapdata
);
callback
(
new
egret
.
Bitmap
(
texture
));
}
}
_bg
:
egret
.
Bitmap
;
_progress
:
egret
.
Bitmap
;
loadImage
()
{
var
bg
:
egret
.
Shape
=
new
egret
.
Shape
();
bg
.
graphics
.
beginFill
(
0x000000
,
0
);
bg
.
graphics
.
drawRect
(
0
,
0
,
750
,
1624
);
bg
.
graphics
.
endFill
();
bg
.
touchEnabled
=
true
;
this
.
addChild
(
bg
);
this
.
getBitmap
(
Loading2
.
bg
,
(
bitmap
:
egret
.
Bitmap
)
=>
{
const
t
=
Date
.
now
()
-
window
[
'__startTime__'
];
console
.
log
(
`首屏loading显示时间:
${
t
}
ms`
);
this
.
_bg
=
bitmap
;
this
.
_bg
.
x
=
295
;
this
.
_bg
.
y
=
288
;
this
.
addChild
(
this
.
_bg
);
})
this
.
getBitmap
(
Loading2
.
progress
,
(
bitmap
:
egret
.
Bitmap
)
=>
{
this
.
_progress
=
bitmap
;
this
.
_progress
.
x
=
375
;
this
.
_progress
.
y
=
380
;
this
.
_progress
.
anchorOffsetX
=
this
.
_progress
.
anchorOffsetY
=
28
;
this
.
addChild
(
this
.
_progress
);
})
}
static
get
instace
():
Loading2
{
return
Loading2
.
_instance
||
(
Loading2
.
_instance
=
new
Loading2
());
}
show
()
{
Loading2
.
_parent
.
addChild
(
this
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
hide
()
{
if
(
this
.
parent
)
Loading2
.
_parent
.
removeChild
(
this
);
this
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
static
init
(
parent
:
egret
.
Sprite
)
{
Loading2
.
_parent
=
parent
;
}
onEnterFrame
()
{
if
(
this
.
_progress
)
this
.
_progress
.
rotation
+=
5
;
}
}
egret/src/something/uis/PropGuide.ts
View file @
e662614e
...
...
@@ -12,7 +12,6 @@ export class PropGuide extends egret.DisplayObjectContainer {
hammerBtn
:
egret
.
Bitmap
;
stepBtn
:
egret
.
Bitmap
;
msgTxt
:
egret
.
TextField
;
stepCircle
:
egret
.
Shape
;
constructor
()
{
super
()
this
.
bg
=
new
egret
.
Shape
();
...
...
@@ -40,12 +39,6 @@ export class PropGuide extends egret.DisplayObjectContainer {
text
.
width
=
500
;
this
.
addChild
(
text
);
this
.
msgTxt
=
text
;
//步数的圆
this
.
stepCircle
=
new
egret
.
Shape
();
this
.
stepCircle
.
graphics
.
beginFill
(
0xff0000
,
0.5
);
this
.
stepCircle
.
graphics
.
drawCircle
(
123
,
98
,
72
);
this
.
stepCircle
.
graphics
.
endFill
();
this
.
addChild
(
this
.
stepCircle
);
this
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
this
.
parent
)
this
.
parent
.
removeChild
(
this
)
},
this
)
...
...
mock/happyclear/home.json
View file @
e662614e
...
...
@@ -7,7 +7,20 @@
"wealth"
:
13
,
"totalStars"
:
120
,
"levels"
:
[],
"remainProp"
:
[],
"remainProp"
:
[
{
"type"
:
2
,
"num"
:
4
},
{
"type"
:
3
,
"num"
:
4
},
{
"type"
:
4
,
"num"
:
5
}
],
"remainEnargy"
:
15
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
10
,
...
...
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