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
a459a1d6
Commit
a459a1d6
authored
Nov 05, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
1
parents
d5b7e184
05d0d630
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
223 additions
and
61 deletions
+223
-61
MainBase.ts
egret/libs/new_wx/MainBase.ts
+1
-0
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+1
-1
hbcuttime.tmproject
egret/resource/TextureMerger/hbcuttime.tmproject
+1
-1
hbrule.tmproject
egret/resource/TextureMerger/hbrule.tmproject
+1
-0
hbCutTime_btn_null.png
egret/resource/assets/hbCutTime/hbCutTime_btn_null.png
+0
-0
hbNoPrize_bg.png
egret/resource/assets/hbNoPrize/hbNoPrize_bg.png
+0
-0
hbRule_bg.png
egret/resource/assets/hbRule/hbRule_bg.png
+0
-0
festivalTargetBg.png
egret/resource/assets/mainScene/festivalTargetBg.png
+0
-0
default.res.json
egret/resource/default.res.json
+2
-2
default.thm.json
egret/resource/default.thm.json
+1
-0
HbCutTimeSkin.exml
egret/resource/skins/HbCutTimeSkin.exml
+0
-8
HbNoPrizeSkin.exml
egret/resource/skins/HbNoPrizeSkin.exml
+2
-0
HbPrizeSkin.exml
egret/resource/skins/HbPrizeSkin.exml
+2
-2
HbRuleSkin.exml
egret/resource/skins/HbRuleSkin.exml
+21
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+4
-0
HbCutTime.ts
egret/src/panels/HongbaoRain/HbCutTime.ts
+20
-6
HbGame.ts
egret/src/panels/HongbaoRain/HbGame.ts
+17
-18
HbNoPrize.ts
egret/src/panels/HongbaoRain/HbNoPrize.ts
+15
-1
HbPrize.ts
egret/src/panels/HongbaoRain/HbPrize.ts
+16
-5
HbRule.ts
egret/src/panels/HongbaoRain/HbRule.ts
+50
-0
FestivalTarget.ts
egret/src/something/uis/FestivalTarget.ts
+49
-0
hbRainDoJoin.json
mock/happyclear/hbRainDoJoin.json
+20
-17
No files found.
egret/libs/new_wx/MainBase.ts
View file @
a459a1d6
...
...
@@ -273,6 +273,7 @@ export default class MainBase extends eui.UILayer {
RES
.
getResAsync
(
"curScoreNum"
+
i
+
"_png"
)
}
var
arr
=
[
"festivalTargetBg"
,
"hairballDisBg"
,
"brownBallFace"
,
"greyBallFace"
,
...
...
egret/libs/tw/manager/NetManager.ts
View file @
a459a1d6
...
...
@@ -2211,7 +2211,7 @@ export class NetManager extends ABNetManager {
const
net
:
INetData
=
{
name
:
NetName
.
HBRAIN_BASEINFO
,
uri
:
window
[
'duiba'
]
+
'/customActivity/happyclear/redRain/doJoin'
,
type
:
'
ge
t'
,
type
:
'
pos
t'
,
dataType
:
'json'
,
hideMsg
:
true
,
param
:
{
...
...
egret/resource/TextureMerger/hbcuttime.tmproject
View file @
a459a1d6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"hbcuttime","version":5,"files":["../assets/hbCutTime/hbCutTime_bg.png","../assets/hbCutTime/hbCutTime_btn_disable.png","../assets/hbCutTime/hbCutTime_btn_enable.png","../assets/hbCutTime/hbCutTime_cutLine_disable.png","../assets/hbCutTime/hbCutTime_cutLine_enable.png","../assets/hbCutTime/hbCutTime_rule_btn.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"hbcuttime","version":5,"files":["../assets/hbCutTime/hbCutTime_bg.png","../assets/hbCutTime/hbCutTime_btn_disable.png","../assets/hbCutTime/hbCutTime_btn_enable.png","../assets/hbCutTime/hbCutTime_cutLine_disable.png","../assets/hbCutTime/hbCutTime_cutLine_enable.png","../assets/hbCutTime/hbCutTime_rule_btn.png","../assets/hbCutTime/hbCutTime_btn_null.png"]}
\ No newline at end of file
egret/resource/TextureMerger/hbrule.tmproject
0 → 100644
View file @
a459a1d6
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"hbrule","version":5,"files":["../assets/hbRule/hbRule_bg.png"]}
\ No newline at end of file
egret/resource/assets/hbCutTime/hbCutTime_btn_null.png
0 → 100644
View file @
a459a1d6
16.9 KB
egret/resource/assets/hbNoPrize/hbNoPrize_bg.png
View replaced file @
d5b7e184
View file @
a459a1d6
222 KB
|
W:
|
H:
210 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/hbRule/hbRule_bg.png
0 → 100644
View file @
a459a1d6
180 KB
egret/resource/assets/mainScene/festivalTargetBg.png
0 → 100644
View file @
a459a1d6
12.4 KB
egret/resource/default.res.json
View file @
a459a1d6
...
...
@@ -97,7 +97,7 @@
"name"
:
"h5"
},
{
"keys"
:
"bonusFra1_png,bonusFra10_png,bonusFra11_png,bonusFra12_png,bonusFra13_png,bonusFra14_png,bonusFra15_png,bonusFra16_png,bonusFra17_png,bonusFra18_png,bonusFra19_png,bonusFra2_png,bonusFra20_png,bonusFra21_png,bonusFra22_png,bonusFra23_png,bonusFra24_png,bonusFra25_png,bonusFra26_png,bonusFra27_png,bonusFra3_png,bonusFra4_png,bonusFra5_png,bonusFra6_png,bonusFra7_png,bonusFra8_png,bonusFra9_png,bonusShoot_png,bonusTime_png,boom1_png,boom10_png,boom11_png,boom12_png,boom13_png,boom14_png,boom15_png,boom16_png,boom17_png,boom18_png,boom2_png,boom3_png,boom4_png,boom5_png,boom6_png,boom7_png,boom8_png,boom9_png,boomBtn_png,chooseRect_png,dangqianfenshu_png,eggPiece1_png,eggPiece2_png,eggPiece3_png,eggPiece4_png,eggPiece5_png,eggStatus0_png,eggStatus1_png,eggStatus2_png,ele0_png,ele0Exp_png,ele0Line_png,ele1_png,ele1Exp_png,ele1Line_png,ele2_png,ele2Exp_png,ele2Line_png,ele3_png,ele3Exp_png,ele3Line_png,ele4_png,ele4Exp_png,ele4Line_png,ele5_png,ele6_png,ele7_png,ele8_png,ele9_png,eleDis1_png,eleDis10_png,eleDis11_png,eleDis12_png,eleDis13_png,eleDis14_png,eleDis15_png,eleDis16_png,eleDis17_png,eleDis18_png,eleDis19_png,eleDis2_png,eleDis3_png,eleDis4_png,eleDis5_png,eleDis6_png,eleDis7_png,eleDis8_png,eleDis9_png,exLighting1_png,exLighting11_png,exLighting14_png,exLighting16_png,exLighting18_png,exLighting19_png,exLighting21_png,exLighting23_png,exLighting25_png,exLighting27_png,exLighting29_png,exLighting3_png,exLighting32_png,exLighting34_png,exLighting5_png,exLighting7_png,exLighting9_png,greenCircleDown_png,greenCircleUp_png,guidePropBoom_png,guidePropCow_png,guidePropHammer_png,guidePropHand_png,guidePropMsgPanel_png,guidePropShoe_png,hammerBtn_png,ice2_png,ice3_png,ice4_png,ice5_png,ice6_png,jellyArrow_png,leftArrow_png,lightedStar_png,lineLight_png,lockVine_png,magicLion_png,magicLionBg_png,mainMusicBtnOff_png,mainMusicBtnOn_png,mainQuestionBtn_png,mainQuitBtn_png,mainSettingBg_png,mainSoundBtnOff_png,mainSoundBtnOn_png,main_mapbottom_png,playSceneBg_jpg,progressDown_png,propNum0_png,propNum1_png,propNum2_png,propNum3_png,propNum4_png,propNum5_png,propNum6_png,propNum7_png,propNum8_png,propNum9_png,propNumBg_png,rectLat_png,rightArrow_png,rightMark_png,rock2_png,rock3_png,rock4_png,rock5_png,rock6_png,scoreNumber0_png,scoreNumber1_png,scoreNumber2_png,scoreNumber3_png,scoreNumber4_png,scoreNumber5_png,scoreNumber6_png,scoreNumber7_png,scoreNumber8_png,scoreNumber9_png,setting_png,starProgress_png,stepAni1_png,stepAni10_png,stepAni11_png,stepAni2_png,stepAni3_png,stepAni4_png,stepAni5_png,stepAni6_png,stepAni7_png,stepAni8_png,stepAni9_png,stepBtn_png,stepNumber0_png,stepNumber1_png,stepNumber2_png,stepNumber3_png,stepNumber4_png,stepNumber5_png,stepNumber6_png,stepNumber7_png,stepNumber8_png,stepNumber9_png,stepsBoard_png,targetBoard_png,targetNumber0_png,targetNumber1_png,targetNumber2_png,targetNumber3_png,targetNumber4_png,targetNumber5_png,targetNumber6_png,targetNumber7_png,targetNumber8_png,targetNumber9_png,unlightedStar_png,yellowCircleDown_png,yellowCircleUp_png,yezi1_png,bubbleStar19_png,bubleEle0_png,bubleEle1_png,bubleEle2_png,bubleEle3_png,bubleEle4_png,bubbleStar1_png,bubbleStar2_png,bubbleStar3_png,bubbleStar4_png,bubbleStar5_png,bubbleStar6_png,bubbleStar7_png,bubbleStar8_png,bubbleStar9_png,bubbleStar10_png,bubbleStar11_png,bubbleStar12_png,bubbleStar13_png,bubbleStar14_png,bubbleStar15_png,bubbleStar16_png,bubbleStar17_png,bubbleStar18_png,ele11_png,ele10_png,brownBallFace_png,eyeDownLeft_png,eyeSingle_png,greyBallFace_png,eyeDownRight_png,hairballPiece9_png,hairballPiece8_png,hairballPiece7_png,hairballPiece6_png,hairballPiece5_png,hairballPiece4_png,hairballPiece3_png,hairballPiece2_png,hairballPiece11_png,hairballPiece10_png,hairballPiece1_png,hairballDisBg_png,curScoreNum9_png,curScoreNum8_png,curScoreNum7_png,curScoreNum6_png,curScoreNum5_png,curScoreNum4_png,curScoreNum3_png,curScoreNum2_png,curScoreNum1_png,curScoreNum0_png"
,
"keys"
:
"bonusFra1_png,bonusFra10_png,bonusFra11_png,bonusFra12_png,bonusFra13_png,bonusFra14_png,bonusFra15_png,bonusFra16_png,bonusFra17_png,bonusFra18_png,bonusFra19_png,bonusFra2_png,bonusFra20_png,bonusFra21_png,bonusFra22_png,bonusFra23_png,bonusFra24_png,bonusFra25_png,bonusFra26_png,bonusFra27_png,bonusFra3_png,bonusFra4_png,bonusFra5_png,bonusFra6_png,bonusFra7_png,bonusFra8_png,bonusFra9_png,bonusShoot_png,bonusTime_png,boom1_png,boom10_png,boom11_png,boom12_png,boom13_png,boom14_png,boom15_png,boom16_png,boom17_png,boom18_png,boom2_png,boom3_png,boom4_png,boom5_png,boom6_png,boom7_png,boom8_png,boom9_png,boomBtn_png,chooseRect_png,dangqianfenshu_png,eggPiece1_png,eggPiece2_png,eggPiece3_png,eggPiece4_png,eggPiece5_png,eggStatus0_png,eggStatus1_png,eggStatus2_png,ele0_png,ele0Exp_png,ele0Line_png,ele1_png,ele1Exp_png,ele1Line_png,ele2_png,ele2Exp_png,ele2Line_png,ele3_png,ele3Exp_png,ele3Line_png,ele4_png,ele4Exp_png,ele4Line_png,ele5_png,ele6_png,ele7_png,ele8_png,ele9_png,eleDis1_png,eleDis10_png,eleDis11_png,eleDis12_png,eleDis13_png,eleDis14_png,eleDis15_png,eleDis16_png,eleDis17_png,eleDis18_png,eleDis19_png,eleDis2_png,eleDis3_png,eleDis4_png,eleDis5_png,eleDis6_png,eleDis7_png,eleDis8_png,eleDis9_png,exLighting1_png,exLighting11_png,exLighting14_png,exLighting16_png,exLighting18_png,exLighting19_png,exLighting21_png,exLighting23_png,exLighting25_png,exLighting27_png,exLighting29_png,exLighting3_png,exLighting32_png,exLighting34_png,exLighting5_png,exLighting7_png,exLighting9_png,greenCircleDown_png,greenCircleUp_png,guidePropBoom_png,guidePropCow_png,guidePropHammer_png,guidePropHand_png,guidePropMsgPanel_png,guidePropShoe_png,hammerBtn_png,ice2_png,ice3_png,ice4_png,ice5_png,ice6_png,jellyArrow_png,leftArrow_png,lightedStar_png,lineLight_png,lockVine_png,magicLion_png,magicLionBg_png,mainMusicBtnOff_png,mainMusicBtnOn_png,mainQuestionBtn_png,mainQuitBtn_png,mainSettingBg_png,mainSoundBtnOff_png,mainSoundBtnOn_png,main_mapbottom_png,playSceneBg_jpg,progressDown_png,propNum0_png,propNum1_png,propNum2_png,propNum3_png,propNum4_png,propNum5_png,propNum6_png,propNum7_png,propNum8_png,propNum9_png,propNumBg_png,rectLat_png,rightArrow_png,rightMark_png,rock2_png,rock3_png,rock4_png,rock5_png,rock6_png,scoreNumber0_png,scoreNumber1_png,scoreNumber2_png,scoreNumber3_png,scoreNumber4_png,scoreNumber5_png,scoreNumber6_png,scoreNumber7_png,scoreNumber8_png,scoreNumber9_png,setting_png,starProgress_png,stepAni1_png,stepAni10_png,stepAni11_png,stepAni2_png,stepAni3_png,stepAni4_png,stepAni5_png,stepAni6_png,stepAni7_png,stepAni8_png,stepAni9_png,stepBtn_png,stepNumber0_png,stepNumber1_png,stepNumber2_png,stepNumber3_png,stepNumber4_png,stepNumber5_png,stepNumber6_png,stepNumber7_png,stepNumber8_png,stepNumber9_png,stepsBoard_png,targetBoard_png,targetNumber0_png,targetNumber1_png,targetNumber2_png,targetNumber3_png,targetNumber4_png,targetNumber5_png,targetNumber6_png,targetNumber7_png,targetNumber8_png,targetNumber9_png,unlightedStar_png,yellowCircleDown_png,yellowCircleUp_png,yezi1_png,bubbleStar19_png,bubleEle0_png,bubleEle1_png,bubleEle2_png,bubleEle3_png,bubleEle4_png,bubbleStar1_png,bubbleStar2_png,bubbleStar3_png,bubbleStar4_png,bubbleStar5_png,bubbleStar6_png,bubbleStar7_png,bubbleStar8_png,bubbleStar9_png,bubbleStar10_png,bubbleStar11_png,bubbleStar12_png,bubbleStar13_png,bubbleStar14_png,bubbleStar15_png,bubbleStar16_png,bubbleStar17_png,bubbleStar18_png,ele11_png,ele10_png,brownBallFace_png,eyeDownLeft_png,eyeSingle_png,greyBallFace_png,eyeDownRight_png,hairballPiece9_png,hairballPiece8_png,hairballPiece7_png,hairballPiece6_png,hairballPiece5_png,hairballPiece4_png,hairballPiece3_png,hairballPiece2_png,hairballPiece11_png,hairballPiece10_png,hairballPiece1_png,hairballDisBg_png,curScoreNum9_png,curScoreNum8_png,curScoreNum7_png,curScoreNum6_png,curScoreNum5_png,curScoreNum4_png,curScoreNum3_png,curScoreNum2_png,curScoreNum1_png,curScoreNum0_png
,festivalTargetBg_png
"
,
"name"
:
"main2"
},
{
...
...
@@ -177,7 +177,7 @@
"name"
:
"turntableprize"
},
{
"keys"
:
"hbCutTime_bg_png,hbCutTime_btn_disable_png,hbCutTime_btn_enable_png,hbCutTime_cutLine_disable_png,hbCutTime_cutLine_enable_png,hbCutTime_rule_btn_png"
,
"keys"
:
"hbCutTime_bg_png,hbCutTime_btn_disable_png,hbCutTime_btn_enable_png,hbCutTime_cutLine_disable_png,hbCutTime_cutLine_enable_png,hbCutTime_rule_btn_png
,hbCutTime_btn_null_png
"
,
"name"
:
"hbcuttime"
},
{
...
...
egret/resource/default.thm.json
View file @
a459a1d6
...
...
@@ -30,6 +30,7 @@
"resource/skins/HbGameSkin.exml"
,
"resource/skins/HbNoPrizeSkin.exml"
,
"resource/skins/HbPrizeSkin.exml"
,
"resource/skins/HbRuleSkin.exml"
,
"resource/skins/IconButtonSkin.exml"
,
"resource/skins/InviteCutTimePanelSkin.exml"
,
"resource/skins/InviteItemSkin.exml"
,
...
...
egret/resource/skins/HbCutTimeSkin.exml
View file @
a459a1d6
...
...
@@ -13,14 +13,6 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"ok_bt"
label=
""
y=
"668"
anchorOffsetX=
"150"
anchorOffsetY=
"48"
horizontalCenter=
"0"
visible=
"false"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"hbCutTime_btn_enable_png"
source.down=
"hbCutTime_btn_enable_png"
source.disabled=
"hbCutTime_btn_disable_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"rule_btn"
label=
""
y=
"740"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
...
...
egret/resource/skins/HbNoPrizeSkin.exml
View file @
a459a1d6
...
...
@@ -19,4 +19,6 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
id=
"tips"
text=
"您的速度太慢啦,奖励已经被抢走了~"
y=
"169"
textColor=
"0xf54500"
verticalAlign=
"bottom"
textAlign=
"center"
horizontalCenter=
"1"
fontFamily=
"FZY4JW"
/>
<e:Label
text=
"下次继续努力吧!"
y=
"211"
textColor=
"0xF54500"
verticalAlign=
"bottom"
textAlign=
"center"
horizontalCenter=
"0"
fontFamily=
"FZY4JW"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/HbPrizeSkin.exml
View file @
a459a1d6
...
...
@@ -6,8 +6,8 @@
<e:Image
id=
"money"
source=
"signprize元宝_png"
y=
"423.2"
horizontalCenter=
"1"
scaleX=
"0.8"
scaleY=
"0.8"
visible=
"false"
/>
<e:Image
id=
"blood"
source=
"singprize体力_png"
y=
"385.8"
horizontalCenter=
"1"
visible=
"false"
/>
<e:Group
id=
"numsgroup"
x=
"397.38"
y=
"431.4"
visible=
"false"
>
<e:Image
id=
"numsbg
0
"
source=
"signprize_numsbg_png"
x=
"0"
y=
"0"
/>
<e:Label
id=
"propnums
0
"
text=
"X8"
size=
"22"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
/>
<e:Image
id=
"numsbg"
source=
"signprize_numsbg_png"
x=
"0"
y=
"0"
/>
<e:Label
id=
"propnums"
text=
"X8"
size=
"22"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
/>
</e:Group>
<e:Image
id=
"prizeImg"
y=
"422.5"
source=
""
horizontalCenter=
"0"
visible=
"false"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"597"
y=
"284.33"
>
...
...
egret/resource/skins/HbRuleSkin.exml
0 → 100644
View file @
a459a1d6
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"InviteRuleSkin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Rect
left=
"0"
top=
"0"
bottom=
"0"
right=
"0"
fillAlpha=
"0.65"
/>
<e:Image
id=
"ruleBg"
horizontalCenter=
"0.5"
y=
"152"
source=
"hbRule_bg_png"
/>
<e:Scroller
id=
"scroller"
width=
"545"
x=
"104.76"
height=
"507"
y=
"377.2"
>
<e:Group
id=
"group"
width=
"100%"
>
<e:Label
id=
"labContent"
width=
"100%"
text=
""
lineSpacing=
"10"
size=
"30"
multiline=
"true"
textColor=
"0xa54615"
/>
<e:layout>
<e:VerticalLayout/>
</e:layout>
</e:Group>
</e:Scroller>
<e:Button
id=
"closeBtn"
label=
""
x=
"614"
y=
"301"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin>
\ No newline at end of file
egret/src/mainScene/MainScene.ts
View file @
a459a1d6
...
...
@@ -231,6 +231,10 @@ export default class MainScene extends Scene {
this
.
chapterData
=
getChapterData
(
this
.
chapter
);
//初始化目标信息
this
.
initTarget
();
//添加节日元素,条件可能会变
if
(
data
&&
data
.
aaa
){
}
//初始化索引信息,包括10*10的,
Tool
.
init
(
Tool
.
getColOddEven
(
this
.
chapterData
.
map
.
lattices
),
!!
(
this
.
passElements
&&
this
.
passElements
[
ElementType
.
LOLLIPOP
]));
this
.
initUi
();
...
...
egret/src/panels/HongbaoRain/HbCutTime.ts
View file @
a459a1d6
...
...
@@ -2,6 +2,7 @@ import Panel from "../../../libs/new_wx/components/Panel";
import
CutTimer
from
"../../CutTimer"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
HbRule
from
"./HbRule"
;
/**
* 红包雨倒计时
...
...
@@ -10,7 +11,6 @@ export default class HbCutTime extends Panel {
public
cutTimeLabel
:
eui
.
BitmapLabel
;
public
tipImage
:
eui
.
Image
;
public
closeBtn
:
eui
.
Button
;
public
ok_bt
:
eui
.
Button
;
public
rule_btn
:
eui
.
Button
;
public
ok_btn
:
eui
.
Image
;
...
...
@@ -33,14 +33,17 @@ export default class HbCutTime extends Panel {
private
hbRainBaseInfo
()
{
NetManager
.
ins
.
hbRainBaseInfo
((
success
,
res
)
=>
{
if
(
!
success
)
{
this
.
ok_btn
.
source
=
'hbCutTime_btn_null_png'
;
this
.
tipImage
.
source
=
'hbCutTime_cutLine_disable_png'
;
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
return
;
}
let
data
=
res
.
data
;
this
.
cutTimer
=
new
CutTimer
(
this
.
cutTimeLabel
,
'hh时mm分ss秒'
,
()
=>
this
.
h
bRainBaseInfo
());
this
.
cutTimer
=
new
CutTimer
(
this
.
cutTimeLabel
,
'hh时mm分ss秒'
,
()
=>
this
.
h
idePanel
());
let
sysTime
=
res
.
timestamp
;
// 当前系统事件
let
time
;
if
(
data
.
currentSession
)
{
time
=
data
.
currentSession
.
endTime
-
sysTime
;
time
=
data
.
currentSession
.
endTime
-
sysTime
+
3000
;
if
(
data
.
canJoin
)
{
this
.
ok_btn
.
source
=
'hbCutTime_btn_enable_png'
;
this
.
ok_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
...
...
@@ -54,7 +57,7 @@ export default class HbCutTime extends Panel {
this
.
cutTimer
.
start
(
time
);
}
}
else
if
(
data
.
nextSession
)
{
time
=
data
.
nextSession
.
startTime
-
sysTime
;
time
=
data
.
nextSession
.
startTime
-
sysTime
+
3000
;
this
.
ok_btn
.
source
=
'hbCutTime_btn_disable_png'
;
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
this
.
tipImage
.
source
=
'hbCutTime_cutLine_disable_png'
;
...
...
@@ -63,29 +66,40 @@ export default class HbCutTime extends Panel {
this
.
cutTimer
.
start
(
time
);
}
}
else
{
this
.
ok_btn
.
source
=
'hbCutTime_btn_
disable
_png'
;
this
.
ok_btn
.
source
=
'hbCutTime_btn_
null
_png'
;
this
.
tipImage
.
source
=
'hbCutTime_cutLine_disable_png'
;
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
})
}
destroy
()
{
this
.
cutTimer
.
stop
();
super
.
destroy
();
}
protected
onSkinComplete
()
{
}
initEvents
()
{
super
.
initEvents
();
this
.
addEventListener
(
egret
.
Event
.
REMOVED_FROM_STAGE
,
this
.
destroy
,
this
);
this
.
closeBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
ok_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
this
.
rule_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
tapRuleBtn
,
this
);
}
private
tapRuleBtn
()
{
const
rule
=
new
HbRule
();
rule
.
loadSkin
();
rule
.
start
();
this
.
addChild
(
rule
);
}
removeEvents
()
{
super
.
removeEvents
();
this
.
removeEventListener
(
egret
.
Event
.
REMOVED_FROM_STAGE
,
this
.
destroy
,
this
);
this
.
closeBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
this
.
rule_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
tapRuleBtn
,
this
);
...
...
egret/src/panels/HongbaoRain/HbGame.ts
View file @
a459a1d6
...
...
@@ -22,7 +22,8 @@ export default class HbGame extends Panel {
private
rainMgr
:
RainMgr
=
null
;
private
cutTime
:
egret
.
Timer
=
null
;
private
time
:
number
=
0
;
private
time
:
number
=
8
;
private
score
=
0
;
private
scoreLabelStr
=
0
;
...
...
@@ -42,8 +43,6 @@ export default class HbGame extends Panel {
this
.
rainGroup
.
height
=
this
.
width
/
window
.
innerWidth
*
window
.
innerHeight
;
this
.
tipLabel
.
textFlow
=
(
new
HtmlTextParser
).
parser
(
`抢到<b>
${
15
}
</b>个红包才有奖励哦~`
);
this
.
time
=
10
;
this
.
cutTimeLabel
.
text
=
`
${
this
.
time
}
`
}
...
...
@@ -72,50 +71,50 @@ export default class HbGame extends Panel {
if
(
!
success
)
{
switch
(
true
)
{
case
(
code
==
"600015"
):
// 网络错误 //命中风控参与规则
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
2
}
);
break
;
case
(
code
==
"600016"
):
// 游戏分数提交失败~如有疑问,请联系客服 // 苏宁风控 命中
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
2
}
);
break
;
case
(
code
==
"600054"
):
// 红包雨活动暂未开启
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
case
(
code
==
"600055"
):
// 红包雨场次配置异常
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
case
(
code
==
"600056"
):
// 当前红包雨场次不存在
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
case
(
code
==
"600057"
):
// 当前红包雨场次已结束
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
case
(
code
==
"600058"
):
// 分数未达到目标
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
case
(
code
==
"600059"
):
// 红包炸弹活动暂未开启
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
case
(
code
==
"600060"
):
// 当前场次参与次数达到上限
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
case
(
code
==
"600061"
):
// 红包炸弹配置异常
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
case
(
code
==
"600062"
):
// 红包炸弹已经全部领取
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
default
:
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
break
;
}
return
;
}
if
(
!
data
.
option
||
data
.
categoryType
==
1
)
{
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
);
if
(
!
data
||
!
data
.
option
||
data
.
categoryType
==
1
)
{
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
}
);
}
else
{
PanelCtrl
.
instance
.
show
(
'
TurnPrizePanel
'
,
data
);
PanelCtrl
.
instance
.
show
(
'
HbPrize
'
,
data
);
}
},
session
,
this
.
score
);
}
...
...
egret/src/panels/HongbaoRain/HbNoPrize.ts
View file @
a459a1d6
...
...
@@ -13,22 +13,36 @@ import CutTimer from "../../CutTimer";
export
default
class
HbNoPrize
extends
Panel
{
public
closeBtn
:
eui
.
Button
;
public
ok_btn
:
eui
.
Button
;
public
tips
:
eui
.
Label
;
constructor
(
data
)
{
super
();
this
.
data
=
data
;
}
start
()
{
async
start
()
{
super
.
start
();
this
.
initUI
();
}
initUI
()
{
let
type
=
this
.
data
.
type
;
switch
(
true
)
{
case
(
type
==
1
):
this
.
tips
.
text
=
'您的速度太慢啦,奖励已经被抢走了~'
;
break
;
case
(
type
==
2
):
this
.
tips
.
text
=
'您的速度太慢啦,'
;
break
;
default
:
this
.
tips
.
text
=
'您的速度太慢啦,奖励已经被抢走了~'
;
break
;
}
}
protected
onSkinComplete
()
{
}
initEvents
()
{
...
...
egret/src/panels/HongbaoRain/HbPrize.ts
View file @
a459a1d6
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
getHomeData
from
"../../getHomeData"
;
import
{
changeMapScene
}
from
"../../startScene/StartScene"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
SceneCtrl
from
"../../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
/**
* 红包雨奖励
...
...
@@ -40,6 +46,9 @@ export default class HbPrize extends Panel {
this
[
'numsgroup'
].
visible
=
true
;
this
[
'money'
].
visible
=
true
;
this
[
'propnums'
].
text
=
'x'
+
realValue
;
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
break
;
default
:
this
[
'img'
].
visible
=
true
;
...
...
@@ -67,12 +76,14 @@ export default class HbPrize extends Panel {
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
onTouchTap_closeBtn
()
{
super
.
onTouchTap_closeBtn
();
}
onTouchOK
()
{
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
])
{
changeMapScene
();
super
.
hidePanel
();
return
;
}
GDispatcher
.
dispatchEvent
(
"getInviteInfo"
);
PanelCtrl
.
instance
.
show
(
"StartPanel"
,
getHomeData
().
levels
.
length
+
1
);
}
protected
get
closeBtns
():
eui
.
Button
[]
{
...
...
egret/src/panels/HongbaoRain/HbRule.ts
0 → 100644
View file @
a459a1d6
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
{
DataManager
}
from
"../../../libs/tw/manager/DataManager"
;
import
{
HtmlTextParser
}
from
"../../../libs/new_wx/HtmlTextParser"
;
import
getSkinPath
from
"../../../libs/new_wx/utils/getSkinPath"
;
/**
* 邀请规则面板
*/
export
default
class
HbRule
extends
Panel
{
public
scroller
:
eui
.
Scroller
;
public
group
:
eui
.
Group
;
public
labContent
:
eui
.
Label
;
public
closeBtn
:
eui
.
Button
;
private
_mask
:
egret
.
Sprite
;
start
()
{
super
.
start
();
this
.
addRule
();
this
.
closeBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
visible
=
false
;
},
this
);
}
loadSkin
()
{
this
.
skinName
=
getSkinPath
(
this
.
skinKey
);
if
(
this
.
skin
)
{
this
.
onSkinComplete
();
}
else
{
this
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
this
.
onSkinComplete
,
this
);
}
}
private
addRule
()
{
const
text
=
`<br>1、用户每天邀请指定数量的新玩家参与闯关,可获得指定的现金券奖励。
2、用户发起邀请后,需在24小时内完成邀请任务;超过24小时,邀请任务失败,无法获得奖励,需重新发起邀请。
3、新用户仅包含未参与过狮狮连萌活动的用户。
4、用户不可为自己助力,或重复为好友助力。
5、完成邀请任务后,玩家可点击首页“邀请得现金券”图标领取现金券。
6、发放的奖励请在规定的有效时间内尽快领取或使用,逾期未领取或使用的会失效哦。
7、活动过程中,凡以不正当手段(包括但不限于作弊、恶意套现、扰乱系统、网络攻击等违规行为)参与本次活动的用户,苏宁易购有权终止其参加活动,并取消其获得奖励的资格。
8、极少数特殊情况下,若用户在完成活动的任务中被系统判定异常账户或风控账户,则可能导致奖励发放异常。
9、如遇不可抗力(包括但不限于重大自然灾害事件、活动受政府机关指令需要停止举办或调整的、活动遭受严重网络攻击不能正常进行的),苏宁易购有权取消、修改或暂停活动。`
this
.
labContent
.
textFlow
=
(
new
HtmlTextParser
).
parser
(
text
);
}
get
skinKey
()
{
return
'HbRule'
}
}
egret/src/something/uis/FestivalTarget.ts
0 → 100644
View file @
a459a1d6
import
{
ElementType
}
from
"../enum/ElementType"
;
import
{
TargetNumber
}
from
"./TargetNumber"
;
/**
* 节日目标
*
*/
export
class
FestivalTarget
extends
egret
.
DisplayObjectContainer
{
/**
* 打勾完成
*/
zeroMark
:
egret
.
Bitmap
;
/**
* 数量文案
*/
private
countNum
:
TargetNumber
;
/**
* 数量
*/
private
_count
:
number
;
get
count
():
number
{
return
this
.
_count
;
}
set
count
(
value
:
number
)
{
if
(
value
<=
0
)
{
value
=
0
;
this
.
countNum
.
visible
=
false
;
this
.
zeroMark
.
visible
=
true
;
}
this
.
_count
=
value
;
this
.
countNum
.
num
=
value
;
}
constructor
()
{
super
()
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"festivalTargetBg_png"
);
var
showImage
=
new
egret
.
Bitmap
(
texture
);
this
.
addChild
(
showImage
);
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"rightMark_png"
);
this
.
zeroMark
=
new
egret
.
Bitmap
(
texture
);
this
.
zeroMark
.
x
=
35
;
this
.
zeroMark
.
y
=
35
;
this
.
zeroMark
.
visible
=
false
;
this
.
addChild
(
this
.
zeroMark
);
this
.
countNum
=
new
TargetNumber
();
this
.
countNum
.
x
=
55
;
this
.
countNum
.
y
=
45
;
this
.
addChild
(
this
.
countNum
);
}
}
\ No newline at end of file
mock/happyclear/hbRainDoJoin.json
View file @
a459a1d6
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1572945948033
,
"data"
:
{
"option"
:
{
"appItemId"
:
2322
,
"categoryType"
:
1
,
"coinType"
:
1
,
"img"
:
"//yun.dui88.com/images/201910/s0yhv1nlil.jpeg"
,
"maxValue"
:
2
,
"minValue"
:
1
,
"name"
:
"测试商品"
,
"num"
:
3
,
"propType"
:
2
,
"rate"
:
"概率"
,
"title"
:
"商品信息"
,
"value"
:
"虚拟商品标识符"
"id"
:
"218"
,
"day"
:
null
,
"categoryType"
:
2
,
"title"
:
"10"
,
"rate"
:
"10"
,
"minValue"
:
null
,
"maxValue"
:
null
,
"coinType"
:
null
,
"realValue"
:
null
,
"propType"
:
null
,
"num"
:
4
,
"img"
:
""
,
"appItemId"
:
null
,
"name"
:
""
,
"value"
:
""
},
"orderNum"
:
"1234232546"
},
"desc"
:
"OK"
,
"success"
:
true
,
"timestamp"
:
1572921692831
"orderNum"
:
null
}
}
\ 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