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
6ac1af1a
Commit
6ac1af1a
authored
Apr 02, 2020
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b03a492e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
139 additions
and
92 deletions
+139
-92
MainBase.ts
egret/libs/new_wx/MainBase.ts
+2
-1
gameGuide.png
egret/resource/assets/mainScene/gameGuide.png
+0
-0
default.res.json
egret/resource/default.res.json
+6
-1
GameGuide.ts
egret/src/something/uis/GameGuide.ts
+131
-90
No files found.
egret/libs/new_wx/MainBase.ts
View file @
6ac1af1a
...
@@ -450,7 +450,8 @@ export default class MainBase extends eui.UILayer {
...
@@ -450,7 +450,8 @@ export default class MainBase extends eui.UILayer {
"ele33_1"
,
"ele33_1"
,
"ele33_0"
,
"ele33_0"
,
"arrowbg"
,
"arrowbg"
,
]
"gameGuide"
,
];
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
RES
.
getResAsync
(
arr
[
i
]
+
"_png"
)
RES
.
getResAsync
(
arr
[
i
]
+
"_png"
)
}
}
...
...
egret/resource/assets/mainScene/gameGuide.png
0 → 100644
View file @
6ac1af1a
60.2 KB
egret/resource/default.res.json
View file @
6ac1af1a
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
"name"
:
"h5"
"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,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,lineLight9_png,lineLight8_png,lineLight7_png,lineLight6_png,lineLight5_png,lineLight4_png,lineLight3_png,lineLight2_png,lineLight13_png,lineLight12_png,lineLight11_png,lineLight10_png,lineLight1_png,fesRedUp_png,fesRedSmallLight_png,fesRedDown_png,fesRedCap_png,fesRedBombSta1_png,fesRedBigLight_png,fesEleSmallDis9_png,fesEleSmallDis8_png,fesEleSmallDis7_png,fesEleSmallDis6_png,fesEleSmallDis5_png,fesEleSmallDis4_png,fesEleSmallDis3_png,fesEleSmallDis2_png,fesEleSmallDis10_png,fesEleSmallDis1_png,ele12_png,ele13_png,xingxingbi_png,tinyRedMid_png,tinyRedLeft_png,tinyRedRight_png,rectLatWhite_png,fesRedBombSta2_png,ele14_png,redBombYStar_png,redBombBStar_png,redBombBSnow_png,线条尾部炸开_00000_png,线条尾部炸开_00001_png,线条尾部炸开_00002_png,线条尾部炸开_00003_png,线条尾部炸开_00004_png,线条尾部炸开_00005_png,线条尾部炸开_00006_png,线条尾部炸开_00007_png,线条尾部炸开_00008_png,ele15_png,ele16_png,ele17_png,ele18_png,ele19_png,ele20_png,empty_png,ele23_png,ele25_png,ele27_png,ele26_png,ele24_png,ele22_png,chocolateMark3_png,chocolateMark1_png,chocolateFour_png,chocolateMark0_png,chocolateMark2_png,redbombParticle_png,monster_shoot_png,ele33_1_png,ele33_0_png,ele34_png,honey_png,ele36_png,lef_png,propBg_png,check0_png,check1_png,check2_png,check3_png,check4_png,check7_png,check8_png,check9_png,check关_png,check第_png,check6_png,check5_png,ele38_png,ele39_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,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,lineLight9_png,lineLight8_png,lineLight7_png,lineLight6_png,lineLight5_png,lineLight4_png,lineLight3_png,lineLight2_png,lineLight13_png,lineLight12_png,lineLight11_png,lineLight10_png,lineLight1_png,fesRedUp_png,fesRedSmallLight_png,fesRedDown_png,fesRedCap_png,fesRedBombSta1_png,fesRedBigLight_png,fesEleSmallDis9_png,fesEleSmallDis8_png,fesEleSmallDis7_png,fesEleSmallDis6_png,fesEleSmallDis5_png,fesEleSmallDis4_png,fesEleSmallDis3_png,fesEleSmallDis2_png,fesEleSmallDis10_png,fesEleSmallDis1_png,ele12_png,ele13_png,xingxingbi_png,tinyRedMid_png,tinyRedLeft_png,tinyRedRight_png,rectLatWhite_png,fesRedBombSta2_png,ele14_png,redBombYStar_png,redBombBStar_png,redBombBSnow_png,线条尾部炸开_00000_png,线条尾部炸开_00001_png,线条尾部炸开_00002_png,线条尾部炸开_00003_png,线条尾部炸开_00004_png,线条尾部炸开_00005_png,线条尾部炸开_00006_png,线条尾部炸开_00007_png,线条尾部炸开_00008_png,ele15_png,ele16_png,ele17_png,ele18_png,ele19_png,ele20_png,empty_png,ele23_png,ele25_png,ele27_png,ele26_png,ele24_png,ele22_png,chocolateMark3_png,chocolateMark1_png,chocolateFour_png,chocolateMark0_png,chocolateMark2_png,redbombParticle_png,monster_shoot_png,ele33_1_png,ele33_0_png,ele34_png,honey_png,ele36_png,lef_png,propBg_png,check0_png,check1_png,check2_png,check3_png,check4_png,check7_png,check8_png,check9_png,check关_png,check第_png,check6_png,check5_png,ele38_png,ele39_png
,gameGuide_png
"
,
"name"
:
"main2"
"name"
:
"main2"
},
},
{
{
...
@@ -5361,6 +5361,11 @@
...
@@ -5361,6 +5361,11 @@
"url"
:
"assets/common/turnnoprize继续闯关.png"
,
"url"
:
"assets/common/turnnoprize继续闯关.png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"name"
:
"turnnoprize继续闯关2_png"
"name"
:
"turnnoprize继续闯关2_png"
},
{
"url"
:
"assets/mainScene/gameGuide.png"
,
"type"
:
"image"
,
"name"
:
"gameGuide_png"
}
}
]
]
}
}
\ No newline at end of file
egret/src/something/uis/GameGuide.ts
View file @
6ac1af1a
...
@@ -7,69 +7,110 @@ import { generateMapBg, drawPoly } from "../logic/aaa";
...
@@ -7,69 +7,110 @@ import { generateMapBg, drawPoly } from "../logic/aaa";
* 引导前,initElements需要编排特定元素
* 引导前,initElements需要编排特定元素
* 游戏引导,。8种
* 游戏引导,。8种
* 蒙层都一致,但是需要特定镂空,手势,和提示文案
* 蒙层都一致,但是需要特定镂空,手势,和提示文案
*
*
*/
*/
export
class
GameGuide
extends
egret
.
DisplayObjectContainer
{
export
class
GameGuide
extends
egret
.
DisplayObjectContainer
{
/**
/**
* 背景黑色蒙层
* 背景黑色蒙层
*/
*/
bg
:
egret
.
Shape
;
bg
:
egret
.
Shape
;
boxGroup
:
eui
.
Group
;
hand
:
egret
.
Bitmap
;
hand
:
egret
.
Bitmap
;
msg
:
eui
.
Label
;
msg
:
eui
.
Label
;
stepCount
:
number
;
stepCount
:
number
;
stepAll
:
number
;
stepAll
:
number
;
thisObj
:
MainScene
;
thisObj
:
MainScene
;
/**
/**
* 直接把this传入得了
* 直接把this传入得了
* @param thisObj
* @param thisObj
*/
*/
constructor
(
thisObj
:
MainScene
)
{
constructor
(
thisObj
:
MainScene
)
{
super
();
super
();
// this.touchEnabled = true;
// this.touchEnabled = true;
this
.
bg
=
new
egret
.
Shape
()
this
.
bg
=
new
egret
.
Shape
()
;
this
.
bg
.
touchEnabled
=
true
this
.
bg
.
touchEnabled
=
true
;
this
.
addChild
(
this
.
bg
);
this
.
addChild
(
this
.
bg
);
this
.
hand
=
new
egret
.
Bitmap
(
RES
.
getRes
(
"guidePropHand_png"
));
this
.
hand
=
new
egret
.
Bitmap
(
RES
.
getRes
(
"guidePropHand_png"
));
this
.
hand
.
touchEnabled
=
false
;
this
.
hand
.
touchEnabled
=
false
;
this
.
addChild
(
this
.
hand
);
this
.
addChild
(
this
.
hand
);
let
box
=
new
eui
.
Image
(
RES
.
getRes
(
"gameGuide_png"
));
this
.
boxGroup
=
new
eui
.
Group
();
this
.
boxGroup
.
width
=
box
.
width
;
this
.
boxGroup
.
height
=
box
.
height
;
this
.
boxGroup
.
addChild
(
box
);
this
.
msg
=
new
eui
.
Label
();
this
.
msg
=
new
eui
.
Label
();
this
.
msg
.
size
=
22
;
this
.
msg
.
size
=
22
;
this
.
msg
.
y
=
850
;
this
.
msg
.
x
=
25
;
this
.
msg
.
textColor
=
0xffffff
;
this
.
msg
.
y
=
75
;
this
.
msg
.
width
=
270
;
this
.
msg
.
height
=
90
;
window
[
'mmm'
]
=
this
.
msg
;
this
.
msg
.
textColor
=
0xc17343
;
this
.
msg
.
lineSpacing
=
10
;
this
.
msg
.
lineSpacing
=
10
;
this
.
msg
.
textAlign
=
egret
.
HorizontalAlign
.
CENTER
;
this
.
msg
.
textAlign
=
egret
.
HorizontalAlign
.
LEFT
;
this
.
addChild
(
this
.
msg
);
this
.
msg
.
verticalCenter
=
egret
.
VerticalAlign
.
MIDDLE
;
this
.
boxGroup
.
addChild
(
this
.
msg
);
this
.
thisObj
=
thisObj
this
.
addChild
(
this
.
boxGroup
);
this
.
thisObj
=
thisObj
;
this
.
stepCount
=
chapterFuns
[
thisObj
.
chapter
]
?
chapterFuns
[
thisObj
.
chapter
].
stepCount
:
0
;
this
.
stepCount
=
chapterFuns
[
thisObj
.
chapter
]
?
chapterFuns
[
thisObj
.
chapter
].
stepCount
:
0
;
this
.
stepAll
=
this
.
stepCount
;
this
.
stepAll
=
this
.
stepCount
;
}
}
show
()
{
show
()
{
var
step
=
this
.
stepAll
-
this
.
stepCount
;
var
step
=
this
.
stepAll
-
this
.
stepCount
;
this
.
drawBg
(
step
);
this
.
drawBg
(
step
);
//修改元素的层级,置顶,否则可能点击其他元素,handIndexs
//修改元素的层级,置顶,否则可能点击其他元素,handIndexs
var
handIndexs
=
chapterFuns
[
this
.
thisObj
.
chapter
].
handIndexs
[
step
];
var
handIndexs
=
chapterFuns
[
this
.
thisObj
.
chapter
].
handIndexs
[
step
];
for
(
var
i
=
0
;
i
<
handIndexs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
handIndexs
.
length
;
i
++
)
{
var
index
=
handIndexs
[
i
];
var
index
=
handIndexs
[
i
];
var
lat
=
this
.
thisObj
.
lattices
[
index
]
var
lat
=
this
.
thisObj
.
lattices
[
index
]
;
if
(
lat
&&
lat
.
element
)
this
.
thisObj
.
elementContainer
.
addChild
(
lat
.
element
);
if
(
lat
&&
lat
.
element
)
this
.
thisObj
.
elementContainer
.
addChild
(
lat
.
element
);
}
}
this
.
handAni
(
handIndexs
);
this
.
handAni
(
handIndexs
);
this
.
msg
.
text
=
chapterFuns
[
this
.
thisObj
.
chapter
].
msg
[
step
]
||
""
;
this
.
msg
.
text
=
chapterFuns
[
this
.
thisObj
.
chapter
].
msg
[
step
]
||
""
;
this
.
msg
.
x
=
(
750
-
this
.
msg
.
textWidth
)
/
2
;
// this.msg.x = (750 - this.msg.textWidth) / 2;
this
.
boxGroup
.
x
=
(
750
-
this
.
msg
.
width
)
/
2
-
100
;
var
p1
=
Tool
.
getPositionByIndex
(
handIndexs
[
0
]);
var
p1
=
Tool
.
getPositionByIndex
(
handIndexs
[
0
]);
var
p2
=
Tool
.
getPositionByIndex
(
handIndexs
[
1
]);
var
p2
=
Tool
.
getPositionByIndex
(
handIndexs
[
1
]);
this
.
msg
.
y
=
Math
.
max
(
p1
[
1
],
p2
[
1
])
+
135
;
// this.msg.y = Math.max(p1[1], p2[1]) + 165;
this
.
boxGroup
.
y
=
Math
.
max
(
p1
[
1
],
p2
[
1
])
+
150
;
//定制修改,101关毛球引导,
//定制修改,101关毛球引导,
if
(
this
.
thisObj
.
chapter
==
101
&&
step
==
0
)
{
if
(
this
.
thisObj
.
chapter
==
101
&&
step
==
0
)
{
this
.
msg
.
y
+=
80
;
// this.msg.y += 80;
this
.
boxGroup
.
y
+=
80
;
}
if
(
this
.
thisObj
.
chapter
==
406
)
{
// this.msg.y += 80;
this
.
boxGroup
.
y
+=
80
;
}
if
(
this
.
thisObj
.
chapter
==
9
)
{
this
.
boxGroup
.
y
-=
580
;
}
}
if
(
this
.
thisObj
.
chapter
==
406
)
{
if
(
this
.
thisObj
.
chapter
==
10
&&
step
==
1
)
{
this
.
msg
.
y
+=
80
;
this
.
boxGroup
.
y
-=
100
;
}
if
(
this
.
thisObj
.
chapter
==
10
)
{
this
.
boxGroup
.
y
-=
30
;
}
if
(
this
.
thisObj
.
chapter
==
301
)
{
this
.
boxGroup
.
y
-=
110
;
}
if
(
this
.
thisObj
.
chapter
==
331
)
{
this
.
boxGroup
.
y
-=
110
;
}
if
(
this
.
thisObj
.
chapter
==
426
)
{
this
.
boxGroup
.
y
-=
60
;
}
if
(
this
.
thisObj
.
chapter
==
453
)
{
this
.
boxGroup
.
y
-=
50
;
}
}
this
.
stepCount
--
;
this
.
stepCount
--
;
...
@@ -77,8 +118,8 @@ export class GameGuide extends egret.DisplayObjectContainer {
...
@@ -77,8 +118,8 @@ export class GameGuide extends egret.DisplayObjectContainer {
hideSelf
()
{
hideSelf
()
{
if
(
this
.
parent
)
this
.
parent
.
removeChild
(
this
);
if
(
this
.
parent
)
this
.
parent
.
removeChild
(
this
);
if
(
!
this
.
stepCount
)
{
if
(
!
this
.
stepCount
)
{
//计入缓存
//计入缓存
writeCache
(
getCacheKey
()
+
this
.
thisObj
.
chapter
);
writeCache
(
getCacheKey
()
+
this
.
thisObj
.
chapter
);
//置空gameGuide
//置空gameGuide
...
@@ -87,20 +128,19 @@ export class GameGuide extends egret.DisplayObjectContainer {
...
@@ -87,20 +128,19 @@ export class GameGuide extends egret.DisplayObjectContainer {
}
}
private
handAni
(
handIndexs
:
number
[])
{
private
handAni
(
handIndexs
:
number
[])
{
egret
.
Tween
.
removeTweens
(
this
.
hand
)
egret
.
Tween
.
removeTweens
(
this
.
hand
)
;
var
p1
=
Tool
.
getPositionByIndex
(
handIndexs
[
0
]);
var
p1
=
Tool
.
getPositionByIndex
(
handIndexs
[
0
]);
var
p2
=
Tool
.
getPositionByIndex
(
handIndexs
[
1
]);
var
p2
=
Tool
.
getPositionByIndex
(
handIndexs
[
1
]);
this
.
hand
.
x
=
p1
[
0
];
this
.
hand
.
x
=
p1
[
0
];
this
.
hand
.
y
=
p1
[
1
];
this
.
hand
.
y
=
p1
[
1
];
egret
.
Tween
.
get
(
this
.
hand
,
{
loop
:
true
})
egret
.
Tween
.
get
(
this
.
hand
,
{
loop
:
true
})
// .set({ x: p1[0], y: p1[1] })
// .set({ x: p1[0], y: p1[1] })
.
to
({
x
:
p2
[
0
],
y
:
p2
[
1
]
},
1000
)
.
to
({
x
:
p2
[
0
],
y
:
p2
[
1
]
},
1000
)
.
to
({
x
:
p1
[
0
],
y
:
p1
[
1
]
},
100
)
.
to
({
x
:
p1
[
0
],
y
:
p1
[
1
]
},
100
)
}
}
/**
/**
*
*
* @param chapter
* @param step 0第一步,1第二步
* @param step 0第一步,1第二步
*/
*/
private
drawBg
(
step
:
number
=
0
)
{
private
drawBg
(
step
:
number
=
0
)
{
...
@@ -108,7 +148,7 @@ export class GameGuide extends egret.DisplayObjectContainer {
...
@@ -108,7 +148,7 @@ export class GameGuide extends egret.DisplayObjectContainer {
this
.
bg
.
graphics
.
beginFill
(
0x000000
,
0.7
);
this
.
bg
.
graphics
.
beginFill
(
0x000000
,
0.7
);
this
.
drawRect
();
this
.
drawRect
();
//画特定的洞
//画特定的洞
var
data
=
chapterFuns
[
this
.
thisObj
.
chapter
]
var
data
=
chapterFuns
[
this
.
thisObj
.
chapter
]
;
drawHole
(
this
.
bg
,
data
.
showIndexs
[
step
],
data
.
hideIndexs
[
step
]);
drawHole
(
this
.
bg
,
data
.
showIndexs
[
step
],
data
.
hideIndexs
[
step
]);
}
}
...
@@ -142,7 +182,7 @@ const chapterFuns = {
...
@@ -142,7 +182,7 @@ const chapterFuns = {
],
],
//提示文案,尽量通用点的位置。x肯定都居中
//提示文案,尽量通用点的位置。x肯定都居中
msg
:
[
msg
:
[
"3个同色动物头像成一排即可消除~"
"3个同色动物头像成一排即
\n
可消除~"
]
]
},
},
//冰块消除
//冰块消除
...
@@ -158,7 +198,7 @@ const chapterFuns = {
...
@@ -158,7 +198,7 @@ const chapterFuns = {
[
21
,
20
]
[
21
,
20
]
],
],
msg
:
[
msg
:
[
"消除冰块上的元素即可打破冰块"
"消除冰块上的元素即可打破
\n
冰块"
]
]
},
},
//石头消除
//石头消除
...
@@ -174,7 +214,7 @@ const chapterFuns = {
...
@@ -174,7 +214,7 @@ const chapterFuns = {
[
12
,
13
]
[
12
,
13
]
],
],
msg
:
[
msg
:
[
"当石头附近的元素产生消除时,即可粉碎石头"
"当石头附近的元素产生消除
\n
时,即可粉碎石头"
]
]
},
},
//直线特效
//直线特效
...
@@ -193,8 +233,8 @@ const chapterFuns = {
...
@@ -193,8 +233,8 @@ const chapterFuns = {
[
49
,
50
]
[
49
,
50
]
],
],
msg
:
[
msg
:
[
"4个同色元素形成直线就能合成直线特效"
,
"4个同色元素形成直线就能
\n
合成直线特效"
,
"消除直线特效会产生直线消除"
"消除直线特效会产生直线
\n
消除"
]
]
},
},
//爆炸特效
//爆炸特效
...
@@ -213,8 +253,8 @@ const chapterFuns = {
...
@@ -213,8 +253,8 @@ const chapterFuns = {
[
30
,
29
]
[
30
,
29
]
],
],
msg
:
[
msg
:
[
"5个同色动物头像成L形或T形就能合成爆炸特效"
,
"5个同色动物头像成L形或
\n
T形就能合成爆炸特效"
,
"消除爆炸特效会产生3*3的范围消除"
,
"消除爆炸特效会产生3*3
\n
的范围消除"
,
]
]
},
},
//特效组合
//特效组合
...
@@ -230,7 +270,7 @@ const chapterFuns = {
...
@@ -230,7 +270,7 @@ const chapterFuns = {
[
63
,
72
],
[
63
,
72
],
],
],
msg
:
[
msg
:
[
"将两个特效互相拖动即可直
接触发组合特效,
\n
组合特效的效
果视组合的两个特效类型而定"
"将两个特效互相拖动即可直
\n
接触发组合特效,组合特效的效
\n
果视组合的两个特效类型而定"
// "五个相同动物形成一字型即可合成魔力花特效",
// "五个相同动物形成一字型即可合成魔力花特效",
// "拖动魔力花特效即可直接触发"
// "拖动魔力花特效即可直接触发"
]
]
...
@@ -251,7 +291,7 @@ const chapterFuns = {
...
@@ -251,7 +291,7 @@ const chapterFuns = {
[
73
,
64
]
[
73
,
64
]
],
],
msg
:
[
msg
:
[
"五个相同动物形成一字型即可合成魔力花特效"
,
"五个相同动物形成一字型即
\n
可合成魔力花特效"
,
"拖动魔力花特效即可直接触发"
"拖动魔力花特效即可直接触发"
]
]
},
},
...
@@ -287,7 +327,7 @@ const chapterFuns = {
...
@@ -287,7 +327,7 @@ const chapterFuns = {
[
68
,
67
],
[
68
,
67
],
],
],
msg
:
[
msg
:
[
"当棒棒糖移至底层时,即可移除棒棒糖"
,
"当棒棒糖移至底层时,即可
\n
移除棒棒糖"
,
"消除棒棒糖下方的动物
\n
就可以收集棒棒糖啦"
"消除棒棒糖下方的动物
\n
就可以收集棒棒糖啦"
]
]
},
},
...
@@ -320,7 +360,7 @@ const chapterFuns = {
...
@@ -320,7 +360,7 @@ const chapterFuns = {
[
40
,
49
]
[
40
,
49
]
],
],
msg
:
[
msg
:
[
"小心!会蔓延的果冻!
\n
消除果冻旁边的动物
\n
就能
消除果冻~"
"小心!会蔓延的果冻!
\n
消除果冻旁边的动物
就能
\n
消除果冻~"
]
]
},
},
//鸡蛋
//鸡蛋
...
@@ -336,7 +376,7 @@ const chapterFuns = {
...
@@ -336,7 +376,7 @@ const chapterFuns = {
[
66
,
57
]
[
66
,
57
]
],
],
msg
:
[
msg
:
[
"鸡蛋边上不断有动物消除时,会孵出小鸡"
"鸡蛋边上不断有动物消除
\n
时,会孵出小鸡"
]
]
},
},
//灰毛球
//灰毛球
...
@@ -371,133 +411,133 @@ const chapterFuns = {
...
@@ -371,133 +411,133 @@ const chapterFuns = {
"需用特效将褐色毛球分裂成
\n
两个灰色毛球,才能将它消除"
"需用特效将褐色毛球分裂成
\n
两个灰色毛球,才能将它消除"
]
]
},
},
226
:{
226
:
{
stepCount
:
1
,
stepCount
:
1
,
showIndexs
:
[
showIndexs
:
[
[
29
,
30
,
31
,
32
],
[
29
,
30
,
31
,
32
],
],
],
hideIndexs
:
[
hideIndexs
:
[
[
29
,
30
],
[
29
,
30
],
],
],
handIndexs
:
[
handIndexs
:
[
[
31
,
32
],
[
31
,
32
],
],
],
msg
:
[
msg
:
[
"每走三步都会翻转的石门!
\n
在石门开启的时候赶快消除吧~"
"每走三步都会翻转的石门!
\n
在石门开启的时候赶快消除吧~"
]
]
},
},
301
:{
301
:
{
stepCount
:
1
,
stepCount
:
1
,
showIndexs
:
[
showIndexs
:
[
[
64
,
65
,
66
,
75
],
[
64
,
65
,
66
,
75
],
],
],
hideIndexs
:
[
hideIndexs
:
[
[
64
,
65
],
[
64
,
65
],
],
],
handIndexs
:
[
handIndexs
:
[
[
66
,
75
],
[
66
,
75
],
],
],
msg
:
[
msg
:
[
"每操作一步,怪兽都会吐毒液
\n
消除毒液的回合不会再产生毒液"
"每操作一步,怪兽都会吐毒液
消除毒液的回合不会再产生毒液"
]
]
},
},
331
:{
331
:
{
stepCount
:
1
,
stepCount
:
1
,
showIndexs
:
[
showIndexs
:
[
[
64
,
65
,
66
,
75
],
[
64
,
65
,
66
,
75
],
],
],
hideIndexs
:
[
hideIndexs
:
[
[
64
,
65
],
[
64
,
65
],
],
],
handIndexs
:
[
handIndexs
:
[
[
66
,
75
],
[
66
,
75
],
],
],
msg
:
[
msg
:
[
"在烟花附近消除,就会释放美丽的烟花哦~"
"在烟花附近消除,就会释放美丽的烟花哦~"
]
]
},
},
377
:{
377
:
{
stepCount
:
1
,
stepCount
:
1
,
showIndexs
:
[
showIndexs
:
[
[
29
,
38
,
39
,
40
],
[
29
,
38
,
39
,
40
],
],
],
hideIndexs
:
[
hideIndexs
:
[
[
39
,
40
],
[
39
,
40
],
],
],
handIndexs
:
[
handIndexs
:
[
[
29
,
38
],
[
29
,
38
],
],
],
msg
:
[
msg
:
[
"独眼仔被相同颜色的元素消除4次
\n
就能激活哦~"
"独眼仔被相同颜色的元素消除4次
就能激活哦~"
]
]
},
},
406
:{
406
:
{
stepCount
:
1
,
stepCount
:
1
,
showIndexs
:
[
showIndexs
:
[
[
23
,
24
,
32
,
41
],
[
23
,
24
,
32
,
41
],
],
],
hideIndexs
:
[
hideIndexs
:
[
[
32
,
41
],
[
32
,
41
],
],
],
handIndexs
:
[
handIndexs
:
[
[
23
,
24
],
[
23
,
24
],
],
],
msg
:
[
msg
:
[
"使用特效击中气鼓鱼,膨胀起来在周围消除一次即可引爆气鼓鱼"
"使用特效击中气鼓鱼,膨胀起来在周围消除一次即可引爆气鼓鱼"
],
],
},
},
426
:{
426
:
{
stepCount
:
1
,
stepCount
:
1
,
showIndexs
:
[
showIndexs
:
[
[
59
,
68
,
67
,
66
],
[
59
,
68
,
67
,
66
],
],
],
hideIndexs
:
[
hideIndexs
:
[
[
67
,
66
],
[
67
,
66
],
],
],
handIndexs
:
[
handIndexs
:
[
[
59
,
68
],
[
59
,
68
],
],
],
msg
:
[
msg
:
[
"在蜜罐旁消除三次即可打开并释放蜂蜜
\n
然后消除被蜂蜜黏住的小动物吧~"
"在蜜罐旁消除三次即可打开并释放蜂蜜
\n
然后消除被蜂蜜黏住的小动物吧~"
],
],
},
},
453
:{
453
:
{
stepCount
:
1
,
stepCount
:
1
,
showIndexs
:
[
showIndexs
:
[
[
59
,
68
,
67
,
66
],
[
59
,
68
,
67
,
66
],
],
],
hideIndexs
:
[
hideIndexs
:
[
[
67
,
66
],
[
67
,
66
],
],
],
handIndexs
:
[
handIndexs
:
[
[
59
,
68
],
[
59
,
68
],
],
],
msg
:
[
msg
:
[
"流沙每回合都会向四方随机移动,消除流沙上的小动物可以收集流沙"
"流沙每回合都会向四方随机移动,消除流沙上的小动物可以收集流沙"
],
],
},
},
501
:{
501
:
{
stepCount
:
1
,
stepCount
:
1
,
showIndexs
:
[
showIndexs
:
[
[
42
,
51
,
52
,
53
],
[
42
,
51
,
52
,
53
],
],
],
hideIndexs
:
[
hideIndexs
:
[
[
52
,
53
],
[
52
,
53
],
],
],
handIndexs
:
[
handIndexs
:
[
[
42
,
51
],
[
42
,
51
],
],
],
msg
:
[
msg
:
[
"每回合,传送带会带着它上面的动物向指定方向移动一格"
"每回合,传送带会带着它上面的动物向指定方向移动一格"
]
]
}
}
}
}
;
/**
/**
* 根据显示index和隐藏的绘制图形
* 根据显示index和隐藏的绘制图形
* @param shape
* @param shape
* @param showIndexs
* @param showIndexs
* @param hideIndexs
* @param hideIndexs
*/
*/
function
drawHole
(
shape
:
egret
.
Shape
,
showIndexs
:
number
[],
hideIndexs
:
number
[])
{
function
drawHole
(
shape
:
egret
.
Shape
,
showIndexs
:
number
[],
hideIndexs
:
number
[])
{
...
@@ -505,16 +545,16 @@ function drawHole(shape: egret.Shape, showIndexs: number[], hideIndexs: number[]
...
@@ -505,16 +545,16 @@ function drawHole(shape: egret.Shape, showIndexs: number[], hideIndexs: number[]
var
paths
=
generateMapBg
(
lattices
);
var
paths
=
generateMapBg
(
lattices
);
//顺时针
//顺时针
//画洞
//画洞
for
(
var
j
=
0
;
j
<
paths
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
paths
.
length
;
j
++
)
{
var
path
=
paths
[
j
];
var
path
=
paths
[
j
];
drawPoly
(
shape
,
path
)
drawPoly
(
shape
,
path
)
}
}
shape
.
graphics
.
endFill
();
shape
.
graphics
.
endFill
();
//根据hideIndexs画遮,为了不能点击
//根据hideIndexs画遮,为了不能点击
if
(
!
hideIndexs
||
!
hideIndexs
.
length
)
return
if
(
!
hideIndexs
||
!
hideIndexs
.
length
)
return
;
shape
.
graphics
.
beginFill
(
0x000000
,
0
);
shape
.
graphics
.
beginFill
(
0x000000
,
0
);
for
(
var
i
=
0
;
i
<
hideIndexs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
hideIndexs
.
length
;
i
++
)
{
var
center
=
Tool
.
getPositionByIndex
(
hideIndexs
[
i
]);
var
center
=
Tool
.
getPositionByIndex
(
hideIndexs
[
i
]);
shape
.
graphics
.
drawRect
(
center
[
0
]
-
Tool
.
width
/
2
,
center
[
1
]
-
Tool
.
height
/
2
,
Tool
.
width
,
Tool
.
height
);
shape
.
graphics
.
drawRect
(
center
[
0
]
-
Tool
.
width
/
2
,
center
[
1
]
-
Tool
.
height
/
2
,
Tool
.
width
,
Tool
.
height
);
}
}
...
@@ -524,8 +564,8 @@ function drawHole(shape: egret.Shape, showIndexs: number[], hideIndexs: number[]
...
@@ -524,8 +564,8 @@ function drawHole(shape: egret.Shape, showIndexs: number[], hideIndexs: number[]
//根据显示的格子求Tool.colNum * Tool.rowNum格子,显示的标为1;
//根据显示的格子求Tool.colNum * Tool.rowNum格子,显示的标为1;
function
createLattices9
(
indexs
:
number
[]):
number
[]
{
function
createLattices9
(
indexs
:
number
[]):
number
[]
{
var
arr
:
number
[]
=
[];
var
arr
:
number
[]
=
[];
for
(
var
i
=
0
;
i
<
Tool
.
colNum
*
Tool
.
rowNum
;
i
++
)
{
for
(
var
i
=
0
;
i
<
Tool
.
colNum
*
Tool
.
rowNum
;
i
++
)
{
if
(
indexs
.
indexOf
(
i
)
>
-
1
)
{
if
(
indexs
.
indexOf
(
i
)
>
-
1
)
{
arr
[
i
]
=
1
arr
[
i
]
=
1
}
else
{
}
else
{
arr
[
i
]
=
0
arr
[
i
]
=
0
...
@@ -535,8 +575,9 @@ function createLattices9(indexs: number[]): number[] {
...
@@ -535,8 +575,9 @@ function createLattices9(indexs: number[]): number[] {
}
}
var
arr
=
[
"apple"
,
"orange"
,
"apple"
,
"orange"
,
"pear"
,
"orange"
];
var
arr
=
[
"apple"
,
"orange"
,
"apple"
,
"orange"
,
"pear"
,
"orange"
];
function
getWordCnt
(
arr
:
any
[])
{
function
getWordCnt
(
arr
:
any
[])
{
return
arr
.
reduce
(
function
(
prev
,
next
)
{
return
arr
.
reduce
(
function
(
prev
,
next
)
{
prev
[
next
]
=
(
prev
[
next
]
+
1
)
||
1
;
prev
[
next
]
=
(
prev
[
next
]
+
1
)
||
1
;
return
prev
;
return
prev
;
},
{});
},
{});
...
...
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