Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
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
王剑峰
babycare_xiaoxiao
Commits
71c6e716
Commit
71c6e716
authored
Sep 29, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
四连特效替换
parent
4cee9345
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
165 additions
and
180 deletions
+165
-180
workspace.xml
.idea/workspace.xml
+29
-39
res.json
resource/res.json
+1
-1
ResJson.ts
src/ResJson.ts
+1
-1
PlayScene.ts
src/scene/PlayScene.ts
+121
-126
Element.ts
src/something/class/Element.ts
+13
-13
No files found.
.idea/workspace.xml
View file @
71c6e716
...
...
@@ -3,15 +3,10 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"9cef0552-af3c-4a1c-be1f-dc41ebe5b6db"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/mock/miniTb/popmartXXL2c.doJoin.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/mock/miniTb/popmartXXL2c.doJoin.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/mock/miniTb/popmartXXL2c.drawLotteryPrize.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/mock/miniTb/popmartXXL2c.drawLotteryPrize.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/mock/miniTb/popmartXXL2c.getActivityBaseInfoById.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/mock/miniTb/popmartXXL2c.getActivityBaseInfoById.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/panels/FesRedPrizePanel.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/panels/FesRedPrizePanel.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/panels/StartPanelPrize.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/panels/StartPanelPrize.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/panels/TaskPanel.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/panels/TaskPanel.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/resource/res.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/resource/res.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/ResJson.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/ResJson.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/PlayScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/PlayScene.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapScene.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/something/anisCall/FesRedShootAni.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/something/anisCall/FesRedShootAni.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/something/class/Element.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/something/class/Element.ts"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -22,9 +17,9 @@
<option
name=
"RECENT_TEMPLATES"
>
<list>
<option
value=
"TypeScript File"
/>
<option
value=
"JavaScript File"
/>
<option
value=
"HTML File"
/>
<option
value=
"JsonFile"
/>
<option
value=
"JavaScript File"
/>
</list>
</option>
</component>
...
...
@@ -79,7 +74,7 @@
<recent
name=
"$PROJECT_DIR$/resource/SuccessPrizePanel"
/>
</key>
</component>
<component
name=
"RunManager"
selected=
"npm.
dev
"
>
<component
name=
"RunManager"
selected=
"npm.
flushRes
"
>
<configuration
name=
"aaaa.html"
type=
"JavascriptDebugType"
temporary=
"true"
nameIsGenerated=
"true"
uri=
"http://localhost:63342/ppmt_xxl/src/aaaa.html"
useBuiltInWebServerPort=
"true"
>
<method
v=
"2"
/>
</configuration>
...
...
@@ -106,8 +101,8 @@
</configuration>
<recent_temporary>
<list>
<item
itemvalue=
"npm.dev"
/>
<item
itemvalue=
"npm.flushRes"
/>
<item
itemvalue=
"npm.dev"
/>
<item
itemvalue=
"JavaScript Debug.aaaa.html"
/>
</list>
</recent_temporary>
...
...
@@ -156,14 +151,7 @@
<workItem
from=
"1600912046696"
duration=
"16271000"
/>
<workItem
from=
"1600998191749"
duration=
"23862000"
/>
<workItem
from=
"1601170975973"
duration=
"20963000"
/>
<workItem
from=
"1601257315718"
duration=
"43882000"
/>
</task>
<task
id=
"LOCAL-00012"
summary=
"effect"
>
<created>
1594707238031
</created>
<option
name=
"number"
value=
"00012"
/>
<option
name=
"presentableId"
value=
"LOCAL-00012"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1594707238031
</updated>
<workItem
from=
"1601257315718"
duration=
"47200000"
/>
</task>
<task
id=
"LOCAL-00013"
summary=
"effect"
>
<created>
1594707268299
</created>
...
...
@@ -501,7 +489,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1601363299406
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"61"
/>
<task
id=
"LOCAL-00061"
summary=
"asjghdfkaksjhsaft asxjcv bnot6qwuk"
>
<created>
1601368171740
</created>
<option
name=
"number"
value=
"00061"
/>
<option
name=
"presentableId"
value=
"LOCAL-00061"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1601368171740
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"62"
/>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
...
@@ -532,7 +527,8 @@
<MESSAGE
value=
"afdjk,asfhksjkdulfh klasoi;dfbhjkgv kl;"
/>
<MESSAGE
value=
"节日红包"
/>
<MESSAGE
value=
"节日红包fa"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"节日红包fa"
/>
<MESSAGE
value=
"asjghdfkaksjhsaft asxjcv bnot6qwuk"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"asjghdfkaksjhsaft asxjcv bnot6qwuk"
/>
</component>
<component
name=
"WindowStateProjectService"
>
<state
x=
"440"
y=
"273"
key=
"#com.intellij.execution.impl.EditConfigurationsDialog"
timestamp=
"1595229546530"
>
...
...
@@ -547,49 +543,49 @@
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"251"
y=
"471"
key=
"ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594113080922"
/>
<state
x=
"557"
y=
"183"
width=
"884"
height=
"891"
key=
"CommitChangelistDialog2"
timestamp=
"160136
3299179
"
>
<state
x=
"557"
y=
"183"
width=
"884"
height=
"891"
key=
"CommitChangelistDialog2"
timestamp=
"160136
8171296
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
x=
"557"
y=
"183"
key=
"CommitChangelistDialog2/30.23.1890.1177@30.23.1890.1177"
timestamp=
"160136
3299179
"
/>
<state
x=
"557"
y=
"183"
key=
"CommitChangelistDialog2/30.23.1890.1177@30.23.1890.1177"
timestamp=
"160136
8171296
"
/>
<state
x=
"558"
y=
"183"
width=
"884"
height=
"891"
key=
"CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595584297912"
/>
<state
x=
"131"
y=
"123"
width=
"730"
height=
"977"
key=
"DiffContextDialog"
timestamp=
"1596165868169"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
x=
"131"
y=
"123"
width=
"730"
height=
"977"
key=
"DiffContextDialog/30.23.1890.1177@30.23.1890.1177"
timestamp=
"1596165868169"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.bottom"
timestamp=
"16013
66579665
"
>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.bottom"
timestamp=
"16013
72694964
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
width=
"869"
height=
"321"
key=
"GridCell.Tab.0.bottom/30.23.1410.877/1440.23.1920.1177@30.23.1410.877"
timestamp=
"1600867804217"
/>
<state
width=
"885"
height=
"321"
key=
"GridCell.Tab.0.bottom/30.23.1410.877@30.23.1410.877"
timestamp=
"1600962876448"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.bottom/30.23.1650.1027@30.23.1650.1027"
timestamp=
"1596463312309"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.bottom/30.23.1890.1177@30.23.1890.1177"
timestamp=
"16013
66579665
"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.bottom/30.23.1890.1177@30.23.1890.1177"
timestamp=
"16013
72694964
"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.bottom/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595590577198"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595579918465"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.center"
timestamp=
"16013
66579664
"
>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.center"
timestamp=
"16013
72694963
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
width=
"869"
height=
"321"
key=
"GridCell.Tab.0.center/30.23.1410.877/1440.23.1920.1177@30.23.1410.877"
timestamp=
"1600867804216"
/>
<state
width=
"885"
height=
"321"
key=
"GridCell.Tab.0.center/30.23.1410.877@30.23.1410.877"
timestamp=
"1600962876447"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.center/30.23.1650.1027@30.23.1650.1027"
timestamp=
"1596463312308"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.center/30.23.1890.1177@30.23.1890.1177"
timestamp=
"16013
66579664
"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.center/30.23.1890.1177@30.23.1890.1177"
timestamp=
"16013
72694963
"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.center/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595590577198"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595579918464"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.left"
timestamp=
"16013
66579664
"
>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.left"
timestamp=
"16013
72694963
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
width=
"869"
height=
"321"
key=
"GridCell.Tab.0.left/30.23.1410.877/1440.23.1920.1177@30.23.1410.877"
timestamp=
"1600867804216"
/>
<state
width=
"885"
height=
"321"
key=
"GridCell.Tab.0.left/30.23.1410.877@30.23.1410.877"
timestamp=
"1600962876447"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.left/30.23.1650.1027@30.23.1650.1027"
timestamp=
"1596463312308"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.left/30.23.1890.1177@30.23.1890.1177"
timestamp=
"16013
665796
63"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.left/30.23.1890.1177@30.23.1890.1177"
timestamp=
"16013
726949
63"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.left/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595590577197"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595579918463"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.right"
timestamp=
"16013
665796
64"
>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.right"
timestamp=
"16013
726949
64"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
width=
"869"
height=
"321"
key=
"GridCell.Tab.0.right/30.23.1410.877/1440.23.1920.1177@30.23.1410.877"
timestamp=
"1600867804217"
/>
<state
width=
"885"
height=
"321"
key=
"GridCell.Tab.0.right/30.23.1410.877@30.23.1410.877"
timestamp=
"1600962876447"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.right/30.23.1650.1027@30.23.1650.1027"
timestamp=
"1596463312309"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.right/30.23.1890.1177@30.23.1890.1177"
timestamp=
"16013
665796
64"
/>
<state
width=
"896"
height=
"321"
key=
"GridCell.Tab.0.right/30.23.1890.1177@30.23.1890.1177"
timestamp=
"16013
726949
64"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.right/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595590577198"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595579918465"
/>
<state
x=
"82"
y=
"353"
key=
"IDE.errors.dialog"
timestamp=
"1594777965326"
>
...
...
@@ -606,10 +602,10 @@
</state>
<state
x=
"289"
y=
"314"
key=
"SettingsEditor/30.23.1890.1177@30.23.1890.1177"
timestamp=
"1596079390860"
/>
<state
x=
"300"
y=
"248"
key=
"SettingsEditor/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594798992724"
/>
<state
x=
"91"
y=
"351"
key=
"Vcs.Push.Dialog.v2"
timestamp=
"160136
3306245
"
>
<state
x=
"91"
y=
"351"
key=
"Vcs.Push.Dialog.v2"
timestamp=
"160136
8173271
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
x=
"91"
y=
"351"
key=
"Vcs.Push.Dialog.v2/30.23.1890.1177@30.23.1890.1177"
timestamp=
"160136
3306245
"
/>
<state
x=
"91"
y=
"351"
key=
"Vcs.Push.Dialog.v2/30.23.1890.1177@30.23.1890.1177"
timestamp=
"160136
8173271
"
/>
<state
x=
"92"
y=
"351"
key=
"Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595584299423"
/>
<state
x=
"87"
y=
"216"
key=
"com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser"
timestamp=
"1594705166397"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
...
...
@@ -653,12 +649,6 @@
<line>
55
</line>
<option
name=
"timeStamp"
value=
"5"
/>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
type=
"javascript"
>
<url>
file://$PROJECT_DIR$/src/scene/PlayScene.ts
</url>
<line>
1960
</line>
<properties
lambdaOrdinal=
"-1"
/>
<option
name=
"timeStamp"
value=
"10"
/>
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
...
...
resource/res.json
View file @
71c6e716
...
...
@@ -73,7 +73,7 @@
"name"
:
"map"
},
{
"keys"
:
"blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,bubleEle0.png,bubleEle1.png,bubleEle2.png,bubleEle3.png,bubleEle4.png,chapterNum0.png,chapterNum1.png,chapterNum2.png,chapterNum3.png,chapterNum4.png,chapterNum5.png,chapterNum6.png,chapterNum7.png,chapterNum8.png,chapterNum9.png,chapterNum关.png,chapterNum第.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0Exp.png,ele
1Exp.png,ele2Exp.png,ele3Exp.png,ele4Exp
.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,gameGuideBoard.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8-1.png,hairballPiece8.png,hairballPiece9.png,ice2.png,ice3.png,ice4.png,ice5.jpg,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,musicOff.png,musicOn.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,prop_count_bg.png,rectLat.png,rectLatWhite.png,redDoorBg.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,scoreNum0.png,scoreNum1.png,scoreNum2.png,scoreNum3.png,scoreNum4.png,scoreNum5.png,scoreNum6.png,scoreNum7.png,scoreNum8.png,scoreNum9.png,scoreNum关.png,scoreNum冒号.png,scoreNum分.png,scoreNum数.png,scoreNum通.png,settingBg.png,settingBtn.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,stepNum0.png,stepNum1.png,stepNum2.png,stepNum3.png,stepNum4.png,stepNum5.png,stepNum6.png,stepNum7.png,stepNum8.png,stepNum9.png,table.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,topBg.png,unlightedStar.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png"
,
"keys"
:
"blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,bubleEle0.png,bubleEle1.png,bubleEle2.png,bubleEle3.png,bubleEle4.png,chapterNum0.png,chapterNum1.png,chapterNum2.png,chapterNum3.png,chapterNum4.png,chapterNum5.png,chapterNum6.png,chapterNum7.png,chapterNum8.png,chapterNum9.png,chapterNum关.png,chapterNum第.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0Exp.png,ele
0Line.png,ele1Exp.png,ele1Line.png,ele2Exp.png,ele2Line.png,ele3Exp.png,ele3Line.png,ele4Exp.png,ele4Line
.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,gameGuideBoard.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8-1.png,hairballPiece8.png,hairballPiece9.png,ice2.png,ice3.png,ice4.png,ice5.jpg,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,musicOff.png,musicOn.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,prop_count_bg.png,rectLat.png,rectLatWhite.png,redDoorBg.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,scoreNum0.png,scoreNum1.png,scoreNum2.png,scoreNum3.png,scoreNum4.png,scoreNum5.png,scoreNum6.png,scoreNum7.png,scoreNum8.png,scoreNum9.png,scoreNum关.png,scoreNum冒号.png,scoreNum分.png,scoreNum数.png,scoreNum通.png,settingBg.png,settingBtn.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,stepNum0.png,stepNum1.png,stepNum2.png,stepNum3.png,stepNum4.png,stepNum5.png,stepNum6.png,stepNum7.png,stepNum8.png,stepNum9.png,table.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,topBg.png,unlightedStar.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png"
,
"name"
:
"playScene"
},
{
...
...
src/ResJson.ts
View file @
71c6e716
...
...
@@ -73,7 +73,7 @@ export const ResJson = {
"name"
:
"map"
},
{
"keys"
:
"blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,bubleEle0.png,bubleEle1.png,bubleEle2.png,bubleEle3.png,bubleEle4.png,chapterNum0.png,chapterNum1.png,chapterNum2.png,chapterNum3.png,chapterNum4.png,chapterNum5.png,chapterNum6.png,chapterNum7.png,chapterNum8.png,chapterNum9.png,chapterNum关.png,chapterNum第.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0Exp.png,ele
1Exp.png,ele2Exp.png,ele3Exp.png,ele4Exp
.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,gameGuideBoard.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8-1.png,hairballPiece8.png,hairballPiece9.png,ice2.png,ice3.png,ice4.png,ice5.jpg,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,musicOff.png,musicOn.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,prop_count_bg.png,rectLat.png,rectLatWhite.png,redDoorBg.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,scoreNum0.png,scoreNum1.png,scoreNum2.png,scoreNum3.png,scoreNum4.png,scoreNum5.png,scoreNum6.png,scoreNum7.png,scoreNum8.png,scoreNum9.png,scoreNum关.png,scoreNum冒号.png,scoreNum分.png,scoreNum数.png,scoreNum通.png,settingBg.png,settingBtn.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,stepNum0.png,stepNum1.png,stepNum2.png,stepNum3.png,stepNum4.png,stepNum5.png,stepNum6.png,stepNum7.png,stepNum8.png,stepNum9.png,table.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,topBg.png,unlightedStar.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png"
,
"keys"
:
"blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,bubleEle0.png,bubleEle1.png,bubleEle2.png,bubleEle3.png,bubleEle4.png,chapterNum0.png,chapterNum1.png,chapterNum2.png,chapterNum3.png,chapterNum4.png,chapterNum5.png,chapterNum6.png,chapterNum7.png,chapterNum8.png,chapterNum9.png,chapterNum关.png,chapterNum第.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0Exp.png,ele
0Line.png,ele1Exp.png,ele1Line.png,ele2Exp.png,ele2Line.png,ele3Exp.png,ele3Line.png,ele4Exp.png,ele4Line
.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,gameGuideBoard.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8-1.png,hairballPiece8.png,hairballPiece9.png,ice2.png,ice3.png,ice4.png,ice5.jpg,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,musicOff.png,musicOn.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,prop_count_bg.png,rectLat.png,rectLatWhite.png,redDoorBg.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,scoreNum0.png,scoreNum1.png,scoreNum2.png,scoreNum3.png,scoreNum4.png,scoreNum5.png,scoreNum6.png,scoreNum7.png,scoreNum8.png,scoreNum9.png,scoreNum关.png,scoreNum冒号.png,scoreNum分.png,scoreNum数.png,scoreNum通.png,settingBg.png,settingBtn.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,stepNum0.png,stepNum1.png,stepNum2.png,stepNum3.png,stepNum4.png,stepNum5.png,stepNum6.png,stepNum7.png,stepNum8.png,stepNum9.png,table.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,topBg.png,unlightedStar.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png"
,
"name"
:
"playScene"
},
{
...
...
src/scene/PlayScene.ts
View file @
71c6e716
...
...
@@ -362,14 +362,14 @@ export class PlayScene extends Scene {
async
initSvgas
()
{
//这里加载资源吧
await
RES
.
loadGroup
(
"bonusTime"
)
var
bonusTime
=
new
Lottie
(
bonus_lottie
)
const
bonusTime
=
new
Lottie
(
bonus_lottie
);
bonusTime
.
position
.
set
(
(
750
-
bonusTime
.
videoWidth
)
/
2
,
(
1624
-
bonusTime
.
videoHeight
)
/
2
-
layers
.
stageOffsetY
)
movieClips
.
bonusTime
=
bonusTime
;
[
"great"
,
"wonderful"
,
"amazing"
].
forEach
((
e
)
=>
{
var
g
=
new
GameToast
(
e
+
".png"
);
const
g
=
new
GameToast
(
e
+
".png"
);
g
.
position
.
set
(
375
,
1624
/
2
-
layers
.
stageOffsetY
);
movieClips
[
e
]
=
g
})
...
...
@@ -379,11 +379,11 @@ export class PlayScene extends Scene {
initScene
()
{
//第几关
var
chapterTex
=
Tools
.
getNumTextures
(
"chapterNum"
);
const
chapterTex
=
Tools
.
getNumTextures
(
"chapterNum"
);
[
"第"
,
"关"
].
forEach
((
e
)
=>
{
chapterTex
[
e
]
=
RES
.
getRes
(
"chapterNum"
+
e
+
".png"
)
})
var
chapterTxt
=
this
.
addChild
(
new
FYGE
.
BitmapText
(
chapterTex
));
const
chapterTxt
=
this
.
addChild
(
new
FYGE
.
BitmapText
(
chapterTex
));
chapterTxt
.
text
=
"第"
+
(
this
.
chapter
>>
0
)
+
"关"
;
chapterTxt
.
position
.
set
(
535
,
58
);
//步数
...
...
@@ -397,15 +397,15 @@ export class PlayScene extends Scene {
//分数置0
this
.
score
=
0
;
//地图生成
var
path
=
generateMapBg
(
this
.
chapterData
.
map
.
lattices
);
var
bg
=
drawBg
(
path
,
this
.
chapterData
.
map
.
lattices
)
const
path
=
generateMapBg
(
this
.
chapterData
.
map
.
lattices
);
const
bg
=
drawBg
(
path
,
this
.
chapterData
.
map
.
lattices
);
this
.
addChild
(
bg
);
this
.
map
=
bg
;
//容器
this
.
elementContainer
=
new
FYGE
.
Container
();
this
.
addChild
(
this
.
elementContainer
);
//加遮罩,大遮罩一直都加,小遮罩时时判断
var
mask
=
drawShape
(
path
);
const
mask
=
drawShape
(
path
);
this
.
elementContainer
.
mask
=
mask
;
mask
.
updateShape
();
//执行一边吧,不然又bug,不更新_localBoundSelf
this
.
addChild
(
mask
)
...
...
@@ -441,8 +441,8 @@ export class PlayScene extends Scene {
if
(
this
.
chapterData
.
passTarget
.
type
==
PassType
.
ELEMENT_TARGET
)
{
this
.
hasEliminatedElements
=
[];
this
.
passElements
=
[];
for
(
var
m
=
0
;
m
<
this
.
chapterData
.
passTarget
.
elements
.
length
;
m
++
)
{
var
element
:
ElementTargetData
=
this
.
chapterData
.
passTarget
.
elements
[
m
];
for
(
let
m
=
0
;
m
<
this
.
chapterData
.
passTarget
.
elements
.
length
;
m
++
)
{
const
element
:
ElementTargetData
=
this
.
chapterData
.
passTarget
.
elements
[
m
];
this
.
passElements
[
element
.
type
]
=
element
.
count
;
this
.
hasEliminatedElements
[
element
.
type
]
=
0
;
}
...
...
@@ -497,8 +497,8 @@ export class PlayScene extends Scene {
//画回收口
const
texture
:
FYGE
.
Texture
=
RES
.
getRes
(
'main_mapbottom.png'
);
const
imgs
=
new
FYGE
.
Container
;
for
(
var
m
=
0
;
m
<
this
.
recycleIndexs
.
length
;
m
++
)
{
var
p
=
Tool
.
getPositionByIndex
(
this
.
recycleIndexs
[
m
]);
for
(
let
m
=
0
;
m
<
this
.
recycleIndexs
.
length
;
m
++
)
{
const
p
=
Tool
.
getPositionByIndex
(
this
.
recycleIndexs
[
m
]);
const
img
=
new
FYGE
.
Sprite
(
texture
);
img
.
x
=
p
[
0
];
img
.
y
=
p
[
1
];
...
...
@@ -513,10 +513,10 @@ export class PlayScene extends Scene {
//初始化地图格子数据,包括生成口,联通口
initLattices
()
{
var
latticesD
=
this
.
chapterData
.
map
.
lattices
;
const
latticesD
=
this
.
chapterData
.
map
.
lattices
;
//先格子
this
.
lattices
=
[];
for
(
var
i
=
0
;
i
<
latticesD
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
latticesD
.
length
;
i
++
)
{
if
(
!
latticesD
[
i
])
continue
;
this
.
lattices
[
i
]
=
Pool
.
takeOut
(
RecoverName
.
LATTICE
);
if
(
!
this
.
lattices
[
i
])
{
...
...
@@ -525,12 +525,12 @@ export class PlayScene extends Scene {
this
.
lattices
[
i
].
reset
(
i
);
}
//位置
var
p
=
Tool
.
getPositionByIndex
(
i
);
const
p
=
Tool
.
getPositionByIndex
(
i
);
//石门
var
dooreData
=
[
4
,
5
,
6
,
51
,
61
]
const
dooreData
=
[
4
,
5
,
6
,
51
,
61
];
if
(
dooreData
.
indexOf
(
latticesD
[
i
])
>=
0
)
{
let
door
:
Door
=
Pool
.
takeOut
(
RecoverName
.
DOOR
);
var
closed
:
boolean
=
(
latticesD
[
i
]
+
""
).
length
==
2
?
false
:
true
const
closed
:
boolean
=
(
latticesD
[
i
]
+
""
).
length
!=
2
;
if
(
!
door
)
{
door
=
new
Door
(
closed
);
}
else
{
...
...
@@ -542,13 +542,13 @@ export class PlayScene extends Scene {
door
.
y
=
p
[
1
];
}
//冰块数据 2 3 5 6 或者51 61
var
iceData
=
[
2
,
3
,
5
,
6
,
51
,
61
]
const
iceData
=
[
2
,
3
,
5
,
6
,
51
,
61
];
if
(
iceData
.
indexOf
(
latticesD
[
i
])
>=
0
)
{
var
iceCount
=
(
function
(
n
)
{
const
iceCount
=
(
function
(
n
)
{
if
(
n
==
2
||
n
==
3
)
return
n
-
1
;
if
(
n
==
5
||
n
==
6
)
return
n
-
4
;
return
parseInt
((
n
+
""
).
split
(
""
)[
0
])
-
4
;
})(
latticesD
[
i
])
})(
latticesD
[
i
])
;
let
ice
=
Pool
.
takeOut
(
RecoverName
.
ICE
);
if
(
!
ice
)
{
ice
=
new
Ice
(
iceCount
);
...
...
@@ -577,15 +577,15 @@ export class PlayScene extends Scene {
let
hasBigToSmall
:
boolean
;
//联通口
const
connectedLats
=
this
.
chapterData
.
map
.
connectedLats
||
[];
for
(
var
i
=
0
;
i
<
connectedLats
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
connectedLats
.
length
;
i
++
)
{
//0是上格子,1是下格子
const
connectedLat
=
connectedLats
[
i
];
if
(
!
connectedLat
||
!
connectedLat
.
length
)
continue
;
this
.
lattices
[
connectedLat
[
0
]].
down
=
connectedLat
[
1
];
this
.
lattices
[
connectedLat
[
1
]].
up
=
connectedLat
[
0
];
var
colUp
=
Tool
.
indexToRc
(
connectedLat
[
0
])[
1
];
var
colDown
=
Tool
.
indexToRc
(
connectedLat
[
1
])[
1
];
const
colUp
=
Tool
.
indexToRc
(
connectedLat
[
0
])[
1
];
const
colDown
=
Tool
.
indexToRc
(
connectedLat
[
1
])[
1
];
downMax
=
Math
.
max
(
downMax
,
colDown
);
upMax
=
Math
.
max
(
upMax
,
colUp
);
if
(
colUp
>
colDown
)
hasBigToSmall
=
true
;
...
...
@@ -938,7 +938,7 @@ export class PlayScene extends Scene {
}
let
fun
:
Function
;
this
.
elementContainer
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
fun
=
function
(
e
)
{
var
ele
=
e
.
currentTarget
.
parent
.
parent
;
const
ele
=
e
.
currentTarget
.
parent
.
parent
;
if
(
ele
instanceof
Element
&&
// ele.type != ElementType.ROCK &&
ele
.
type
!=
ElementType
.
LOLLIPOP
)
{
...
...
@@ -1202,10 +1202,10 @@ export class PlayScene extends Scene {
private
fallVertical
()
{
var
anis
:
FallAniData
[]
=
[]
//先把竖直掉落一格
for
(
var
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
{
for
(
let
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
{
//同一列
for
(
var
n
=
Tool
.
rowNum
-
1
;
n
>=
0
;
n
--
)
{
var
index
=
Tool
.
rcToIndex
(
n
,
m
);
for
(
let
n
=
Tool
.
rowNum
-
1
;
n
>=
0
;
n
--
)
{
const
index
=
Tool
.
rcToIndex
(
n
,
m
);
let
lat
=
this
.
lattices
[
index
];
if
(
Tool
.
judgeFall
(
lat
))
{
//如果能掉落,,找down,下面,左下,右下是否有空格
...
...
@@ -1220,7 +1220,7 @@ export class PlayScene extends Scene {
connects
.
push
({
index
:
indexDown
,
type
:
FallType
.
STRIGHT
})
}
//下方有格子,并且再this.empty中
var
emptyIndex
=
this
.
emptys
.
indexOf
(
indexDown
)
const
emptyIndex
=
this
.
emptys
.
indexOf
(
indexDown
);
if
(
emptyIndex
>
-
1
)
{
anis
.
push
({
ele
:
lat
.
element
,
indexs
:
connects
});
//去掉一个
...
...
@@ -1257,18 +1257,18 @@ export class PlayScene extends Scene {
//2表示存在大列连通到小烈,从左往右遍历
//3表示都有,遍历两边,down比up大,从右先
//4表示都有,遍历两边,down比up小,从左先
var
anis
:
FallAniData
[]
=
[]
const
anis
:
FallAniData
[]
=
[];
let
operation
=
(
m
)
=>
{
//同一列,先原有的填满,再查是否有生成口
for
(
var
n
=
Tool
.
rowNum
-
1
;
n
>=
0
;
n
--
)
{
for
(
let
n
=
Tool
.
rowNum
-
1
;
n
>=
0
;
n
--
)
{
let
index
=
Tool
.
rcToIndex
(
n
,
m
);
let
lat
=
this
.
lattices
[
index
];
if
(
Tool
.
judgeFall
(
lat
))
{
//待修改
var
indexs
=
Tool
.
findBottom
(
lat
,
this
.
emptys
,
this
.
lattices
);
const
indexs
=
Tool
.
findBottom
(
lat
,
this
.
emptys
,
this
.
lattices
);
if
(
indexs
!=
null
)
{
//最后一个
var
downIndex
=
indexs
[
indexs
.
length
-
1
].
index
;
const
downIndex
=
indexs
[
indexs
.
length
-
1
].
index
;
anis
.
push
({
ele
:
lat
.
element
,
indexs
:
indexs
});
//去掉最后一个
// this.emptys.splice(emptyIndex, 1);
...
...
@@ -1283,7 +1283,7 @@ export class PlayScene extends Scene {
}
//找m列的生成口,可能有多个
if
(
this
.
generateIndexs
[
m
])
{
for
(
var
aaa
=
0
;
aaa
<
this
.
generateIndexs
[
m
].
length
;
aaa
++
)
{
for
(
let
aaa
=
0
;
aaa
<
this
.
generateIndexs
[
m
].
length
;
aaa
++
)
{
let
index
=
this
.
generateIndexs
[
m
][
aaa
].
index
;
let
lat
=
this
.
lattices
[
index
];
//如果有格子。无元素,是生成口,要补齐下面能掉落的
...
...
@@ -1320,15 +1320,15 @@ export class PlayScene extends Scene {
}
}
if
(
this
.
connectState
==
1
)
{
for
(
var
m
=
Tool
.
colNum
;
m
>=
0
;
m
--
)
operation
(
m
)
for
(
let
m
=
Tool
.
colNum
;
m
>=
0
;
m
--
)
operation
(
m
)
}
else
if
(
this
.
connectState
==
2
)
{
for
(
var
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
operation
(
m
)
for
(
let
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
operation
(
m
)
}
else
if
(
this
.
connectState
==
3
)
{
for
(
var
m
=
Tool
.
colNum
;
m
>=
0
;
m
--
)
operation
(
m
);
for
(
var
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
operation
(
m
);
for
(
let
m
=
Tool
.
colNum
;
m
>=
0
;
m
--
)
operation
(
m
);
for
(
let
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
operation
(
m
);
}
else
if
(
this
.
connectState
==
4
)
{
for
(
var
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
operation
(
m
);
for
(
var
m
=
Tool
.
colNum
;
m
>=
0
;
m
--
)
operation
(
m
);
for
(
let
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
operation
(
m
);
for
(
let
m
=
Tool
.
colNum
;
m
>=
0
;
m
--
)
operation
(
m
);
}
return
anis
;
}
...
...
@@ -1338,22 +1338,22 @@ export class PlayScene extends Scene {
*/
private
fallSkewEx
()
{
//记录一个对象和位置信息[obj,index]的数组,如果obj是null则生成,index位置上方
var
anis
:
FallAniData
[]
=
[];
var
emptys
=
this
.
emptys
;
const
anis
:
FallAniData
[]
=
[];
const
emptys
=
this
.
emptys
;
//排序从大到小
emptys
.
sort
(
function
(
a
,
b
)
{
return
a
<
b
?
1
:
-
1
})
for
(
var
i
=
0
;
i
<
emptys
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
emptys
.
length
;
i
++
)
{
let
indexMy
=
emptys
[
i
];
var
lat
=
this
.
lattices
[
indexMy
];
const
lat
=
this
.
lattices
[
indexMy
];
let
latFall
;
let
indexFall
;
let
type
:
FallType
=
FallType
.
STRIGHT
//找联通的up,一期没有复杂的联通,所以动画不用特殊处理
if
(
lat
.
up
)
{
var
latUnUp
=
this
.
lattices
[
lat
.
up
];
const
latUnUp
=
this
.
lattices
[
lat
.
up
];
if
(
Tool
.
judgeFall
(
latUnUp
))
{
latFall
=
latUnUp
;
indexFall
=
lat
.
up
;
...
...
@@ -1362,7 +1362,7 @@ export class PlayScene extends Scene {
}
//找正上方
if
(
!
latFall
&&
Tool
.
indexToRc
(
indexMy
)[
0
]
!=
0
)
{
var
latUp
=
this
.
lattices
[
indexMy
-
Tool
.
colNum
];
const
latUp
=
this
.
lattices
[
indexMy
-
Tool
.
colNum
];
if
(
Tool
.
judgeFall
(
latUp
))
{
latFall
=
latUp
;
indexFall
=
indexMy
-
Tool
.
colNum
;
...
...
@@ -1371,7 +1371,7 @@ export class PlayScene extends Scene {
//找左上
let
findLeft
=
()
=>
{
if
(
!
latFall
&&
Tool
.
indexToRc
(
indexMy
)[
1
]
!=
0
)
{
var
latLeftUp
=
this
.
lattices
[
indexMy
-
Tool
.
colNum
-
1
];
const
latLeftUp
=
this
.
lattices
[
indexMy
-
Tool
.
colNum
-
1
];
if
(
Tool
.
judgeFall
(
latLeftUp
))
{
latFall
=
latLeftUp
;
indexFall
=
indexMy
-
Tool
.
colNum
-
1
;
...
...
@@ -1381,7 +1381,7 @@ export class PlayScene extends Scene {
//找右上
let
findRight
=
()
=>
{
if
(
!
latFall
&&
Tool
.
indexToRc
(
indexMy
)[
1
]
!=
Tool
.
colNum
-
1
)
{
var
latRightUp
=
this
.
lattices
[
indexMy
-
Tool
.
colNum
+
1
];
const
latRightUp
=
this
.
lattices
[
indexMy
-
Tool
.
colNum
+
1
];
if
(
Tool
.
judgeFall
(
latRightUp
))
{
latFall
=
latRightUp
;
indexFall
=
indexMy
-
Tool
.
colNum
+
1
;
...
...
@@ -1423,7 +1423,6 @@ export class PlayScene extends Scene {
emptys
.
splice
(
i
,
1
);
//优先判断生成的,不用管掉落了,跳下一个
i
--
continue
}
}
}
...
...
@@ -1680,15 +1679,15 @@ export class PlayScene extends Scene {
//横排检测
for
(
let
i
=
0
;
i
<
Tool
.
rowNum
;
i
++
)
{
//集合横排元素
var
arr
=
[]
for
(
var
g
=
0
;
g
<
Tool
.
colNum
;
g
++
)
{
const
arr
=
[]
for
(
let
g
=
0
;
g
<
Tool
.
colNum
;
g
++
)
{
arr
.
push
(
i
*
Tool
.
colNum
+
g
)
}
let
re
=
Tool
.
fn
(
arr
,
this
.
lattices
);
for
(
var
j
=
0
;
j
<
re
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
re
.
length
;
j
++
)
{
let
len
=
re
[
j
].
length
;
if
(
len
>=
3
)
{
for
(
var
k
=
0
;
k
<
len
;
k
++
)
{
for
(
let
k
=
0
;
k
<
len
;
k
++
)
{
let
ele
=
this
.
lattices
[
re
[
j
][
k
]].
element
;
this
.
eliminatedElements
.
push
(
re
[
j
][
k
]);
//是五个的
...
...
@@ -1715,15 +1714,15 @@ export class PlayScene extends Scene {
//竖排检测
for
(
let
m
=
0
;
m
<
Tool
.
colNum
;
m
++
)
{
//集合竖排元素
var
arr
=
[]
for
(
var
g
=
0
;
g
<
Tool
.
rowNum
;
g
++
)
{
const
arr
=
[]
for
(
let
g
=
0
;
g
<
Tool
.
rowNum
;
g
++
)
{
arr
.
push
(
Tool
.
colNum
*
g
+
m
)
}
let
re
=
Tool
.
fn
(
arr
,
this
.
lattices
);
for
(
var
j
=
0
;
j
<
re
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
re
.
length
;
j
++
)
{
let
len
=
re
[
j
].
length
;
if
(
len
>=
3
)
{
for
(
var
k
=
0
;
k
<
len
;
k
++
)
{
for
(
let
k
=
0
;
k
<
len
;
k
++
)
{
let
ele
=
this
.
lattices
[
re
[
j
][
k
]].
element
;
//是五个的,特殊处理
if
(
len
>=
5
)
{
...
...
@@ -1771,8 +1770,8 @@ export class PlayScene extends Scene {
}
//算普通消除分数
if
(
this
.
eliminatedElements
.
length
&&
!
this
.
hasPassed
)
this
.
commonContinuityTimes
++
;
for
(
var
aa
=
0
;
aa
<
this
.
eliminatedElements
.
length
;
aa
++
)
{
var
index
=
this
.
eliminatedElements
[
aa
];
for
(
let
aa
=
0
;
aa
<
this
.
eliminatedElements
.
length
;
aa
++
)
{
const
index
=
this
.
eliminatedElements
[
aa
];
//没有锁,也没有毛球
if
(
Tool
.
judgeHasScore
(
this
.
lattices
[
index
].
element
))
{
this
.
pushScoreAni
(
baseScore
*
this
.
commonContinuityTimes
,
Tool
.
getPositionByIndex
(
index
))
...
...
@@ -1795,11 +1794,11 @@ export class PlayScene extends Scene {
//先消除有旋转的消除完就置空
this
.
rotateEliminate
()
//消除同时找出带特效的
var
effectIndexs
=
this
.
commonEliminate
();
var
scoreAll
=
0
;
const
effectIndexs
=
this
.
commonEliminate
();
let
scoreAll
=
0
;
//得分动效执行,在上面消除动效后出现,分数动效层级要高
for
(
var
i
=
0
;
i
<
this
.
scoreAnis
.
length
;
i
++
)
{
var
scoreAni
=
this
.
scoreAnis
[
i
];
for
(
let
i
=
0
;
i
<
this
.
scoreAnis
.
length
;
i
++
)
{
const
scoreAni
=
this
.
scoreAnis
[
i
];
scoreAll
+=
scoreAni
.
score
;
// this.addChild(scoreAni)
// scoreAni.play();
...
...
@@ -1977,8 +1976,8 @@ export class PlayScene extends Scene {
* 特效元素的组合效果
*/
effectCombination
()
{
var
one
=
this
.
eliminatedElements
[
0
];
var
two
=
this
.
eliminatedElements
[
1
];
const
one
=
this
.
eliminatedElements
[
0
];
const
two
=
this
.
eliminatedElements
[
1
];
let
lat1
=
this
.
lattices
[
one
];
let
lat2
=
this
.
lattices
[
two
];
let
ele1
:
Element
=
this
.
lattices
[
one
].
element
;
...
...
@@ -1997,8 +1996,8 @@ export class PlayScene extends Scene {
this
.
recoverEle
(
two
);
//先不管特效组合时的自身的分数
//把所有元素加入
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
var
lat
=
this
.
lattices
[
i
];
for
(
let
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
const
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeEliminate
(
lat
))
{
//本来没必要判断特效组合时是否有重复的消除元素,但是recoverEle里会有判断石头或果冻的加入,造成重复
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
...
...
@@ -2013,7 +2012,7 @@ export class PlayScene extends Scene {
else
if
((
ele1
.
effectType
==
EffectType
.
MAGICLION
||
ele2
.
effectType
==
EffectType
.
MAGICLION
))
{
//playSound(SoundType.magic)
let
magic
:
Element
,
other
:
Element
;
var
magicIndex
:
number
;
let
magicIndex
:
number
;
if
(
ele1
.
effectType
==
EffectType
.
MAGICLION
)
{
magic
=
ele1
;
other
=
ele2
;
...
...
@@ -2027,15 +2026,15 @@ export class PlayScene extends Scene {
this
.
playAni
(
RecoverName
.
MAGICLION_ANI
,
Tool
.
getPositionByIndex
(
magicIndex
));
//移除
this
.
recoverEle
(
magicIndex
);
var
rotateData
:
MagicRotateData
=
{
const
rotateData
:
MagicRotateData
=
{
p
:
Tool
.
getPositionByIndex
(
magicIndex
),
elementsIndex
:
[],
type
:
other
.
type
,
}
}
;
//手动触发只有一个
this
.
magicRotateData
=
[
rotateData
];
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
var
lat
=
this
.
lattices
[
i
];
for
(
let
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
const
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeMagicEliminate
(
lat
)
&&
lat
.
element
.
type
==
other
.
type
//类型相等
)
{
...
...
@@ -2065,15 +2064,15 @@ export class PlayScene extends Scene {
else
if
(
ele1
.
effectType
<
2
&&
ele2
.
effectType
<
2
)
{
//playSound(SoundType.line)
//以第二个元素为中心
var
p
=
Tool
.
getPositionByIndex
(
one
);
const
p
=
Tool
.
getPositionByIndex
(
one
);
//播放特效
this
.
playAni
(
RecoverName
.
CROSS_ANI
,
p
);
//回收
this
.
recoverEle
(
one
)
this
.
recoverEle
(
two
)
//添加消除元素two,同行或同列
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
var
lat
=
this
.
lattices
[
i
];
for
(
let
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
const
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
lat
.
row
==
lat1
.
row
||
lat
.
column
==
lat1
.
column
))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
...
...
@@ -2088,15 +2087,15 @@ export class PlayScene extends Scene {
(
ele1
.
effectType
==
EffectType
.
EXPLOSIVE
||
ele2
.
effectType
==
EffectType
.
EXPLOSIVE
))
{
//playSound(SoundType.line)
//以第二个元素为中心
var
p
=
Tool
.
getPositionByIndex
(
one
);
const
p
=
Tool
.
getPositionByIndex
(
one
);
//播放特效
this
.
playAni
(
RecoverName
.
THREECROSS_ANI
,
p
);
//回收
this
.
recoverEle
(
one
)
this
.
recoverEle
(
two
)
//添加消除元素two,同行或同列,需要优化
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
var
lat
=
this
.
lattices
[
i
];
for
(
let
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
const
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
Math
.
abs
(
lat
.
row
-
lat1
.
row
)
<
2
||
Math
.
abs
(
lat
.
column
-
lat1
.
column
)
<
2
))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
...
...
@@ -2111,17 +2110,17 @@ export class PlayScene extends Scene {
else
if
(
ele1
.
effectType
==
EffectType
.
EXPLOSIVE
&&
ele2
.
effectType
==
EffectType
.
EXPLOSIVE
)
{
//playSound(SoundType.boom)
//以第二个元素为中心
var
p
=
Tool
.
getPositionByIndex
(
one
);
const
p
=
Tool
.
getPositionByIndex
(
one
);
//播放特效
var
boomAni
=
this
.
playAni
(
RecoverName
.
BOOM_ANI
,
p
);
const
boomAni
=
this
.
playAni
(
RecoverName
.
BOOM_ANI
,
p
);
boomAni
.
scaleX
=
boomAni
.
scaleY
=
2
;
//回收
this
.
recoverEle
(
one
)
this
.
recoverEle
(
two
)
//添加消除元素two,5*5,需要优化
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
var
lat
=
this
.
lattices
[
i
];
for
(
let
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
const
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
Math
.
abs
(
lat
.
row
-
lat1
.
row
)
<
3
&&
Math
.
abs
(
lat
.
column
-
lat1
.
column
)
<
3
))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
...
...
@@ -2138,10 +2137,10 @@ export class PlayScene extends Scene {
* 螺旋线消除
*/
rotateEliminate
()
{
for
(
var
m
=
0
;
m
<
this
.
magicRotateData
.
length
;
m
++
)
{
var
indexs
=
this
.
magicRotateData
[
m
].
elementsIndex
;
var
position
=
this
.
magicRotateData
[
m
].
p
;
for
(
var
n
=
0
;
n
<
indexs
.
length
;
n
++
)
{
for
(
let
m
=
0
;
m
<
this
.
magicRotateData
.
length
;
m
++
)
{
const
indexs
=
this
.
magicRotateData
[
m
].
elementsIndex
;
const
position
=
this
.
magicRotateData
[
m
].
p
;
for
(
let
n
=
0
;
n
<
indexs
.
length
;
n
++
)
{
let
roIndex
=
indexs
[
n
];
let
roEle
=
this
.
lattices
[
roIndex
].
element
//如果即将产生特效的,跳下一个
...
...
@@ -2163,13 +2162,13 @@ export class PlayScene extends Scene {
commonEliminate
():
number
[]
{
//playSound(SoundType.eliminate)
//记录带特效的
var
effectIndexs
:
number
[]
=
[];
for
(
var
i
=
this
.
eliminatedElements
.
length
-
1
;
i
>=
0
;
i
--
)
{
var
index
=
this
.
eliminatedElements
[
i
];
var
lat
=
this
.
lattices
[
index
];
const
effectIndexs
:
number
[]
=
[];
for
(
let
i
=
this
.
eliminatedElements
.
length
-
1
;
i
>=
0
;
i
--
)
{
const
index
=
this
.
eliminatedElements
[
i
];
const
lat
=
this
.
lattices
[
index
];
//不用判断是否存在元素了吧
var
ele
=
lat
.
element
;
var
p
=
Tool
.
getPositionByIndex
(
index
);
const
ele
=
lat
.
element
;
const
p
=
Tool
.
getPositionByIndex
(
index
);
if
(
!
ele
)
{
//以防万一还是判断一次
}
...
...
@@ -2182,7 +2181,7 @@ export class PlayScene extends Scene {
}
//有褐色毛球的,记录分裂激活
else
if
(
ele
.
hasState
(
StateType
.
HAIRBALLBROWN
))
{
var
hairballBrownState
:
HairballBrownState
=
ele
.
getState
(
StateType
.
HAIRBALLBROWN
);
const
hairballBrownState
:
HairballBrownState
=
ele
.
getState
(
StateType
.
HAIRBALLBROWN
);
hairballBrownState
.
isActive
=
true
;
//算个数,不能在这里算,得在分裂时算,分裂时算也有问题,目标完成就后置了,会出bug,最好就是不设为目标。
// this.goElementTarget(ElementType.HAIRBALLBROWN, [ele.x, ele.y]);
...
...
@@ -2198,7 +2197,7 @@ export class PlayScene extends Scene {
}
//有黑色毛球的,一次眩晕,两次消失
else
if
(
ele
.
hasState
(
StateType
.
HAIRBALLGREY
))
{
var
blackballBrownState
:
HairballBlackState
=
ele
.
getState
(
StateType
.
HAIRBALLBLACK
);
const
blackballBrownState
:
HairballBlackState
=
ele
.
getState
(
StateType
.
HAIRBALLBLACK
);
//醒着的就晕
if
(
blackballBrownState
.
isAwake
)
{
blackballBrownState
.
isAwake
=
false
;
...
...
@@ -2287,23 +2286,23 @@ export class PlayScene extends Scene {
return
this
.
eliminatedElements
.
indexOf
(
i
)
<
0
&&
effectIndexs
.
indexOf
(
i
)
<
0
}
// var sounds: SoundType[] = [];
for
(
var
j
=
0
;
j
<
effectIndexs
.
length
;
j
++
)
{
var
index
=
effectIndexs
[
j
];
var
lat
:
Lattice
=
this
.
lattices
[
index
];
for
(
let
j
=
0
;
j
<
effectIndexs
.
length
;
j
++
)
{
const
index
=
effectIndexs
[
j
];
const
lat
:
Lattice
=
this
.
lattices
[
index
];
let
ele
=
lat
.
element
;
var
p
=
Tool
.
getPositionByIndex
(
index
);
const
p
=
Tool
.
getPositionByIndex
(
index
);
switch
(
ele
.
effectType
)
{
case
EffectType
.
MAGICLION
:
// if (sounds.indexOf(SoundType.magic) == -1) sounds.push(SoundType.magic)
this
.
playAni
(
RecoverName
.
MAGICLION_ANI
,
p
);
this
.
recoverEle
(
index
);
//为了不重复
var
types
=
this
.
chapterData
.
baseElementTypes
.
slice
();
for
(
var
iii
=
0
;
iii
<
this
.
magicRotateData
.
length
;
iii
++
)
{
const
types
=
this
.
chapterData
.
baseElementTypes
.
slice
();
for
(
let
iii
=
0
;
iii
<
this
.
magicRotateData
.
length
;
iii
++
)
{
Tool
.
removeEle
(
this
.
magicRotateData
[
iii
].
type
,
types
)
}
//随一种基础元素
var
type
=
types
.
length
?
Tool
.
randomT
(
types
)
:
Tool
.
randomT
(
this
.
chapterData
.
baseElementTypes
);
const
type
=
types
.
length
?
Tool
.
randomT
(
types
)
:
Tool
.
randomT
(
this
.
chapterData
.
baseElementTypes
);
//建一个旋转数据
let
rotateData
:
MagicRotateData
=
{
p
:
Tool
.
getPositionByIndex
(
index
),
...
...
@@ -2312,7 +2311,7 @@ export class PlayScene extends Scene {
}
this
.
magicRotateData
.
push
(
rotateData
);
//对于魔力鸟的效果有不一样的,旋转,该组元素要旋转消除
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
if
(
Tool
.
judgeMagicEliminate
(
this
.
lattices
[
i
])
&&
this
.
lattices
[
i
].
element
.
type
==
type
&&
//类型相等
judgeExclude
(
i
)
...
...
@@ -2332,7 +2331,7 @@ export class PlayScene extends Scene {
case
EffectType
.
EXPLOSIVE
:
// if (sounds.indexOf(SoundType.boom) == -1) sounds.push(SoundType.boom)
//动画移除自己
var
boomAni
=
this
.
playAni
(
RecoverName
.
BOOM_ANI
,
p
);
const
boomAni
=
this
.
playAni
(
RecoverName
.
BOOM_ANI
,
p
);
boomAni
.
scaleX
=
boomAni
.
scaleY
=
1
;
this
.
recoverEle
(
index
);
//3*3,需要优化
...
...
@@ -2360,12 +2359,12 @@ export class PlayScene extends Scene {
break
;
case
EffectType
.
HORIZONTAL
:
// if (sounds.indexOf(SoundType.line) == -1) sounds.push(SoundType.line)
var
row
=
lat
.
row
;
const
row
=
lat
.
row
;
//动画移除自己
this
.
playAni
(
RecoverName
.
HORIZONTAL_ANI
,
p
);
this
.
recoverEle
(
index
);
for
(
var
i
=
0
;
i
<
Tool
.
colNum
;
i
++
)
{
var
ein
=
Tool
.
rcToIndex
(
row
,
i
);
for
(
let
i
=
0
;
i
<
Tool
.
colNum
;
i
++
)
{
let
ein
=
Tool
.
rcToIndex
(
row
,
i
);
if
(
Tool
.
judgeEliminate
(
this
.
lattices
[
ein
])
&&
judgeExclude
(
ein
)
)
{
...
...
@@ -2383,8 +2382,8 @@ export class PlayScene extends Scene {
//动画移除自己
this
.
playAni
(
RecoverName
.
VERTICAL_ANI
,
p
);
this
.
recoverEle
(
index
);
for
(
var
i
=
0
;
i
<
Tool
.
rowNum
;
i
++
)
{
var
ein
=
Tool
.
rcToIndex
(
i
,
col
);
for
(
let
i
=
0
;
i
<
Tool
.
rowNum
;
i
++
)
{
let
ein
=
Tool
.
rcToIndex
(
i
,
col
);
if
(
Tool
.
judgeEliminate
(
this
.
lattices
[
ein
])
&&
judgeExclude
(
ein
)
)
{
...
...
@@ -2418,11 +2417,7 @@ export class PlayScene extends Scene {
return
true
}
else
{
//判断分数
if
(
this
.
score
>
this
.
chapterData
.
passTarget
.
score
)
{
return
true
}
else
{
return
false
}
return
this
.
score
>
this
.
chapterData
.
passTarget
.
score
;
}
}
...
...
@@ -2431,9 +2426,9 @@ export class PlayScene extends Scene {
*/
terminateSteps
()
{
//遍历有特效的索引,和,基础元素
var
effectElements
=
[],
elements
=
[];
for
(
var
i
=
Tool
.
colNum
*
Tool
.
rowNum
-
1
;
i
>=
0
;
i
--
)
{
var
lat
=
this
.
lattices
[
i
];
const
effectElements
=
[],
elements
=
[];
for
(
let
i
=
Tool
.
colNum
*
Tool
.
rowNum
-
1
;
i
>=
0
;
i
--
)
{
const
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeBaseEle
(
lat
))
{
if
(
lat
.
element
.
effectType
!=
null
)
{
effectElements
.
push
(
i
);
...
...
@@ -2461,7 +2456,7 @@ export class PlayScene extends Scene {
let
deltaCount
=
0
;
//将步数变成横竖特效
while
(
deltaCount
<
countAll
)
{
var
rand
=
Math
.
floor
(
Math
.
random
()
*
elements
.
length
);
const
rand
=
Math
.
floor
(
Math
.
random
()
*
elements
.
length
);
let
ele
:
Element
=
elements
.
splice
(
rand
,
1
)[
0
];
if
(
!
ele
)
break
;
deltaCount
++
;
...
...
@@ -2479,7 +2474,7 @@ export class PlayScene extends Scene {
//去掉所有状态
ele
.
removeAllState
();
this
.
eliminatedElements
.
push
(
ele
.
index
);
this
.
pushScoreAni
(
baseScore
*
1
*
1
.5
,
[
ele
.
x
,
ele
.
y
])
this
.
pushScoreAni
(
baseScore
*
1.5
,
[
ele
.
x
,
ele
.
y
])
if
(
++
count
==
countAll
)
{
this
.
eliminate
();
//如果还有步数就置0
...
...
@@ -2540,16 +2535,16 @@ export class PlayScene extends Scene {
*/
upsetElement
()
{
//所有允许交换的格子
var
lats
:
Lattice
[]
=
[]
const
lats
:
Lattice
[]
=
[];
//记录元素和目标位置的索引,然后执行所有动画
var
anis
=
[];
//两个,0下标是元素,1下标是索引
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
var
lat
=
this
.
lattices
[
i
];
const
anis
=
[];
//两个,0下标是元素,1下标是索引
for
(
let
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
let
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeUpsetMove
(
lat
))
lats
.
push
(
lat
);
}
//不改变的
var
latsCopy
=
lats
.
slice
();
for
(
var
i
=
0
;
i
<
lats
.
length
;
i
++
)
{
const
latsCopy
=
lats
.
slice
();
for
(
let
i
=
0
;
i
<
lats
.
length
;
i
++
)
{
let
ele
=
lats
[
i
].
element
;
const
rand
=
Math
.
floor
(
Math
.
random
()
*
latsCopy
.
length
);
let
lat
=
latsCopy
.
splice
(
rand
,
1
)[
0
];
...
...
@@ -2558,12 +2553,12 @@ export class PlayScene extends Scene {
let
count
=
0
;
let
countAll
=
anis
.
length
;
//执行所有的交换动画
for
(
var
i
=
0
;
i
<
countAll
;
i
++
)
{
for
(
let
i
=
0
;
i
<
countAll
;
i
++
)
{
let
ele
:
Element
=
anis
[
i
][
0
];
let
index
:
number
=
anis
[
i
][
1
];
const
p
=
Tool
.
getPositionByIndex
(
index
);
//现在得位置的赋值
var
lat
=
this
.
lattices
[
index
];
const
lat
=
this
.
lattices
[
index
];
lat
.
element
=
ele
;
FYGE
.
Tween
.
get
(
ele
)
.
to
({
x
:
p
[
0
],
y
:
p
[
1
]},
500
)
...
...
@@ -2611,7 +2606,7 @@ export class PlayScene extends Scene {
* 获得提交数据的jsob
*/
getSubmitJson
():
string
{
var
json
=
{};
const
json
=
{};
//分数
// json[1] = this.score;
// if (this.passElements) {
...
...
@@ -2863,7 +2858,7 @@ export class PlayScene extends Scene {
this
.
addChild
(
eleC
);
/// TODO 小红包消失动画
Tween
.
get
(
eleC
)
.
to
({
scaleX
:
0
,
scaleY
:
0
},
270
,
Ease
.
backIn
)
.
to
({
scaleX
:
0
,
scaleY
:
0
},
270
,
Ease
.
backIn
)
.
call
(()
=>
{
this
.
removeChild
(
eleC
);
this
.
festivalTarget
.
count
--
;
...
...
src/something/class/Element.ts
View file @
71c6e716
...
...
@@ -132,7 +132,7 @@ export class Element extends FYGE.Container {
private
states
:
State
[]
=
[]
/**
*
*
* @param type 只应该是基础元素和特殊元素
*/
constructor
(
type
:
ElementType
)
{
...
...
@@ -183,14 +183,14 @@ export class Element extends FYGE.Container {
texArr
=
[
RES
.
getRes
(
"magicLion.png"
)];
}
else
{
//直线特效的 hor ver
texArr
=
[];
var
hv
=
this
.
_effectType
==
EffectType
.
HORIZONTAL
?
"hor"
:
"ver"
;
for
(
var
i
=
0
;
i
<=
15
;
i
++
)
{
texArr
.
push
(
RES
.
getRes
(
hv
+
"_ele"
+
this
.
_type
+
"_"
+
i
+
".png"
));
}
for
(
var
i
=
14
;
i
>=
1
;
i
--
)
{
texArr
.
push
(
RES
.
getRes
(
hv
+
"_ele"
+
this
.
_type
+
"_"
+
i
+
".png"
));
}
texArr
=
[
RES
.
getRes
(
"ele"
+
this
.
_type
+
"Line.png"
)
];
//
var hv = this._effectType == EffectType.HORIZONTAL ? "hor" : "ver";
//
for (var i = 0; i <= 15; i++) {
//
texArr.push(RES.getRes(hv + "_ele" + this._type + "_" + i + ".png"));
//
}
//
for (var i = 14; i >= 1; i--) {
//
texArr.push(RES.getRes(hv + "_ele" + this._type + "_" + i + ".png"));
//
}
}
}
//处理showImage
...
...
@@ -270,7 +270,7 @@ export class Element extends FYGE.Container {
/**
* 只修改类型,不改变其他状态,主要针对修改基础元素类型
* @param type
* @param type
*/
resetType
(
type
:
ElementType
)
{
//如果类型一致,return
...
...
@@ -336,7 +336,7 @@ export class Element extends FYGE.Container {
/**
* 是否有该状态
* @param state
* @param state
*/
hasState
(
state
:
StateType
):
boolean
{
return
!!
this
.
states
[
state
];
...
...
@@ -416,7 +416,7 @@ export class Element extends FYGE.Container {
}
/**
* 取得一个状态
* @param state
* @param state
*/
getState
(
state
:
StateType
):
any
{
return
this
.
states
[
state
]
...
...
@@ -499,4 +499,4 @@ FYGE.FrameAni.prototype.resetTexturesAll = function (texturesAll: FYGE.Texture[]
// this.changeTexture(0);
this
.
currentFrame
=
0
;
this
.
frameRate
=
30
;
}
\ 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