Commit 71c6e716 authored by haiyoucuv's avatar haiyoucuv

四连特效替换

parent 4cee9345
...@@ -3,15 +3,10 @@ ...@@ -3,15 +3,10 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="9cef0552-af3c-4a1c-be1f-dc41ebe5b6db" name="Default Changelist" comment=""> <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$/.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$/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/resource/res.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$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" 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$/src/scene/PlayScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/PlayScene.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/class/Element.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/something/class/Element.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/something/anisCall/FesRedShootAni.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/something/anisCall/FesRedShootAni.ts" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -22,9 +17,9 @@ ...@@ -22,9 +17,9 @@
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
<list> <list>
<option value="TypeScript File" /> <option value="TypeScript File" />
<option value="JavaScript File" />
<option value="HTML File" /> <option value="HTML File" />
<option value="JsonFile" /> <option value="JsonFile" />
<option value="JavaScript File" />
</list> </list>
</option> </option>
</component> </component>
...@@ -79,7 +74,7 @@ ...@@ -79,7 +74,7 @@
<recent name="$PROJECT_DIR$/resource/SuccessPrizePanel" /> <recent name="$PROJECT_DIR$/resource/SuccessPrizePanel" />
</key> </key>
</component> </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"> <configuration name="aaaa.html" type="JavascriptDebugType" temporary="true" nameIsGenerated="true" uri="http://localhost:63342/ppmt_xxl/src/aaaa.html" useBuiltInWebServerPort="true">
<method v="2" /> <method v="2" />
</configuration> </configuration>
...@@ -106,8 +101,8 @@ ...@@ -106,8 +101,8 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="npm.dev" />
<item itemvalue="npm.flushRes" /> <item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" />
<item itemvalue="JavaScript Debug.aaaa.html" /> <item itemvalue="JavaScript Debug.aaaa.html" />
</list> </list>
</recent_temporary> </recent_temporary>
...@@ -156,14 +151,7 @@ ...@@ -156,14 +151,7 @@
<workItem from="1600912046696" duration="16271000" /> <workItem from="1600912046696" duration="16271000" />
<workItem from="1600998191749" duration="23862000" /> <workItem from="1600998191749" duration="23862000" />
<workItem from="1601170975973" duration="20963000" /> <workItem from="1601170975973" duration="20963000" />
<workItem from="1601257315718" duration="43882000" /> <workItem from="1601257315718" duration="47200000" />
</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>
</task> </task>
<task id="LOCAL-00013" summary="effect"> <task id="LOCAL-00013" summary="effect">
<created>1594707268299</created> <created>1594707268299</created>
...@@ -501,7 +489,14 @@ ...@@ -501,7 +489,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1601363299406</updated> <updated>1601363299406</updated>
</task> </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 /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
...@@ -532,7 +527,8 @@ ...@@ -532,7 +527,8 @@
<MESSAGE value="afdjk,asfhksjkdulfh klasoi;dfbhjkgv kl;" /> <MESSAGE value="afdjk,asfhksjkdulfh klasoi;dfbhjkgv kl;" />
<MESSAGE value="节日红包" /> <MESSAGE value="节日红包" />
<MESSAGE value="节日红包fa" /> <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>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state x="440" y="273" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1595229546530"> <state x="440" y="273" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1595229546530">
...@@ -547,49 +543,49 @@ ...@@ -547,49 +543,49 @@
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </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="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="1601363299179"> <state x="557" y="183" width="884" height="891" key="CommitChangelistDialog2" timestamp="1601368171296">
<screen x="30" y="23" width="1890" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </state>
<state x="557" y="183" key="CommitChangelistDialog2/30.23.1890.1177@30.23.1890.1177" timestamp="1601363299179" /> <state x="557" y="183" key="CommitChangelistDialog2/30.23.1890.1177@30.23.1890.1177" timestamp="1601368171296" />
<state x="558" y="183" width="884" height="891" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1595584297912" /> <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"> <state x="131" y="123" width="730" height="977" key="DiffContextDialog" timestamp="1596165868169">
<screen x="30" y="23" width="1890" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </state>
<state x="131" y="123" width="730" height="977" key="DiffContextDialog/30.23.1890.1177@30.23.1890.1177" timestamp="1596165868169" /> <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="1601366579665"> <state width="896" height="321" key="GridCell.Tab.0.bottom" timestamp="1601372694964">
<screen x="30" y="23" width="1890" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </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="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="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="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="1601366579665" /> <state width="896" height="321" key="GridCell.Tab.0.bottom/30.23.1890.1177@30.23.1890.1177" timestamp="1601372694964" />
<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.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="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="1601366579664"> <state width="896" height="321" key="GridCell.Tab.0.center" timestamp="1601372694963">
<screen x="30" y="23" width="1890" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </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="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="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="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="1601366579664" /> <state width="896" height="321" key="GridCell.Tab.0.center/30.23.1890.1177@30.23.1890.1177" timestamp="1601372694963" />
<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.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="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="1601366579664"> <state width="896" height="321" key="GridCell.Tab.0.left" timestamp="1601372694963">
<screen x="30" y="23" width="1890" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </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="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="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="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="1601366579663" /> <state width="896" height="321" key="GridCell.Tab.0.left/30.23.1890.1177@30.23.1890.1177" timestamp="1601372694963" />
<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.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="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="1601366579664"> <state width="896" height="321" key="GridCell.Tab.0.right" timestamp="1601372694964">
<screen x="30" y="23" width="1890" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </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="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="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="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="1601366579664" /> <state width="896" height="321" key="GridCell.Tab.0.right/30.23.1890.1177@30.23.1890.1177" timestamp="1601372694964" />
<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.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 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"> <state x="82" y="353" key="IDE.errors.dialog" timestamp="1594777965326">
...@@ -606,10 +602,10 @@ ...@@ -606,10 +602,10 @@
</state> </state>
<state x="289" y="314" key="SettingsEditor/30.23.1890.1177@30.23.1890.1177" timestamp="1596079390860" /> <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="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="1601363306245"> <state x="91" y="351" key="Vcs.Push.Dialog.v2" timestamp="1601368173271">
<screen x="30" y="23" width="1890" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </state>
<state x="91" y="351" key="Vcs.Push.Dialog.v2/30.23.1890.1177@30.23.1890.1177" timestamp="1601363306245" /> <state x="91" y="351" key="Vcs.Push.Dialog.v2/30.23.1890.1177@30.23.1890.1177" timestamp="1601368173271" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1595584299423" /> <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"> <state x="87" y="216" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1594705166397">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
...@@ -653,12 +649,6 @@ ...@@ -653,12 +649,6 @@
<line>55</line> <line>55</line>
<option name="timeStamp" value="5" /> <option name="timeStamp" value="5" />
</line-breakpoint> </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> </breakpoints>
</breakpoint-manager> </breakpoint-manager>
</component> </component>
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
"name": "map" "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,ele1Exp.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,ele0Line.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" "name": "playScene"
}, },
{ {
......
...@@ -73,7 +73,7 @@ export const ResJson = { ...@@ -73,7 +73,7 @@ export const ResJson = {
"name": "map" "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,ele1Exp.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,ele0Line.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" "name": "playScene"
}, },
{ {
......
...@@ -362,14 +362,14 @@ export class PlayScene extends Scene { ...@@ -362,14 +362,14 @@ export class PlayScene extends Scene {
async initSvgas() { async initSvgas() {
//这里加载资源吧 //这里加载资源吧
await RES.loadGroup("bonusTime") await RES.loadGroup("bonusTime")
var bonusTime = new Lottie(bonus_lottie) const bonusTime = new Lottie(bonus_lottie);
bonusTime.position.set( bonusTime.position.set(
(750 - bonusTime.videoWidth) / 2, (750 - bonusTime.videoWidth) / 2,
(1624 - bonusTime.videoHeight) / 2 - layers.stageOffsetY (1624 - bonusTime.videoHeight) / 2 - layers.stageOffsetY
) )
movieClips.bonusTime = bonusTime; movieClips.bonusTime = bonusTime;
["great", "wonderful", "amazing"].forEach((e) => { ["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); g.position.set(375, 1624 / 2 - layers.stageOffsetY);
movieClips[e] = g movieClips[e] = g
}) })
...@@ -379,11 +379,11 @@ export class PlayScene extends Scene { ...@@ -379,11 +379,11 @@ export class PlayScene extends Scene {
initScene() { initScene() {
//第几关 //第几关
var chapterTex = Tools.getNumTextures("chapterNum"); const chapterTex = Tools.getNumTextures("chapterNum");
["第", "关"].forEach((e) => { ["第", "关"].forEach((e) => {
chapterTex[e] = RES.getRes("chapterNum" + e + ".png") 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.text = "第" + (this.chapter >> 0) + "关";
chapterTxt.position.set(535, 58); chapterTxt.position.set(535, 58);
//步数 //步数
...@@ -397,15 +397,15 @@ export class PlayScene extends Scene { ...@@ -397,15 +397,15 @@ export class PlayScene extends Scene {
//分数置0 //分数置0
this.score = 0; this.score = 0;
//地图生成 //地图生成
var path = generateMapBg(this.chapterData.map.lattices); const path = generateMapBg(this.chapterData.map.lattices);
var bg = drawBg(path, this.chapterData.map.lattices) const bg = drawBg(path, this.chapterData.map.lattices);
this.addChild(bg); this.addChild(bg);
this.map = bg; this.map = bg;
//容器 //容器
this.elementContainer = new FYGE.Container(); this.elementContainer = new FYGE.Container();
this.addChild(this.elementContainer); this.addChild(this.elementContainer);
//加遮罩,大遮罩一直都加,小遮罩时时判断 //加遮罩,大遮罩一直都加,小遮罩时时判断
var mask = drawShape(path); const mask = drawShape(path);
this.elementContainer.mask = mask; this.elementContainer.mask = mask;
mask.updateShape();//执行一边吧,不然又bug,不更新_localBoundSelf mask.updateShape();//执行一边吧,不然又bug,不更新_localBoundSelf
this.addChild(mask) this.addChild(mask)
...@@ -441,8 +441,8 @@ export class PlayScene extends Scene { ...@@ -441,8 +441,8 @@ export class PlayScene extends Scene {
if (this.chapterData.passTarget.type == PassType.ELEMENT_TARGET) { if (this.chapterData.passTarget.type == PassType.ELEMENT_TARGET) {
this.hasEliminatedElements = []; this.hasEliminatedElements = [];
this.passElements = []; this.passElements = [];
for (var m = 0; m < this.chapterData.passTarget.elements.length; m++) { for (let m = 0; m < this.chapterData.passTarget.elements.length; m++) {
var element: ElementTargetData = this.chapterData.passTarget.elements[m]; const element: ElementTargetData = this.chapterData.passTarget.elements[m];
this.passElements[element.type] = element.count; this.passElements[element.type] = element.count;
this.hasEliminatedElements[element.type] = 0; this.hasEliminatedElements[element.type] = 0;
} }
...@@ -497,8 +497,8 @@ export class PlayScene extends Scene { ...@@ -497,8 +497,8 @@ export class PlayScene extends Scene {
//画回收口 //画回收口
const texture: FYGE.Texture = RES.getRes('main_mapbottom.png'); const texture: FYGE.Texture = RES.getRes('main_mapbottom.png');
const imgs = new FYGE.Container; const imgs = new FYGE.Container;
for (var m = 0; m < this.recycleIndexs.length; m++) { for (let m = 0; m < this.recycleIndexs.length; m++) {
var p = Tool.getPositionByIndex(this.recycleIndexs[m]); const p = Tool.getPositionByIndex(this.recycleIndexs[m]);
const img = new FYGE.Sprite(texture); const img = new FYGE.Sprite(texture);
img.x = p[0]; img.x = p[0];
img.y = p[1]; img.y = p[1];
...@@ -513,10 +513,10 @@ export class PlayScene extends Scene { ...@@ -513,10 +513,10 @@ export class PlayScene extends Scene {
//初始化地图格子数据,包括生成口,联通口 //初始化地图格子数据,包括生成口,联通口
initLattices() { initLattices() {
var latticesD = this.chapterData.map.lattices; const latticesD = this.chapterData.map.lattices;
//先格子 //先格子
this.lattices = []; this.lattices = [];
for (var i = 0; i < latticesD.length; i++) { for (let i = 0; i < latticesD.length; i++) {
if (!latticesD[i]) continue; if (!latticesD[i]) continue;
this.lattices[i] = Pool.takeOut(RecoverName.LATTICE); this.lattices[i] = Pool.takeOut(RecoverName.LATTICE);
if (!this.lattices[i]) { if (!this.lattices[i]) {
...@@ -525,12 +525,12 @@ export class PlayScene extends Scene { ...@@ -525,12 +525,12 @@ export class PlayScene extends Scene {
this.lattices[i].reset(i); 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) { if (dooreData.indexOf(latticesD[i]) >= 0) {
let door: Door = Pool.takeOut(RecoverName.DOOR); 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) { if (!door) {
door = new Door(closed); door = new Door(closed);
} else { } else {
...@@ -542,13 +542,13 @@ export class PlayScene extends Scene { ...@@ -542,13 +542,13 @@ export class PlayScene extends Scene {
door.y = p[1]; door.y = p[1];
} }
//冰块数据 2 3 5 6 或者51 61 //冰块数据 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) { if (iceData.indexOf(latticesD[i]) >= 0) {
var iceCount = (function(n) { const iceCount = (function(n) {
if (n == 2 || n == 3) return n - 1; if (n == 2 || n == 3) return n - 1;
if (n == 5 || n == 6) return n - 4; if (n == 5 || n == 6) return n - 4;
return parseInt((n + "").split("")[0]) - 4; return parseInt((n + "").split("")[0]) - 4;
})(latticesD[i]) })(latticesD[i]);
let ice = Pool.takeOut(RecoverName.ICE); let ice = Pool.takeOut(RecoverName.ICE);
if (!ice) { if (!ice) {
ice = new Ice(iceCount); ice = new Ice(iceCount);
...@@ -577,15 +577,15 @@ export class PlayScene extends Scene { ...@@ -577,15 +577,15 @@ export class PlayScene extends Scene {
let hasBigToSmall: boolean; let hasBigToSmall: boolean;
//联通口 //联通口
const connectedLats = this.chapterData.map.connectedLats || []; const connectedLats = this.chapterData.map.connectedLats || [];
for (var i = 0; i < connectedLats.length; i++) { for (let i = 0; i < connectedLats.length; i++) {
//0是上格子,1是下格子 //0是上格子,1是下格子
const connectedLat = connectedLats[i]; const connectedLat = connectedLats[i];
if (!connectedLat || !connectedLat.length) continue; if (!connectedLat || !connectedLat.length) continue;
this.lattices[connectedLat[0]].down = connectedLat[1]; this.lattices[connectedLat[0]].down = connectedLat[1];
this.lattices[connectedLat[1]].up = connectedLat[0]; this.lattices[connectedLat[1]].up = connectedLat[0];
var colUp = Tool.indexToRc(connectedLat[0])[1]; const colUp = Tool.indexToRc(connectedLat[0])[1];
var colDown = Tool.indexToRc(connectedLat[1])[1]; const colDown = Tool.indexToRc(connectedLat[1])[1];
downMax = Math.max(downMax, colDown); downMax = Math.max(downMax, colDown);
upMax = Math.max(upMax, colUp); upMax = Math.max(upMax, colUp);
if (colUp > colDown) hasBigToSmall = true; if (colUp > colDown) hasBigToSmall = true;
...@@ -938,7 +938,7 @@ export class PlayScene extends Scene { ...@@ -938,7 +938,7 @@ export class PlayScene extends Scene {
} }
let fun: Function; let fun: Function;
this.elementContainer.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, fun = function(e) { 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 && if (ele instanceof Element &&
// ele.type != ElementType.ROCK && // ele.type != ElementType.ROCK &&
ele.type != ElementType.LOLLIPOP) { ele.type != ElementType.LOLLIPOP) {
...@@ -1202,10 +1202,10 @@ export class PlayScene extends Scene { ...@@ -1202,10 +1202,10 @@ export class PlayScene extends Scene {
private fallVertical() { private fallVertical() {
var anis: FallAniData[] = [] 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--) { for (let n = Tool.rowNum - 1; n >= 0; n--) {
var index = Tool.rcToIndex(n, m); const index = Tool.rcToIndex(n, m);
let lat = this.lattices[index]; let lat = this.lattices[index];
if (Tool.judgeFall(lat)) { if (Tool.judgeFall(lat)) {
//如果能掉落,,找down,下面,左下,右下是否有空格 //如果能掉落,,找down,下面,左下,右下是否有空格
...@@ -1220,7 +1220,7 @@ export class PlayScene extends Scene { ...@@ -1220,7 +1220,7 @@ export class PlayScene extends Scene {
connects.push({index: indexDown, type: FallType.STRIGHT}) connects.push({index: indexDown, type: FallType.STRIGHT})
} }
//下方有格子,并且再this.empty中 //下方有格子,并且再this.empty中
var emptyIndex = this.emptys.indexOf(indexDown) const emptyIndex = this.emptys.indexOf(indexDown);
if (emptyIndex > -1) { if (emptyIndex > -1) {
anis.push({ele: lat.element, indexs: connects}); anis.push({ele: lat.element, indexs: connects});
//去掉一个 //去掉一个
...@@ -1257,18 +1257,18 @@ export class PlayScene extends Scene { ...@@ -1257,18 +1257,18 @@ export class PlayScene extends Scene {
//2表示存在大列连通到小烈,从左往右遍历 //2表示存在大列连通到小烈,从左往右遍历
//3表示都有,遍历两边,down比up大,从右先 //3表示都有,遍历两边,down比up大,从右先
//4表示都有,遍历两边,down比up小,从左先 //4表示都有,遍历两边,down比up小,从左先
var anis: FallAniData[] = [] const anis: FallAniData[] = [];
let operation = (m) => { 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 index = Tool.rcToIndex(n, m);
let lat = this.lattices[index]; let lat = this.lattices[index];
if (Tool.judgeFall(lat)) { 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) { if (indexs != null) {
//最后一个 //最后一个
var downIndex = indexs[indexs.length - 1].index; const downIndex = indexs[indexs.length - 1].index;
anis.push({ele: lat.element, indexs: indexs}); anis.push({ele: lat.element, indexs: indexs});
//去掉最后一个 //去掉最后一个
// this.emptys.splice(emptyIndex, 1); // this.emptys.splice(emptyIndex, 1);
...@@ -1283,7 +1283,7 @@ export class PlayScene extends Scene { ...@@ -1283,7 +1283,7 @@ export class PlayScene extends Scene {
} }
//找m列的生成口,可能有多个 //找m列的生成口,可能有多个
if (this.generateIndexs[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 index = this.generateIndexs[m][aaa].index;
let lat = this.lattices[index]; let lat = this.lattices[index];
//如果有格子。无元素,是生成口,要补齐下面能掉落的 //如果有格子。无元素,是生成口,要补齐下面能掉落的
...@@ -1320,15 +1320,15 @@ export class PlayScene extends Scene { ...@@ -1320,15 +1320,15 @@ export class PlayScene extends Scene {
} }
} }
if (this.connectState == 1) { 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) { } 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) { } else if (this.connectState == 3) {
for (var m = Tool.colNum; m >= 0; m--) operation(m); for (let m = Tool.colNum; m >= 0; m--) operation(m);
for (var m = 0; m < Tool.colNum; m++) operation(m); for (let m = 0; m < Tool.colNum; m++) operation(m);
} else if (this.connectState == 4) { } else if (this.connectState == 4) {
for (var m = 0; m < Tool.colNum; m++) operation(m); for (let m = 0; m < Tool.colNum; m++) operation(m);
for (var m = Tool.colNum; m >= 0; m--) operation(m); for (let m = Tool.colNum; m >= 0; m--) operation(m);
} }
return anis; return anis;
} }
...@@ -1338,22 +1338,22 @@ export class PlayScene extends Scene { ...@@ -1338,22 +1338,22 @@ export class PlayScene extends Scene {
*/ */
private fallSkewEx() { private fallSkewEx() {
//记录一个对象和位置信息[obj,index]的数组,如果obj是null则生成,index位置上方 //记录一个对象和位置信息[obj,index]的数组,如果obj是null则生成,index位置上方
var anis: FallAniData[] = []; const anis: FallAniData[] = [];
var emptys = this.emptys; const emptys = this.emptys;
//排序从大到小 //排序从大到小
emptys.sort(function(a, b) { emptys.sort(function(a, b) {
return a < b ? 1 : -1 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]; let indexMy = emptys[i];
var lat = this.lattices[indexMy]; const lat = this.lattices[indexMy];
let latFall; let latFall;
let indexFall; let indexFall;
let type: FallType = FallType.STRIGHT let type: FallType = FallType.STRIGHT
//找联通的up,一期没有复杂的联通,所以动画不用特殊处理 //找联通的up,一期没有复杂的联通,所以动画不用特殊处理
if (lat.up) { if (lat.up) {
var latUnUp = this.lattices[lat.up]; const latUnUp = this.lattices[lat.up];
if (Tool.judgeFall(latUnUp)) { if (Tool.judgeFall(latUnUp)) {
latFall = latUnUp; latFall = latUnUp;
indexFall = lat.up; indexFall = lat.up;
...@@ -1362,7 +1362,7 @@ export class PlayScene extends Scene { ...@@ -1362,7 +1362,7 @@ export class PlayScene extends Scene {
} }
//找正上方 //找正上方
if (!latFall && Tool.indexToRc(indexMy)[0] != 0) { 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)) { if (Tool.judgeFall(latUp)) {
latFall = latUp; latFall = latUp;
indexFall = indexMy - Tool.colNum; indexFall = indexMy - Tool.colNum;
...@@ -1371,7 +1371,7 @@ export class PlayScene extends Scene { ...@@ -1371,7 +1371,7 @@ export class PlayScene extends Scene {
//找左上 //找左上
let findLeft = () => { let findLeft = () => {
if (!latFall && Tool.indexToRc(indexMy)[1] != 0) { 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)) { if (Tool.judgeFall(latLeftUp)) {
latFall = latLeftUp; latFall = latLeftUp;
indexFall = indexMy - Tool.colNum - 1; indexFall = indexMy - Tool.colNum - 1;
...@@ -1381,7 +1381,7 @@ export class PlayScene extends Scene { ...@@ -1381,7 +1381,7 @@ export class PlayScene extends Scene {
//找右上 //找右上
let findRight = () => { let findRight = () => {
if (!latFall && Tool.indexToRc(indexMy)[1] != Tool.colNum - 1) { 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)) { if (Tool.judgeFall(latRightUp)) {
latFall = latRightUp; latFall = latRightUp;
indexFall = indexMy - Tool.colNum + 1; indexFall = indexMy - Tool.colNum + 1;
...@@ -1423,7 +1423,6 @@ export class PlayScene extends Scene { ...@@ -1423,7 +1423,6 @@ export class PlayScene extends Scene {
emptys.splice(i, 1); emptys.splice(i, 1);
//优先判断生成的,不用管掉落了,跳下一个 //优先判断生成的,不用管掉落了,跳下一个
i-- i--
continue
} }
} }
} }
...@@ -1680,15 +1679,15 @@ export class PlayScene extends Scene { ...@@ -1680,15 +1679,15 @@ export class PlayScene extends Scene {
//横排检测 //横排检测
for (let i = 0; i < Tool.rowNum; i++) { for (let i = 0; i < Tool.rowNum; i++) {
//集合横排元素 //集合横排元素
var arr = [] const arr = []
for (var g = 0; g < Tool.colNum; g++) { for (let g = 0; g < Tool.colNum; g++) {
arr.push(i * Tool.colNum + g) arr.push(i * Tool.colNum + g)
} }
let re = Tool.fn(arr, this.lattices); 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; let len = re[j].length;
if (len >= 3) { 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; let ele = this.lattices[re[j][k]].element;
this.eliminatedElements.push(re[j][k]); this.eliminatedElements.push(re[j][k]);
//是五个的 //是五个的
...@@ -1715,15 +1714,15 @@ export class PlayScene extends Scene { ...@@ -1715,15 +1714,15 @@ export class PlayScene extends Scene {
//竖排检测 //竖排检测
for (let m = 0; m < Tool.colNum; m++) { for (let m = 0; m < Tool.colNum; m++) {
//集合竖排元素 //集合竖排元素
var arr = [] const arr = []
for (var g = 0; g < Tool.rowNum; g++) { for (let g = 0; g < Tool.rowNum; g++) {
arr.push(Tool.colNum * g + m) arr.push(Tool.colNum * g + m)
} }
let re = Tool.fn(arr, this.lattices); 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; let len = re[j].length;
if (len >= 3) { 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; let ele = this.lattices[re[j][k]].element;
//是五个的,特殊处理 //是五个的,特殊处理
if (len >= 5) { if (len >= 5) {
...@@ -1771,8 +1770,8 @@ export class PlayScene extends Scene { ...@@ -1771,8 +1770,8 @@ export class PlayScene extends Scene {
} }
//算普通消除分数 //算普通消除分数
if (this.eliminatedElements.length && !this.hasPassed) this.commonContinuityTimes++; if (this.eliminatedElements.length && !this.hasPassed) this.commonContinuityTimes++;
for (var aa = 0; aa < this.eliminatedElements.length; aa++) { for (let aa = 0; aa < this.eliminatedElements.length; aa++) {
var index = this.eliminatedElements[aa]; const index = this.eliminatedElements[aa];
//没有锁,也没有毛球 //没有锁,也没有毛球
if (Tool.judgeHasScore(this.lattices[index].element)) { if (Tool.judgeHasScore(this.lattices[index].element)) {
this.pushScoreAni(baseScore * this.commonContinuityTimes, Tool.getPositionByIndex(index)) this.pushScoreAni(baseScore * this.commonContinuityTimes, Tool.getPositionByIndex(index))
...@@ -1795,11 +1794,11 @@ export class PlayScene extends Scene { ...@@ -1795,11 +1794,11 @@ export class PlayScene extends Scene {
//先消除有旋转的消除完就置空 //先消除有旋转的消除完就置空
this.rotateEliminate() this.rotateEliminate()
//消除同时找出带特效的 //消除同时找出带特效的
var effectIndexs = this.commonEliminate(); const effectIndexs = this.commonEliminate();
var scoreAll = 0; let scoreAll = 0;
//得分动效执行,在上面消除动效后出现,分数动效层级要高 //得分动效执行,在上面消除动效后出现,分数动效层级要高
for (var i = 0; i < this.scoreAnis.length; i++) { for (let i = 0; i < this.scoreAnis.length; i++) {
var scoreAni = this.scoreAnis[i]; const scoreAni = this.scoreAnis[i];
scoreAll += scoreAni.score; scoreAll += scoreAni.score;
// this.addChild(scoreAni) // this.addChild(scoreAni)
// scoreAni.play(); // scoreAni.play();
...@@ -1977,8 +1976,8 @@ export class PlayScene extends Scene { ...@@ -1977,8 +1976,8 @@ export class PlayScene extends Scene {
* 特效元素的组合效果 * 特效元素的组合效果
*/ */
effectCombination() { effectCombination() {
var one = this.eliminatedElements[0]; const one = this.eliminatedElements[0];
var two = this.eliminatedElements[1]; const two = this.eliminatedElements[1];
let lat1 = this.lattices[one]; let lat1 = this.lattices[one];
let lat2 = this.lattices[two]; let lat2 = this.lattices[two];
let ele1: Element = this.lattices[one].element; let ele1: Element = this.lattices[one].element;
...@@ -1997,8 +1996,8 @@ export class PlayScene extends Scene { ...@@ -1997,8 +1996,8 @@ export class PlayScene extends Scene {
this.recoverEle(two); this.recoverEle(two);
//先不管特效组合时的自身的分数 //先不管特效组合时的自身的分数
//把所有元素加入 //把所有元素加入
for (var i = 0; i < this.lattices.length; i++) { for (let i = 0; i < this.lattices.length; i++) {
var lat = this.lattices[i]; const lat = this.lattices[i];
if (Tool.judgeEliminate(lat)) { if (Tool.judgeEliminate(lat)) {
//本来没必要判断特效组合时是否有重复的消除元素,但是recoverEle里会有判断石头或果冻的加入,造成重复 //本来没必要判断特效组合时是否有重复的消除元素,但是recoverEle里会有判断石头或果冻的加入,造成重复
if (this.eliminatedElements.indexOf(i) == -1) this.eliminatedElements.push(i); if (this.eliminatedElements.indexOf(i) == -1) this.eliminatedElements.push(i);
...@@ -2013,7 +2012,7 @@ export class PlayScene extends Scene { ...@@ -2013,7 +2012,7 @@ export class PlayScene extends Scene {
else if ((ele1.effectType == EffectType.MAGICLION || ele2.effectType == EffectType.MAGICLION)) { else if ((ele1.effectType == EffectType.MAGICLION || ele2.effectType == EffectType.MAGICLION)) {
//playSound(SoundType.magic) //playSound(SoundType.magic)
let magic: Element, other: Element; let magic: Element, other: Element;
var magicIndex: number; let magicIndex: number;
if (ele1.effectType == EffectType.MAGICLION) { if (ele1.effectType == EffectType.MAGICLION) {
magic = ele1; magic = ele1;
other = ele2; other = ele2;
...@@ -2027,15 +2026,15 @@ export class PlayScene extends Scene { ...@@ -2027,15 +2026,15 @@ export class PlayScene extends Scene {
this.playAni(RecoverName.MAGICLION_ANI, Tool.getPositionByIndex(magicIndex)); this.playAni(RecoverName.MAGICLION_ANI, Tool.getPositionByIndex(magicIndex));
//移除 //移除
this.recoverEle(magicIndex); this.recoverEle(magicIndex);
var rotateData: MagicRotateData = { const rotateData: MagicRotateData = {
p: Tool.getPositionByIndex(magicIndex), p: Tool.getPositionByIndex(magicIndex),
elementsIndex: [], elementsIndex: [],
type: other.type, type: other.type,
} };
//手动触发只有一个 //手动触发只有一个
this.magicRotateData = [rotateData]; this.magicRotateData = [rotateData];
for (var i = 0; i < this.lattices.length; i++) { for (let i = 0; i < this.lattices.length; i++) {
var lat = this.lattices[i]; const lat = this.lattices[i];
if (Tool.judgeMagicEliminate(lat) && if (Tool.judgeMagicEliminate(lat) &&
lat.element.type == other.type //类型相等 lat.element.type == other.type //类型相等
) { ) {
...@@ -2065,15 +2064,15 @@ export class PlayScene extends Scene { ...@@ -2065,15 +2064,15 @@ export class PlayScene extends Scene {
else if (ele1.effectType < 2 && ele2.effectType < 2) { else if (ele1.effectType < 2 && ele2.effectType < 2) {
//playSound(SoundType.line) //playSound(SoundType.line)
//以第二个元素为中心 //以第二个元素为中心
var p = Tool.getPositionByIndex(one); const p = Tool.getPositionByIndex(one);
//播放特效 //播放特效
this.playAni(RecoverName.CROSS_ANI, p); this.playAni(RecoverName.CROSS_ANI, p);
//回收 //回收
this.recoverEle(one) this.recoverEle(one)
this.recoverEle(two) this.recoverEle(two)
//添加消除元素two,同行或同列 //添加消除元素two,同行或同列
for (var i = 0; i < this.lattices.length; i++) { for (let i = 0; i < this.lattices.length; i++) {
var lat = this.lattices[i]; const lat = this.lattices[i];
if (Tool.judgeEliminate(lat) && (lat.row == lat1.row || lat.column == lat1.column)) { if (Tool.judgeEliminate(lat) && (lat.row == lat1.row || lat.column == lat1.column)) {
if (this.eliminatedElements.indexOf(i) == -1) this.eliminatedElements.push(i); if (this.eliminatedElements.indexOf(i) == -1) this.eliminatedElements.push(i);
if (Tool.judgeHasScore(lat.element)) { if (Tool.judgeHasScore(lat.element)) {
...@@ -2088,15 +2087,15 @@ export class PlayScene extends Scene { ...@@ -2088,15 +2087,15 @@ export class PlayScene extends Scene {
(ele1.effectType == EffectType.EXPLOSIVE || ele2.effectType == EffectType.EXPLOSIVE)) { (ele1.effectType == EffectType.EXPLOSIVE || ele2.effectType == EffectType.EXPLOSIVE)) {
//playSound(SoundType.line) //playSound(SoundType.line)
//以第二个元素为中心 //以第二个元素为中心
var p = Tool.getPositionByIndex(one); const p = Tool.getPositionByIndex(one);
//播放特效 //播放特效
this.playAni(RecoverName.THREECROSS_ANI, p); this.playAni(RecoverName.THREECROSS_ANI, p);
//回收 //回收
this.recoverEle(one) this.recoverEle(one)
this.recoverEle(two) this.recoverEle(two)
//添加消除元素two,同行或同列,需要优化 //添加消除元素two,同行或同列,需要优化
for (var i = 0; i < this.lattices.length; i++) { for (let i = 0; i < this.lattices.length; i++) {
var lat = this.lattices[i]; const lat = this.lattices[i];
if (Tool.judgeEliminate(lat) && if (Tool.judgeEliminate(lat) &&
(Math.abs(lat.row - lat1.row) < 2 || Math.abs(lat.column - lat1.column) < 2)) { (Math.abs(lat.row - lat1.row) < 2 || Math.abs(lat.column - lat1.column) < 2)) {
if (this.eliminatedElements.indexOf(i) == -1) this.eliminatedElements.push(i); if (this.eliminatedElements.indexOf(i) == -1) this.eliminatedElements.push(i);
...@@ -2111,17 +2110,17 @@ export class PlayScene extends Scene { ...@@ -2111,17 +2110,17 @@ export class PlayScene extends Scene {
else if (ele1.effectType == EffectType.EXPLOSIVE && ele2.effectType == EffectType.EXPLOSIVE) { else if (ele1.effectType == EffectType.EXPLOSIVE && ele2.effectType == EffectType.EXPLOSIVE) {
//playSound(SoundType.boom) //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; boomAni.scaleX = boomAni.scaleY = 2;
//回收 //回收
this.recoverEle(one) this.recoverEle(one)
this.recoverEle(two) this.recoverEle(two)
//添加消除元素two,5*5,需要优化 //添加消除元素two,5*5,需要优化
for (var i = 0; i < this.lattices.length; i++) { for (let i = 0; i < this.lattices.length; i++) {
var lat = this.lattices[i]; const lat = this.lattices[i];
if (Tool.judgeEliminate(lat) && if (Tool.judgeEliminate(lat) &&
(Math.abs(lat.row - lat1.row) < 3 && Math.abs(lat.column - lat1.column) < 3)) { (Math.abs(lat.row - lat1.row) < 3 && Math.abs(lat.column - lat1.column) < 3)) {
if (this.eliminatedElements.indexOf(i) == -1) this.eliminatedElements.push(i); if (this.eliminatedElements.indexOf(i) == -1) this.eliminatedElements.push(i);
...@@ -2138,10 +2137,10 @@ export class PlayScene extends Scene { ...@@ -2138,10 +2137,10 @@ export class PlayScene extends Scene {
* 螺旋线消除 * 螺旋线消除
*/ */
rotateEliminate() { rotateEliminate() {
for (var m = 0; m < this.magicRotateData.length; m++) { for (let m = 0; m < this.magicRotateData.length; m++) {
var indexs = this.magicRotateData[m].elementsIndex; const indexs = this.magicRotateData[m].elementsIndex;
var position = this.magicRotateData[m].p; const position = this.magicRotateData[m].p;
for (var n = 0; n < indexs.length; n++) { for (let n = 0; n < indexs.length; n++) {
let roIndex = indexs[n]; let roIndex = indexs[n];
let roEle = this.lattices[roIndex].element let roEle = this.lattices[roIndex].element
//如果即将产生特效的,跳下一个 //如果即将产生特效的,跳下一个
...@@ -2163,13 +2162,13 @@ export class PlayScene extends Scene { ...@@ -2163,13 +2162,13 @@ export class PlayScene extends Scene {
commonEliminate(): number[] { commonEliminate(): number[] {
//playSound(SoundType.eliminate) //playSound(SoundType.eliminate)
//记录带特效的 //记录带特效的
var effectIndexs: number[] = []; const effectIndexs: number[] = [];
for (var i = this.eliminatedElements.length - 1; i >= 0; i--) { for (let i = this.eliminatedElements.length - 1; i >= 0; i--) {
var index = this.eliminatedElements[i]; const index = this.eliminatedElements[i];
var lat = this.lattices[index]; const lat = this.lattices[index];
//不用判断是否存在元素了吧 //不用判断是否存在元素了吧
var ele = lat.element; const ele = lat.element;
var p = Tool.getPositionByIndex(index); const p = Tool.getPositionByIndex(index);
if (!ele) { if (!ele) {
//以防万一还是判断一次 //以防万一还是判断一次
} }
...@@ -2182,7 +2181,7 @@ export class PlayScene extends Scene { ...@@ -2182,7 +2181,7 @@ export class PlayScene extends Scene {
} }
//有褐色毛球的,记录分裂激活 //有褐色毛球的,记录分裂激活
else if (ele.hasState(StateType.HAIRBALLBROWN)) { else if (ele.hasState(StateType.HAIRBALLBROWN)) {
var hairballBrownState: HairballBrownState = ele.getState(StateType.HAIRBALLBROWN); const hairballBrownState: HairballBrownState = ele.getState(StateType.HAIRBALLBROWN);
hairballBrownState.isActive = true; hairballBrownState.isActive = true;
//算个数,不能在这里算,得在分裂时算,分裂时算也有问题,目标完成就后置了,会出bug,最好就是不设为目标。 //算个数,不能在这里算,得在分裂时算,分裂时算也有问题,目标完成就后置了,会出bug,最好就是不设为目标。
// this.goElementTarget(ElementType.HAIRBALLBROWN, [ele.x, ele.y]); // this.goElementTarget(ElementType.HAIRBALLBROWN, [ele.x, ele.y]);
...@@ -2198,7 +2197,7 @@ export class PlayScene extends Scene { ...@@ -2198,7 +2197,7 @@ export class PlayScene extends Scene {
} }
//有黑色毛球的,一次眩晕,两次消失 //有黑色毛球的,一次眩晕,两次消失
else if (ele.hasState(StateType.HAIRBALLGREY)) { else if (ele.hasState(StateType.HAIRBALLGREY)) {
var blackballBrownState: HairballBlackState = ele.getState(StateType.HAIRBALLBLACK); const blackballBrownState: HairballBlackState = ele.getState(StateType.HAIRBALLBLACK);
//醒着的就晕 //醒着的就晕
if (blackballBrownState.isAwake) { if (blackballBrownState.isAwake) {
blackballBrownState.isAwake = false; blackballBrownState.isAwake = false;
...@@ -2287,23 +2286,23 @@ export class PlayScene extends Scene { ...@@ -2287,23 +2286,23 @@ export class PlayScene extends Scene {
return this.eliminatedElements.indexOf(i) < 0 && effectIndexs.indexOf(i) < 0 return this.eliminatedElements.indexOf(i) < 0 && effectIndexs.indexOf(i) < 0
} }
// var sounds: SoundType[] = []; // var sounds: SoundType[] = [];
for (var j = 0; j < effectIndexs.length; j++) { for (let j = 0; j < effectIndexs.length; j++) {
var index = effectIndexs[j]; const index = effectIndexs[j];
var lat: Lattice = this.lattices[index]; const lat: Lattice = this.lattices[index];
let ele = lat.element; let ele = lat.element;
var p = Tool.getPositionByIndex(index); const p = Tool.getPositionByIndex(index);
switch (ele.effectType) { switch (ele.effectType) {
case EffectType.MAGICLION: case EffectType.MAGICLION:
// if (sounds.indexOf(SoundType.magic) == -1) sounds.push(SoundType.magic) // if (sounds.indexOf(SoundType.magic) == -1) sounds.push(SoundType.magic)
this.playAni(RecoverName.MAGICLION_ANI, p); this.playAni(RecoverName.MAGICLION_ANI, p);
this.recoverEle(index); this.recoverEle(index);
//为了不重复 //为了不重复
var types = this.chapterData.baseElementTypes.slice(); const types = this.chapterData.baseElementTypes.slice();
for (var iii = 0; iii < this.magicRotateData.length; iii++) { for (let iii = 0; iii < this.magicRotateData.length; iii++) {
Tool.removeEle(this.magicRotateData[iii].type, types) 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 = { let rotateData: MagicRotateData = {
p: Tool.getPositionByIndex(index), p: Tool.getPositionByIndex(index),
...@@ -2312,7 +2311,7 @@ export class PlayScene extends Scene { ...@@ -2312,7 +2311,7 @@ export class PlayScene extends Scene {
} }
this.magicRotateData.push(rotateData); 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]) && if (Tool.judgeMagicEliminate(this.lattices[i]) &&
this.lattices[i].element.type == type && //类型相等 this.lattices[i].element.type == type && //类型相等
judgeExclude(i) judgeExclude(i)
...@@ -2332,7 +2331,7 @@ export class PlayScene extends Scene { ...@@ -2332,7 +2331,7 @@ export class PlayScene extends Scene {
case EffectType.EXPLOSIVE: case EffectType.EXPLOSIVE:
// if (sounds.indexOf(SoundType.boom) == -1) sounds.push(SoundType.boom) // 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; boomAni.scaleX = boomAni.scaleY = 1;
this.recoverEle(index); this.recoverEle(index);
//3*3,需要优化 //3*3,需要优化
...@@ -2360,12 +2359,12 @@ export class PlayScene extends Scene { ...@@ -2360,12 +2359,12 @@ export class PlayScene extends Scene {
break; break;
case EffectType.HORIZONTAL: case EffectType.HORIZONTAL:
// if (sounds.indexOf(SoundType.line) == -1) sounds.push(SoundType.line) // 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.playAni(RecoverName.HORIZONTAL_ANI, p);
this.recoverEle(index); this.recoverEle(index);
for (var i = 0; i < Tool.colNum; i++) { for (let i = 0; i < Tool.colNum; i++) {
var ein = Tool.rcToIndex(row, i); let ein = Tool.rcToIndex(row, i);
if (Tool.judgeEliminate(this.lattices[ein]) && if (Tool.judgeEliminate(this.lattices[ein]) &&
judgeExclude(ein) judgeExclude(ein)
) { ) {
...@@ -2383,8 +2382,8 @@ export class PlayScene extends Scene { ...@@ -2383,8 +2382,8 @@ export class PlayScene extends Scene {
//动画移除自己 //动画移除自己
this.playAni(RecoverName.VERTICAL_ANI, p); this.playAni(RecoverName.VERTICAL_ANI, p);
this.recoverEle(index); this.recoverEle(index);
for (var i = 0; i < Tool.rowNum; i++) { for (let i = 0; i < Tool.rowNum; i++) {
var ein = Tool.rcToIndex(i, col); let ein = Tool.rcToIndex(i, col);
if (Tool.judgeEliminate(this.lattices[ein]) && if (Tool.judgeEliminate(this.lattices[ein]) &&
judgeExclude(ein) judgeExclude(ein)
) { ) {
...@@ -2418,11 +2417,7 @@ export class PlayScene extends Scene { ...@@ -2418,11 +2417,7 @@ export class PlayScene extends Scene {
return true return true
} else { } else {
//判断分数 //判断分数
if (this.score > this.chapterData.passTarget.score) { return this.score > this.chapterData.passTarget.score;
return true
} else {
return false
}
} }
} }
...@@ -2431,9 +2426,9 @@ export class PlayScene extends Scene { ...@@ -2431,9 +2426,9 @@ export class PlayScene extends Scene {
*/ */
terminateSteps() { terminateSteps() {
//遍历有特效的索引,和,基础元素 //遍历有特效的索引,和,基础元素
var effectElements = [], elements = []; const effectElements = [], elements = [];
for (var i = Tool.colNum * Tool.rowNum - 1; i >= 0; i--) { for (let i = Tool.colNum * Tool.rowNum - 1; i >= 0; i--) {
var lat = this.lattices[i]; const lat = this.lattices[i];
if (Tool.judgeBaseEle(lat)) { if (Tool.judgeBaseEle(lat)) {
if (lat.element.effectType != null) { if (lat.element.effectType != null) {
effectElements.push(i); effectElements.push(i);
...@@ -2461,7 +2456,7 @@ export class PlayScene extends Scene { ...@@ -2461,7 +2456,7 @@ export class PlayScene extends Scene {
let deltaCount = 0; let deltaCount = 0;
//将步数变成横竖特效 //将步数变成横竖特效
while (deltaCount < countAll) { 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]; let ele: Element = elements.splice(rand, 1)[0];
if (!ele) break; if (!ele) break;
deltaCount++; deltaCount++;
...@@ -2479,7 +2474,7 @@ export class PlayScene extends Scene { ...@@ -2479,7 +2474,7 @@ export class PlayScene extends Scene {
//去掉所有状态 //去掉所有状态
ele.removeAllState(); ele.removeAllState();
this.eliminatedElements.push(ele.index); 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) { if (++count == countAll) {
this.eliminate(); this.eliminate();
//如果还有步数就置0 //如果还有步数就置0
...@@ -2540,16 +2535,16 @@ export class PlayScene extends Scene { ...@@ -2540,16 +2535,16 @@ export class PlayScene extends Scene {
*/ */
upsetElement() { upsetElement() {
//所有允许交换的格子 //所有允许交换的格子
var lats: Lattice[] = [] const lats: Lattice[] = [];
//记录元素和目标位置的索引,然后执行所有动画 //记录元素和目标位置的索引,然后执行所有动画
var anis = [];//两个,0下标是元素,1下标是索引 const anis = [];//两个,0下标是元素,1下标是索引
for (var i = 0; i < this.lattices.length; i++) { for (let i = 0; i < this.lattices.length; i++) {
var lat = this.lattices[i]; let lat = this.lattices[i];
if (Tool.judgeUpsetMove(lat)) lats.push(lat); if (Tool.judgeUpsetMove(lat)) lats.push(lat);
} }
//不改变的 //不改变的
var latsCopy = lats.slice(); const latsCopy = lats.slice();
for (var i = 0; i < lats.length; i++) { for (let i = 0; i < lats.length; i++) {
let ele = lats[i].element; let ele = lats[i].element;
const rand = Math.floor(Math.random() * latsCopy.length); const rand = Math.floor(Math.random() * latsCopy.length);
let lat = latsCopy.splice(rand, 1)[0]; let lat = latsCopy.splice(rand, 1)[0];
...@@ -2558,12 +2553,12 @@ export class PlayScene extends Scene { ...@@ -2558,12 +2553,12 @@ export class PlayScene extends Scene {
let count = 0; let count = 0;
let countAll = anis.length; 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 ele: Element = anis[i][0];
let index: number = anis[i][1]; let index: number = anis[i][1];
const p = Tool.getPositionByIndex(index); const p = Tool.getPositionByIndex(index);
//现在得位置的赋值 //现在得位置的赋值
var lat = this.lattices[index]; const lat = this.lattices[index];
lat.element = ele; lat.element = ele;
FYGE.Tween.get(ele) FYGE.Tween.get(ele)
.to({x: p[0], y: p[1]}, 500) .to({x: p[0], y: p[1]}, 500)
...@@ -2611,7 +2606,7 @@ export class PlayScene extends Scene { ...@@ -2611,7 +2606,7 @@ export class PlayScene extends Scene {
* 获得提交数据的jsob * 获得提交数据的jsob
*/ */
getSubmitJson(): string { getSubmitJson(): string {
var json = {}; const json = {};
//分数 //分数
// json[1] = this.score; // json[1] = this.score;
// if (this.passElements) { // if (this.passElements) {
...@@ -2863,7 +2858,7 @@ export class PlayScene extends Scene { ...@@ -2863,7 +2858,7 @@ export class PlayScene extends Scene {
this.addChild(eleC); this.addChild(eleC);
/// TODO 小红包消失动画 /// TODO 小红包消失动画
Tween.get(eleC) Tween.get(eleC)
.to({scaleX: 0, scaleY:0}, 270, Ease.backIn) .to({scaleX: 0, scaleY: 0}, 270, Ease.backIn)
.call(() => { .call(() => {
this.removeChild(eleC); this.removeChild(eleC);
this.festivalTarget.count--; this.festivalTarget.count--;
......
...@@ -132,7 +132,7 @@ export class Element extends FYGE.Container { ...@@ -132,7 +132,7 @@ export class Element extends FYGE.Container {
private states: State[] = [] private states: State[] = []
/** /**
* *
* @param type 只应该是基础元素和特殊元素 * @param type 只应该是基础元素和特殊元素
*/ */
constructor(type: ElementType) { constructor(type: ElementType) {
...@@ -183,14 +183,14 @@ export class Element extends FYGE.Container { ...@@ -183,14 +183,14 @@ export class Element extends FYGE.Container {
texArr = [RES.getRes("magicLion.png")]; texArr = [RES.getRes("magicLion.png")];
} else { } else {
//直线特效的 hor ver //直线特效的 hor ver
texArr = []; texArr = [RES.getRes("ele" + this._type + "Line.png")];
var hv = this._effectType == EffectType.HORIZONTAL ? "hor" : "ver"; // var hv = this._effectType == EffectType.HORIZONTAL ? "hor" : "ver";
for (var i = 0; i <= 15; i++) { // for (var i = 0; i <= 15; i++) {
texArr.push(RES.getRes(hv + "_ele" + this._type + "_" + i + ".png")); // texArr.push(RES.getRes(hv + "_ele" + this._type + "_" + i + ".png"));
} // }
for (var i = 14; i >= 1; i--) { // for (var i = 14; i >= 1; i--) {
texArr.push(RES.getRes(hv + "_ele" + this._type + "_" + i + ".png")); // texArr.push(RES.getRes(hv + "_ele" + this._type + "_" + i + ".png"));
} // }
} }
} }
//处理showImage //处理showImage
...@@ -270,7 +270,7 @@ export class Element extends FYGE.Container { ...@@ -270,7 +270,7 @@ export class Element extends FYGE.Container {
/** /**
* 只修改类型,不改变其他状态,主要针对修改基础元素类型 * 只修改类型,不改变其他状态,主要针对修改基础元素类型
* @param type * @param type
*/ */
resetType(type: ElementType) { resetType(type: ElementType) {
//如果类型一致,return //如果类型一致,return
...@@ -336,7 +336,7 @@ export class Element extends FYGE.Container { ...@@ -336,7 +336,7 @@ export class Element extends FYGE.Container {
/** /**
* 是否有该状态 * 是否有该状态
* @param state * @param state
*/ */
hasState(state: StateType): boolean { hasState(state: StateType): boolean {
return !!this.states[state]; return !!this.states[state];
...@@ -416,7 +416,7 @@ export class Element extends FYGE.Container { ...@@ -416,7 +416,7 @@ export class Element extends FYGE.Container {
} }
/** /**
* 取得一个状态 * 取得一个状态
* @param state * @param state
*/ */
getState(state: StateType): any { getState(state: StateType): any {
return this.states[state] return this.states[state]
...@@ -499,4 +499,4 @@ FYGE.FrameAni.prototype.resetTexturesAll = function (texturesAll: FYGE.Texture[] ...@@ -499,4 +499,4 @@ FYGE.FrameAni.prototype.resetTexturesAll = function (texturesAll: FYGE.Texture[]
// this.changeTexture(0); // this.changeTexture(0);
this.currentFrame = 0; this.currentFrame = 0;
this.frameRate = 30; this.frameRate = 30;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment