Commit dd9d6742 authored by haiyoucuv's avatar haiyoucuv

Success Panel Effect!

parent f2b1003a
...@@ -2,36 +2,17 @@ ...@@ -2,36 +2,17 @@
<project version="4"> <project version="4">
<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 afterPath="$PROJECT_DIR$/resource/common/comm_light.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_0.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_1.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_10.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_11.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_12.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_13.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_14.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_15.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_2.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_3.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_4.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_5.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_6.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_7.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_8.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/starLight/star_light_9.png" afterDir="false" />
<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$/resource/SuccessPanel/star_left_dis.png" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/mock/miniTb/babycare.getIndex.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/miniTb/babycare.getIndex.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPanel/star_left_en.png" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/resource/SuccessPanel/闯关成功.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/闯关成功.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPanel/star_mid_dis.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/star_dis.png" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resource/SuccessPanel/闯关成功Bg.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/闯关成功Bg.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPanel/star_mid_en.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/star_en.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPanel/star_right_dis.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPanel/star_right_en.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPanel/按钮-继续闯关.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/去抽奖.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/resource/res.json" 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/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SkinJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/SkinJson.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/SkinJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/SkinJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/SuccessNoPrizePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/SuccessNoPrizePanel.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/panels/SuccessNoPrizePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/SuccessNoPrizePanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/SuccessPrizePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/SuccessPrizePanel.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/panels/SuccessPrizePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/SuccessPrizePanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/map/CheckBtn.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/CheckBtn.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/map/MapPart.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapPart.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/scene/map/MapScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapScene.ts" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -63,7 +44,7 @@ ...@@ -63,7 +44,7 @@
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/resource/starLight" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/resource/SuccessPanel" />
<property name="node.js.detected.package.tslint" value="true" /> <property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.path.for.package.tslint" value="project" /> <property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.tslint" value="(autodetect)" /> <property name="node.js.selected.package.tslint" value="(autodetect)" />
...@@ -71,16 +52,16 @@ ...@@ -71,16 +52,16 @@
<property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="nodejs_package_manager_path" value="npm" /> <property name="nodejs_package_manager_path" value="npm" />
<property name="run.code.analysis.last.selected.profile" value="pProject Default" /> <property name="run.code.analysis.last.selected.profile" value="pProject Default" />
<property name="settings.editor.selected.configurable" value="editor.preferences.fonts.default" /> <property name="settings.editor.selected.configurable" value="yiiguxing.plugin.translate" />
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" /> <property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/SuccessPanel" />
<recent name="$PROJECT_DIR$/resource/starLight" /> <recent name="$PROJECT_DIR$/resource/starLight" />
<recent name="$PROJECT_DIR$/resource/SuccessPrizePanel" /> <recent name="$PROJECT_DIR$/resource/SuccessPrizePanel" />
<recent name="$PROJECT_DIR$/resource/map" /> <recent name="$PROJECT_DIR$/resource/map" />
<recent name="$PROJECT_DIR$/resource/mapCheckPrizeEffect" /> <recent name="$PROJECT_DIR$/resource/mapCheckPrizeEffect" />
<recent name="$PROJECT_DIR$/resource/map_owl_effecrt" />
</key> </key>
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/common" /> <recent name="$PROJECT_DIR$/resource/common" />
...@@ -134,7 +115,7 @@ ...@@ -134,7 +115,7 @@
<workItem from="1594604662575" duration="27200000" /> <workItem from="1594604662575" duration="27200000" />
<workItem from="1594691193000" duration="14409000" /> <workItem from="1594691193000" duration="14409000" />
<workItem from="1594712553750" duration="3451000" /> <workItem from="1594712553750" duration="3451000" />
<workItem from="1594777357248" duration="15025000" /> <workItem from="1594777357248" duration="19165000" />
</task> </task>
<task id="LOCAL-00001" summary="111"> <task id="LOCAL-00001" summary="111">
<created>1594122339119</created> <created>1594122339119</created>
...@@ -255,7 +236,14 @@ ...@@ -255,7 +236,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1594781505168</updated> <updated>1594781505168</updated>
</task> </task>
<option name="localTasksCounter" value="18" /> <task id="LOCAL-00018" summary="Success Panel Effect!">
<created>1594794860900</created>
<option name="number" value="00018" />
<option name="presentableId" value="LOCAL-00018" />
<option name="project" value="LOCAL" />
<updated>1594794860900</updated>
</task>
<option name="localTasksCounter" value="19" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
...@@ -281,26 +269,26 @@ ...@@ -281,26 +269,26 @@
<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="754" y="183" key="CommitChangelistDialog2" timestamp="1594781504873"> <state x="754" y="183" key="CommitChangelistDialog2" timestamp="1594794860662">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="754" y="183" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1594781504873" /> <state x="754" y="183" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1594794860662" />
<state width="882" height="327" key="GridCell.Tab.0.bottom" timestamp="1594793979488"> <state width="882" height="321" key="GridCell.Tab.0.bottom" timestamp="1594798205706">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state width="882" height="327" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1594793979488" /> <state width="882" height="321" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1594798205706" />
<state width="882" height="327" key="GridCell.Tab.0.center" timestamp="1594793979487"> <state width="882" height="321" key="GridCell.Tab.0.center" timestamp="1594798205706">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state width="882" height="327" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1594793979487" /> <state width="882" height="321" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1594798205706" />
<state width="882" height="327" key="GridCell.Tab.0.left" timestamp="1594793979487"> <state width="882" height="321" key="GridCell.Tab.0.left" timestamp="1594798205705">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state width="882" height="327" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1594793979487" /> <state width="882" height="321" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1594798205705" />
<state width="882" height="327" key="GridCell.Tab.0.right" timestamp="1594793979488"> <state width="882" height="321" key="GridCell.Tab.0.right" timestamp="1594798205706">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state width="882" height="327" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1594793979488" /> <state width="882" height="321" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1594798205706" />
<state x="82" y="353" key="IDE.errors.dialog" timestamp="1594777965326"> <state x="82" y="353" key="IDE.errors.dialog" timestamp="1594777965326">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
...@@ -309,14 +297,14 @@ ...@@ -309,14 +297,14 @@
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="210" y="320" key="RollbackChangesDialog/31.23.1889.1177@31.23.1889.1177" timestamp="1594173186663" /> <state x="210" y="320" key="RollbackChangesDialog/31.23.1889.1177@31.23.1889.1177" timestamp="1594173186663" />
<state x="31" y="250" key="SettingsEditor" timestamp="1594195630991"> <state x="300" y="248" key="SettingsEditor" timestamp="1594798992724">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="31" y="250" key="SettingsEditor/31.23.1889.1177@31.23.1889.1177" timestamp="1594195630991" /> <state x="300" y="248" key="SettingsEditor/31.23.1889.1177@31.23.1889.1177" timestamp="1594798992724" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1594726954085"> <state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1594794862317">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1594726954085" /> <state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1594794862317" />
<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" />
</state> </state>
...@@ -341,9 +329,9 @@ ...@@ -341,9 +329,9 @@
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="157" y="286" key="run.anything.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594712635697" /> <state x="157" y="286" key="run.anything.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594712635697" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1594791368676"> <state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1594798315097">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594791368676" /> <state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594798315097" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"message": "OK", "message": "OK",
"data": { "data": {
"power": 100, "power": 100,
"currentLevel": 120, "currentLevel": 96,
"tools": { "tools": {
"STEPS": 1, "STEPS": 1,
"BOOMS": 2, "BOOMS": 2,
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
"name": "fiveVerHorDis" "name": "fiveVerHorDis"
}, },
{ {
"keys": "bg_loading_back.jpg", "keys": "img_line1.png,img_line2.png,img_line3.png,img_line4.png,img_line5.png,loadingBg.jpg,loadingBg2.png,loadingPro0.png,loadingPro1.png,loadingPro10.png,loadingPro11.png,loadingPro2.png,loadingPro3.png,loadingPro4.png,loadingPro5.png,loadingPro6.png,loadingPro7.png,loadingPro8.png,loadingPro9.png,loadingTitle.png,proDown.png,wheel.png",
"name": "loadingScene" "name": "loadingScene"
}, },
{ {
......
...@@ -73,7 +73,7 @@ export const ResJson = { ...@@ -73,7 +73,7 @@ export const ResJson = {
"name": "fiveVerHorDis" "name": "fiveVerHorDis"
}, },
{ {
"keys": "bg_loading_back.jpg", "keys": "img_line1.png,img_line2.png,img_line3.png,img_line4.png,img_line5.png,loadingBg.jpg,loadingBg2.png,loadingPro0.png,loadingPro1.png,loadingPro10.png,loadingPro11.png,loadingPro2.png,loadingPro3.png,loadingPro4.png,loadingPro5.png,loadingPro6.png,loadingPro7.png,loadingPro8.png,loadingPro9.png,loadingTitle.png,proDown.png,wheel.png",
"name": "loadingScene" "name": "loadingScene"
}, },
{ {
......
...@@ -9,6 +9,28 @@ export const SkinJson = { ...@@ -9,6 +9,28 @@ export const SkinJson = {
"y": 0, "y": 0,
"type": "container", "type": "container",
"children": [ "children": [
{
"name": "light1",
"x": 155,
"y": 280,
"alpha": 0.8,
"type": "sprite",
"props": {
"source": "comm_light.png"
},
"id": "light1"
},
{
"name": "light2",
"x": 155,
"y": 280,
"alpha": 0.8,
"type": "sprite",
"props": {
"source": "comm_light.png"
},
"id": "light2"
},
{ {
"name": "闯关成功Bg", "name": "闯关成功Bg",
"x": 55, "x": 55,
...@@ -55,7 +77,7 @@ export const SkinJson = { ...@@ -55,7 +77,7 @@ export const SkinJson = {
{ {
"name": "关卡文字", "name": "关卡文字",
"x": 300, "x": 300,
"y": 521, "y": 501,
"alpha": 1, "alpha": 1,
"type": "text", "type": "text",
"props": { "props": {
...@@ -100,6 +122,28 @@ export const SkinJson = { ...@@ -100,6 +122,28 @@ export const SkinJson = {
"y": 0, "y": 0,
"type": "container", "type": "container",
"children": [ "children": [
{
"name": "light1",
"x": 155,
"y": 280,
"alpha": 0.8,
"type": "sprite",
"props": {
"source": "comm_light.png"
},
"id": "light1"
},
{
"name": "light2",
"x": 155,
"y": 280,
"alpha": 0.8,
"type": "sprite",
"props": {
"source": "comm_light.png"
},
"id": "light2"
},
{ {
"name": "闯关成功", "name": "闯关成功",
"x": 55, "x": 55,
...@@ -146,7 +190,7 @@ export const SkinJson = { ...@@ -146,7 +190,7 @@ export const SkinJson = {
{ {
"name": "关卡文字", "name": "关卡文字",
"x": 300, "x": 300,
"y": 521, "y": 501,
"alpha": 1, "alpha": 1,
"type": "text", "type": "text",
"props": { "props": {
......
...@@ -11,7 +11,7 @@ import { RES } from "../../module/RES"; ...@@ -11,7 +11,7 @@ import { RES } from "../../module/RES";
export class SuccessNoPrizePanel extends Panel { export class SuccessNoPrizePanel extends Panel {
get groupNames() { get groupNames() {
return ["SuccessPanel", 'starLight'] return ['SuccessPanel', 'starLight']
} }
get skinName() { get skinName() {
...@@ -36,6 +36,8 @@ export class SuccessNoPrizePanel extends Panel { ...@@ -36,6 +36,8 @@ export class SuccessNoPrizePanel extends Panel {
againBtn: FYGE.Button; againBtn: FYGE.Button;
continueBtn: FYGE.Button; continueBtn: FYGE.Button;
totalContinueBtn: FYGE.Button; totalContinueBtn: FYGE.Button;
light1: Sprite;
light2: Sprite;
private starGroup: SuccessStarGroup = null; private starGroup: SuccessStarGroup = null;
...@@ -49,9 +51,20 @@ export class SuccessNoPrizePanel extends Panel { ...@@ -49,9 +51,20 @@ export class SuccessNoPrizePanel extends Panel {
this.starGroup = this.addChild(new SuccessStarGroup()); this.starGroup = this.addChild(new SuccessStarGroup());
this.starGroup.position.set(373, 680); this.starGroup.position.set(373, 680);
this.lightEffect();
this.starGroup.play(3); this.starGroup.play(3);
} }
private lightEffect() {
Tween.get(this.light1, {loop: true})
.set({anchorX: 219.5, anchorY: 219.5})
.to({rotation: 360}, 12000);
Tween.get(this.light2, {loop: true})
.set({anchorX: 219.5, anchorY: 219.5})
.to({rotation: -360}, 12000);
}
start(data) { start(data) {
super.start(); super.start();
} }
......
...@@ -3,10 +3,11 @@ import TEXT_ALIGN = FYGE.TEXT_ALIGN; ...@@ -3,10 +3,11 @@ import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import { SuccessStarGroup } from "./SuccessNoPrizePanel"; import { SuccessStarGroup } from "./SuccessNoPrizePanel";
import Tween = FYGE.Tween; import Tween = FYGE.Tween;
import Ease = FYGE.Ease; import Ease = FYGE.Ease;
import Sprite = FYGE.Sprite;
export class SuccessPrizePanel extends Panel { export class SuccessPrizePanel extends Panel {
get groupNames() { get groupNames() {
return ["SuccessPanel", 'starLight'] return ['SuccessPanel', 'starLight']
} }
get skinName() { get skinName() {
...@@ -31,6 +32,8 @@ export class SuccessPrizePanel extends Panel { ...@@ -31,6 +32,8 @@ export class SuccessPrizePanel extends Panel {
againBtn: FYGE.Button; againBtn: FYGE.Button;
noPrizeAgainBtn: FYGE.Button; noPrizeAgainBtn: FYGE.Button;
goPrizeBtn: FYGE.Button; goPrizeBtn: FYGE.Button;
light1: Sprite;
light2: Sprite;
private starGroup: SuccessStarGroup = null; private starGroup: SuccessStarGroup = null;
...@@ -44,9 +47,20 @@ export class SuccessPrizePanel extends Panel { ...@@ -44,9 +47,20 @@ export class SuccessPrizePanel extends Panel {
this.starGroup = this.addChild(new SuccessStarGroup()); this.starGroup = this.addChild(new SuccessStarGroup());
this.starGroup.position.set(373, 678); this.starGroup.position.set(373, 678);
this.lightEffect();
this.starGroup.play(4); this.starGroup.play(4);
} }
private lightEffect() {
Tween.get(this.light1, {loop: true})
.set({anchorX: 219.5, anchorY: 219.5})
.to({rotation: 360}, 12000);
Tween.get(this.light2, {loop: true})
.set({anchorX: 219.5, anchorY: 219.5})
.to({rotation: -360}, 12000);
}
start(data) { start(data) {
super.start(); super.start();
} }
......
...@@ -241,7 +241,7 @@ class CheckCurEffect extends Container { ...@@ -241,7 +241,7 @@ class CheckCurEffect extends Container {
this.light1.anchorTexture.set(0.5, 0.5); this.light1.anchorTexture.set(0.5, 0.5);
this.light2.anchorTexture.set(0.5, 0.5); this.light2.anchorTexture.set(0.5, 0.5);
this.position.set(53, 50); this.position.set(55, 50);
this.mouseEnable = this.mouseChildren = false; this.mouseEnable = this.mouseChildren = false;
} }
......
...@@ -20,11 +20,19 @@ export default class MapPart extends Container { ...@@ -20,11 +20,19 @@ export default class MapPart extends Container {
} }
protected initIcon() { protected initIcon() {
this.data.forEach((value, index) => { // 坑爹的头像,所以倒着加,可以解决层级问题
for (let i = this.data.length - 1; i >= 0; i--) {
const value = this.data[i];
const nBtn = this.addChild(new CheckBtn(value)); const nBtn = this.addChild(new CheckBtn(value));
nBtn.position.set(this.btnPos[index][0], this.btnPos[index][1]); nBtn.position.set(this.btnPos[i][0], this.btnPos[i][1]);
MapScene.checkArr[value.check] = nBtn; MapScene.checkArr[value.check] = nBtn;
}); }
// this.data.forEach((value, index) => {
// const nBtn = this.addChild(new CheckBtn(value));
//
// nBtn.position.set(this.btnPos[index][0], this.btnPos[index][1]);
// MapScene.checkArr[value.check] = nBtn;
// });
} }
} }
...@@ -5,7 +5,6 @@ import MapUI from "./MapUI"; ...@@ -5,7 +5,6 @@ import MapUI from "./MapUI";
import MapMid from "./MapMid"; import MapMid from "./MapMid";
import CheckBtn, { CHECK_TYPE } from "./CheckBtn"; import CheckBtn, { CHECK_TYPE } from "./CheckBtn";
import { layers } from "../../../module/views/layers"; import { layers } from "../../../module/views/layers";
import { sendTbNet, TbNetName } from "../../TaoBaoNet";
import ScrollPage = FYGE.ScrollPage; import ScrollPage = FYGE.ScrollPage;
import Container = FYGE.Container; import Container = FYGE.Container;
import { Tools } from "../../Tools"; import { Tools } from "../../Tools";
...@@ -50,18 +49,25 @@ export class MapScene extends Scene { ...@@ -50,18 +49,25 @@ export class MapScene extends Scene {
this.initMap(); this.initMap();
this.updateMapCheck(); this.updateMapCheck();
showPanel(SuccessPrizePanel); showPanel(SuccessNoPrizePanel)
} }
private updateMapCheck() { private updateMapCheck() {
sendTbNet(TbNetName.getIndex, {}, if (this.data.from == 'loading') {
(success, res) => { this.initMapByData(Tools.gameData);
} else {
if (!success) return; Tools.getIndex().then((success) => {
if (success) {
this.initMapByData(Tools.gameData);
}
});
}
}
this.uiLayer.energyBox.count = res.data.power; private initMapByData(data) {
this.uiLayer.energyBox.count = data.power;
const currentLevel = res.data.currentLevel; const currentLevel = data.currentLevel;
// 已经通关的 // 已经通关的
for (let i = 1; i < currentLevel; i++) { for (let i = 1; i < currentLevel; i++) {
...@@ -85,19 +91,16 @@ export class MapScene extends Scene { ...@@ -85,19 +91,16 @@ export class MapScene extends Scene {
} }
// 闯关记录里有的 // 闯关记录里有的
res.data.visitors.forEach((v) => { data.visitors.forEach((v) => {
MapScene.checkArr[v.level].data = v; MapScene.checkArr[v.level].data = v;
}); });
// 奖励关卡 // 奖励关卡
res.data.prizes.forEach((v) => { data.prizes.forEach((v) => {
MapScene.checkArr[v.level].isPrize = true; MapScene.checkArr[v.level].isPrize = true;
}); });
this.scrollToCheck(currentLevel); this.scrollToCheck(currentLevel);
}
);
} }
public initMap() { public initMap() {
......
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