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
694371b9
Commit
694371b9
authored
Oct 30, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Plain Diff
1
parents
4e30504f
d510b816
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
112 additions
and
66 deletions
+112
-66
H52Scene.ts
egret/src/H52Scene.ts
+4
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+10
-2
AdSmallComp.ts
egret/src/mapScene/AdSmallComp.ts
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+2
-1
ScratchIcon.ts
egret/src/mapScene/icon/ScratchIcon.ts
+3
-0
TurntableIcon.ts
egret/src/mapScene/icon/TurntableIcon.ts
+2
-2
BagPanel.ts
egret/src/panels/BagPanel.ts
+2
-2
InvitePrizePanel.ts
egret/src/panels/InvitePrizePanel.ts
+2
-2
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+3
-1
ScratchPrizePanel.ts
egret/src/panels/ScratchPrizePanel.ts
+2
-0
HairballGreyDisAni.ts
egret/src/something/anis/HairballGreyDisAni.ts
+72
-29
Ani.ts
egret/src/something/class/Ani.ts
+2
-1
advert.json
mock/happyclear/advert.json
+3
-3
getBackReward.json
mock/happyclear/getBackReward.json
+1
-1
getInviteInfo.json
mock/happyclear/getInviteInfo.json
+1
-19
home.json
mock/happyclear/home.json
+2
-2
No files found.
egret/src/H52Scene.ts
View file @
694371b9
import
Scene
from
"../libs/new_wx/components/Scene"
;
import
Utils
from
"./Utils"
;
import
PanelCtrl
from
"../libs/new_wx/ctrls/panelCtrl"
;
import
{
NetManager
}
from
"../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"./Main"
;
export
default
class
H52Scene
extends
Scene
{
async
start
(
data
?)
{
NetManager
.
ins
.
showLog
(
getlogItem
(
51
));
super
.
start
();
this
[
'group'
].
y
=
(
this
.
stage
.
stageHeight
-
1624
)
/
2
// this.height=this.stage.stageHeight;
...
...
@@ -13,6 +16,7 @@ export default class H52Scene extends Scene {
// PanelCtrl.instance.show('inviterule')
// },this);
this
[
'gobtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
51
));
const
code
=
Utils
.
getRequestByKey
(
'shareCode'
);
window
.
location
.
href
=
`
${
window
[
'targetUrl'
]}
&shareCode=
${
code
}
`
},
this
);
...
...
egret/src/mainScene/MainScene.ts
View file @
694371b9
...
...
@@ -163,6 +163,8 @@ export default class MainScene extends Scene {
oneStepScore
:
number
;
//果冻有消除的标记;
jellyBrokenMark
:
boolean
;
//有毛球消失的动画时,延迟掉落时间
hairballBrokenMark
:
boolean
;
/**
* 判断连通的状态
* 1表示存在小列连通到大列,从右往左遍历
...
...
@@ -1708,13 +1710,15 @@ export default class MainScene extends Scene {
this
.
eliminate
();
},
200
)
}
else
{
//没有可消除元素,执行掉落
//没有可消除元素,执行掉落,又加定制,因为毛球的消失动画比较长 650ms,用500
var
time
=
this
.
hairballBrokenMark
?
500
:
200
;
this
.
hairballBrokenMark
=
false
;
setTimeout
(()
=>
{
this
.
fall
(()
=>
{
//掉落停止回调
this
.
fallCallback
();
});
},
200
)
},
time
)
}
}
/**
...
...
@@ -2049,6 +2053,8 @@ export default class MainScene extends Scene {
ele
.
setState
(
StateType
.
HAIRBALLGREY
,
false
)
//算个数
this
.
goElementTarget
(
ElementType
.
HAIRBALLGREY
,
[
ele
.
x
,
ele
.
y
]);
//标记有毛球消失
this
.
hairballBrokenMark
=
true
}
//有黑色毛球的,一次眩晕,两次消失
else
if
(
ele
.
hasState
(
StateType
.
HAIRBALLGREY
))
{
...
...
@@ -2065,6 +2071,8 @@ export default class MainScene extends Scene {
ele
.
setState
(
StateType
.
HAIRBALLBLACK
,
false
)
//算个数
this
.
goElementTarget
(
ElementType
.
HAIRBALLBLACK
,
[
ele
.
x
,
ele
.
y
]);
//标记有毛球消失
this
.
hairballBrokenMark
=
true
}
}
//如果有特效,存下
...
...
egret/src/mapScene/AdSmallComp.ts
View file @
694371b9
...
...
@@ -29,7 +29,7 @@ export default class AdSmallComp extends ComponentBase {
this
[
'img'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
data
.
logid
)
NetManager
.
ins
.
show
Log
(
getlogItem
(
data
.
logid
));
NetManager
.
ins
.
click
Log
(
getlogItem
(
data
.
logid
));
wait
(
50
).
then
(()
=>
{
window
.
location
.
href
=
result
.
url
;
});
...
...
egret/src/mapScene/MapScene.ts
View file @
694371b9
...
...
@@ -73,6 +73,7 @@ export default class MapScene extends Scene {
}
if
(
!
success
)
{
return
;
}
showToast
(
"帮刮成功!"
);
NetManager
.
ins
.
showLog
(
getlogItem
(
52
));
NetManager
.
ins
.
showLog
(
getlogItem
(
36
));
},
_code
);
}
...
...
@@ -301,7 +302,7 @@ export default class MapScene extends Scene {
if
(
mapAdvert
==
null
)
mapAdvert
=
{
enable
:
false
,
advertList
:
[]}
this
[
'adBtn'
].
visible
=
mapAdvert
.
enable
;
if
(
this
[
'adBtn'
])
{
if
(
this
[
'adBtn'
]
.
visible
)
{
NetManager
.
ins
.
showLog
(
getlogItem
(
32
));
}
if
(
mapAdvert
.
enable
)
{
...
...
egret/src/mapScene/icon/ScratchIcon.ts
View file @
694371b9
...
...
@@ -8,12 +8,14 @@ import { loadSvga } from "../../loadSvga";
import
getResPath
from
"../../../libs/new_tc/getResPath"
;
import
Utils
from
"../../Utils"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
getlogItem
}
from
"../../Main"
;
export
default
class
ScratchIcon
extends
IconBase
{
private
cutTimer
:
CutTimer
=
null
;
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
super
(
name
,
group
,
btn
,
tipsBg
,
tipsLabel
);
NetManager
.
ins
.
showLog
(
getlogItem
(
49
));
}
protected
start
()
{
...
...
@@ -64,6 +66,7 @@ export default class ScratchIcon extends IconBase {
*/
protected
onTouchBtn
(
e
:
egret
.
TouchEvent
)
{
super
.
onTouchBtn
(
e
);
NetManager
.
ins
.
showLog
(
getlogItem
(
49
));
NetManager
.
ins
.
scratchGetTaskInfo
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
...
...
egret/src/mapScene/icon/TurntableIcon.ts
View file @
694371b9
...
...
@@ -11,11 +11,11 @@ import { getlogItem } from "../../Main";
export
default
class
TurntableIcon
extends
IconBase
{
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
super
(
name
,
group
,
btn
,
tipsBg
,
tipsLabel
);
NetManager
.
ins
.
showLog
(
getlogItem
(
43
));
}
protected
start
()
{
super
.
start
();
NetManager
.
ins
.
showLog
(
getlogItem
(
43
));
//有免费次数
//没有免费次数
//如果元宝足够
...
...
@@ -23,8 +23,8 @@ export default class TurntableIcon extends IconBase {
}
updateIcon
(){
NetManager
.
ins
.
clickLog
(
getlogItem
(
43
));
NetManager
.
ins
.
hc_turnableBaseInfo
((
success
,
res
)
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
43
));
if
(
!
success
){
this
.
visible
=
false
;
return
;
...
...
egret/src/panels/BagPanel.ts
View file @
694371b9
...
...
@@ -32,14 +32,14 @@ export default class BagPanel extends Panel {
this
[
'btn2'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
'group1'
].
visible
=
true
;
this
[
'group2'
].
visible
=
false
;
NetManager
.
ins
.
click
Log
(
getlogItem
(
39
));
NetManager
.
ins
.
show
Log
(
getlogItem
(
39
));
},
this
);
this
[
'recordbtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
window
.
location
.
href
=
window
[
'__link__'
];
},
this
);
this
[
'shopbtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
PanelCtrl
.
instance
.
show
(
'Shop'
);
NetManager
.
ins
.
show
Log
(
getlogItem
(
39
));
NetManager
.
ins
.
click
Log
(
getlogItem
(
39
));
},
this
);
this
.
list
.
itemRenderer
=
BagItemRenderer
;
...
...
egret/src/panels/InvitePrizePanel.ts
View file @
694371b9
...
...
@@ -23,7 +23,7 @@ export default class InvitePrizePanel extends Panel {
start
()
{
super
.
start
();
NetManager
.
ins
.
showLog
(
getlogItem
(
3
8
));
NetManager
.
ins
.
showLog
(
getlogItem
(
3
7
));
}
protected
onSkinComplete
()
{
...
...
@@ -60,7 +60,7 @@ export default class InvitePrizePanel extends Panel {
}
onTapGoPrize
()
{
NetManager
.
ins
.
show
Log
(
getlogItem
(
37
));
NetManager
.
ins
.
click
Log
(
getlogItem
(
37
));
window
.
location
.
href
=
window
[
'__link__'
];
}
...
...
egret/src/panels/ScratchPanel.ts
View file @
694371b9
...
...
@@ -8,6 +8,7 @@ import CutTimer from "../CutTimer";
import
Utils
from
"../Utils"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
GradientType
=
egret
.
GradientType
;
import
{
getlogItem
}
from
"../Main"
;
export
default
class
ScratchPanel
extends
Panel
{
private
cutTimer
:
CutTimer
;
...
...
@@ -82,7 +83,7 @@ export default class ScratchPanel extends Panel {
}
showlog
()
{
NetManager
.
ins
.
showLog
(
getlogItem
(
50
));
}
initEvents
()
{
...
...
@@ -261,6 +262,7 @@ class ScratchItem extends eui.ItemRenderer {
let
s
=
this
.
data
.
avatar
||
"http://yun.duiba.com.cn/db_games/default_avatar.png"
;
this
.
img
.
source
=
this
.
data
.
avatar
||
"http://yun.duiba.com.cn/db_games/default_avatar.png"
;
this
.
img
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
50
));
NetManager
.
ins
.
scratchGetShareCode
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
...
...
egret/src/panels/ScratchPrizePanel.ts
View file @
694371b9
...
...
@@ -24,6 +24,7 @@ export default class ScratchPrizePanel extends Panel {
start
()
{
super
.
start
();
this
.
initUI
();
NetManager
.
ins
.
showLog
(
getlogItem
(
53
));
NetManager
.
ins
.
showLog
(
getlogItem
(
54
));
}
...
...
@@ -51,6 +52,7 @@ export default class ScratchPrizePanel extends Panel {
super
.
onTouchTap_closeBtn
();
break
;
case
(
e
.
target
==
this
.
ok_btn
):
// 去领奖
NetManager
.
ins
.
clickLog
(
getlogItem
(
53
));
window
.
location
.
href
=
window
[
'__link__'
];
break
;
case
(
e
.
target
==
this
.
game_btn
):
// 继续闯关
...
...
egret/src/something/anis/HairballGreyDisAni.ts
View file @
694371b9
import
{
Ani
}
from
"../class/Ani"
;
import
{
ImageAni
}
from
"../class/ImageAni"
;
/**
* 待写
* 毛球消失动效
*/
export
class
HairballGreyDisAni
extends
Ani
{
/**
* 图片
*/
showImage
:
ImageAni
;
constructor
()
{
super
();
this
.
aniName
=
"HairballGreyDisAni"
;
var
arr
=
[]
for
(
var
i
=
1
;
i
<=
19
;
i
++
)
{
arr
.
push
(
"eleDis"
+
i
+
"_png"
);
}
this
.
showImage
=
new
ImageAni
(
arr
);
this
.
addChild
(
this
.
showImage
)
}
const
offsetX
=
71
/
2
;
const
offsetY
=
62
/
2
;
play
()
{
//重置图片
this
.
showImage
.
currentFrame
=
0
;
this
.
showImage
.
source
=
this
.
showImage
.
sourceAll
[
0
];
this
.
showImage
.
play
(()
=>
{
this
.
recover
();
})
}
}
/**
* 碎片位置参数
...
...
@@ -112,4 +86,73 @@ const config = [
"width"
:
65
,
"height"
:
23
}
]
\ No newline at end of file
]
/**
* 毛球消失动效
*/
export
class
HairballGreyDisAni
extends
Ani
{
pieces
:
egret
.
Bitmap
[];
upBg
:
egret
.
Bitmap
;
constructor
()
{
super
();
this
.
aniName
=
"HairballGreyDisAni"
;
this
.
pieces
=
[]
for
(
var
i
=
0
;
i
<
config
.
length
;
i
++
)
{
var
bitmap
=
new
egret
.
Bitmap
(
RES
.
getRes
(
config
[
i
].
name
+
"_png"
))
this
.
addChild
(
bitmap
)
this
.
pieces
.
push
(
bitmap
);
}
this
.
upBg
=
new
egret
.
Bitmap
(
RES
.
getRes
(
"hairballDisBg_png"
));
this
.
upBg
.
anchorOffsetX
=
offsetX
;
this
.
upBg
.
anchorOffsetY
=
offsetY
;
this
.
addChild
(
this
.
upBg
);
this
.
reset
();
}
private
reset
()
{
for
(
var
i
=
0
;
i
<
config
.
length
;
i
++
)
{
this
.
pieces
[
i
].
x
=
config
[
i
].
x
-
offsetX
;
this
.
pieces
[
i
].
y
=
config
[
i
].
y
-
offsetY
;
this
.
pieces
[
i
].
alpha
=
1
;
}
this
.
upBg
.
scaleX
=
this
.
upBg
.
scaleY
=
1
;
this
.
upBg
.
alpha
=
1
;
}
play
()
{
//重置
this
.
reset
();
//动画,完了要调this.recover()
egret
.
Tween
.
get
(
this
.
upBg
)
.
to
({
scaleX
:
1.5
,
scaleY
:
1.5
},
150
)
egret
.
Tween
.
get
(
this
.
upBg
)
.
wait
(
50
)
.
to
({
alpha
:
0
},
100
)
.
call
(()
=>
{
//碎片掉落
for
(
let
i
=
0
;
i
<
config
.
length
;
i
++
)
{
let
p
=
this
.
pieces
[
i
];
let
y
=
config
[
i
].
y
;
egret
.
Tween
.
get
(
p
)
.
wait
(
i
*
30
)
.
to
({
y
:
y
+
6
},
200
);
egret
.
Tween
.
get
(
p
)
.
wait
(
i
*
30
+
150
)
.
to
({
alpha
:
0
},
50
)
.
call
(()
=>
{
if
(
i
==
config
.
length
-
1
){
this
.
recover
();
}
})
}
})
}
}
egret/src/something/class/Ani.ts
View file @
694371b9
...
...
@@ -2,8 +2,9 @@ import { Pool } from "../Pool";
/**
* 动效的基类,包含一些固定方法
* play无参数,不需要回调
* play无参数,不需要回调
,只播放一次
* 有自动回收方法recover
* 子类必须重写aniName,否则回收会出问题
*/
export
class
Ani
extends
egret
.
DisplayObjectContainer
{
/**
...
...
mock/happyclear/advert.json
View file @
694371b9
{
"code"
:
"0000000000"
,
"data"
:
{
"mapAdvert"
:
{
"mapAdvert
1
"
:
{
"enable"
:
true
,
"advertList"
:
[
{
...
...
@@ -10,7 +10,7 @@
}
]
},
"noticeAdvert"
:
{
"noticeA
1
dvert"
:
{
"enable"
:
true
,
"advertList"
:
[
{
...
...
@@ -19,7 +19,7 @@
}
]
},
"popupAdvert"
:
{
"enable"
:
true
,
"popupAd
1
vert"
:
{
"enable"
:
true
,
"advertList"
:
[
{
"img"
:
"//yun.duiba.com.cn/images/201910/zqtdp6xibw.jpg"
,
...
...
mock/happyclear/getBackReward.json
View file @
694371b9
...
...
@@ -16,6 +16,6 @@
"value"
:
"虚拟商品标识符"
},
"desc"
:
"OK"
,
"success"
:
true
,
"success"
:
0
,
"timestamp"
:
1572079274940
}
\ No newline at end of file
mock/happyclear/getInviteInfo.json
View file @
694371b9
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1572249599076
,
"data"
:
{
"invitationId"
:
null
,
"invitationCount"
:
null
,
"sysTime"
:
null
,
"endTime"
:
null
,
"completeFlag"
:
6
,
"openPrizMsg"
:
null
,
"prizeType"
:
null
,
"prizeName"
:
null
,
"prizeImg"
:
null
,
"facePrice"
:
null
,
"invitationUser"
:
null
}
}
\ No newline at end of file
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1572403459420
,
"data"
:{
"invitationId"
:
null
,
"invitationCount"
:
1
,
"sysTime"
:
1572403459405
,
"endTime"
:
1572489858000
,
"completeFlag"
:
0
,
"openPrizMsg"
:
null
,
"prizeType"
:
"7"
,
"prizeName"
:
null
,
"prizeImg"
:
"//yun.dui88.com/images/201910/s0yhv1nlil.jpeg"
,
"facePrice"
:
"3651404_286462788044574721"
,
"invitationUser"
:[]}}
\ No newline at end of file
mock/happyclear/home.json
View file @
694371b9
...
...
@@ -22,9 +22,9 @@
"num"
:
3
}
],
"remainEnargy"
:
1
,
"remainEnargy"
:
5
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
0
,
"canReceiveTreasureBoxNum"
:
1
0
,
"nextRangeStarsNum"
:
0
,
"isGetAllTreasureBox"
:
true
,
"refectionCountdown"
:
1685
...
...
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