Commit 7a568545 authored by haiyoucuv's avatar haiyoucuv

Success Panel Effect!

parent 8ddef435
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<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="effect">
<change afterPath="$PROJECT_DIR$/resource/SuccessPanel/star_left_dis.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/SuccessPanel/star_left_en.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/SuccessPanel/star_mid_dis.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/SuccessPanel/star_mid_en.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/SuccessPanel/star_right_dis.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/SuccessPanel/star_right_en.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$/mock/miniTb/babycare.getIndex.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/miniTb/babycare.getIndex.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resource/SuccessNoPrizePanel/闯关成功Bg.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/闯关成功Bg.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessNoPrizePanel/闯关成功不满星按钮.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/闯关成功不满星按钮.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPrizePanel/圆角矩形 648.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/圆角矩形 648.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPrizePanel/按钮-继续闯关.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/按钮-继续闯关.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPrizePanel/红包奖励.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/红包奖励.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPrizePanel/道具.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/SuccessPanel/道具.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/SuccessPrizePanel/闯关成功.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$/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/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/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" />
...@@ -35,7 +52,7 @@ ...@@ -35,7 +52,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/map" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/resource/SuccessPrizePanel" />
<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)" />
...@@ -47,17 +64,18 @@ ...@@ -47,17 +64,18 @@
<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="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/mapWhaleEffect" />
<recent name="$PROJECT_DIR$/resource/common" />
<recent name="$PROJECT_DIR$/src/scene/map" />
</key>
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<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" /> <recent name="$PROJECT_DIR$/resource/map_owl_effecrt" />
<recent name="$PROJECT_DIR$/resource/map_crab_effect" /> <recent name="$PROJECT_DIR$/resource/map_crab_effect" />
<recent name="$PROJECT_DIR$/mock" /> </key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/SuccessPrizePanel" />
<recent name="$PROJECT_DIR$/resource/mapWhaleEffect" />
<recent name="$PROJECT_DIR$/resource/common" />
<recent name="$PROJECT_DIR$/src/scene/map" />
</key> </key>
</component> </component>
<component name="RunManager" selected="npm.dev"> <component name="RunManager" selected="npm.dev">
...@@ -84,8 +102,8 @@ ...@@ -84,8 +102,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" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
...@@ -105,7 +123,7 @@ ...@@ -105,7 +123,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="509000" /> <workItem from="1594777357248" duration="3998000" />
</task> </task>
<task id="LOCAL-00001" summary="111"> <task id="LOCAL-00001" summary="111">
<created>1594122339119</created> <created>1594122339119</created>
...@@ -244,26 +262,30 @@ ...@@ -244,26 +262,30 @@
<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="1594726952439"> <state x="754" y="183" key="CommitChangelistDialog2" timestamp="1594777926546">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="754" y="183" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1594777926546" />
<state width="882" height="329" key="GridCell.Tab.0.bottom" timestamp="1594780478549">
<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="1594726952439" /> <state width="882" height="329" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1594780478549" />
<state width="882" height="329" key="GridCell.Tab.0.bottom" timestamp="1594777502620"> <state width="882" height="329" key="GridCell.Tab.0.center" timestamp="1594780478546">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state width="882" height="329" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1594777502620" /> <state width="882" height="329" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1594780478546" />
<state width="882" height="329" key="GridCell.Tab.0.center" timestamp="1594777502617"> <state width="882" height="329" key="GridCell.Tab.0.left" timestamp="1594780478545">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state width="882" height="329" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1594777502617" /> <state width="882" height="329" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1594780478545" />
<state width="882" height="329" key="GridCell.Tab.0.left" timestamp="1594777502616"> <state width="882" height="329" key="GridCell.Tab.0.right" timestamp="1594780478547">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state width="882" height="329" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1594777502616" /> <state width="882" height="329" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1594780478547" />
<state width="882" height="329" key="GridCell.Tab.0.right" timestamp="1594777502619"> <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>
<state width="882" height="329" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1594777502619" /> <state x="82" y="353" key="IDE.errors.dialog/31.23.1889.1177@31.23.1889.1177" timestamp="1594777965326" />
<state x="210" y="320" key="RollbackChangesDialog" timestamp="1594173186663"> <state x="210" y="320" key="RollbackChangesDialog" timestamp="1594173186663">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
...@@ -300,9 +322,9 @@ ...@@ -300,9 +322,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="1594707473466"> <state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1594781273475">
<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="1594707473466" /> <state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594781273475" />
</component> </component>
</project> </project>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -60,7 +60,7 @@ export const SkinJson = { ...@@ -60,7 +60,7 @@ export const SkinJson = {
"type": "text", "type": "text",
"props": { "props": {
"text": "第 24 关", "text": "第 24 关",
"size": 24.78875, "size": 40,
"fillColor": "#df5942", "fillColor": "#df5942",
"textAlpha": 1 "textAlpha": 1
}, },
...@@ -80,16 +80,6 @@ export const SkinJson = { ...@@ -80,16 +80,6 @@ export const SkinJson = {
}, },
"id": "tipsTex" "id": "tipsTex"
}, },
{
"name": "star",
"x": 145,
"y": 601,
"alpha": 1,
"type": "sprite",
"props": {
"source": "star.png"
}
},
{ {
"name": "关闭按钮", "name": "关闭按钮",
"x": 631, "x": 631,
...@@ -159,7 +149,7 @@ export const SkinJson = { ...@@ -159,7 +149,7 @@ export const SkinJson = {
"type": "text", "type": "text",
"props": { "props": {
"text": "第 24 关", "text": "第 24 关",
"size": 24.78875, "size": 40,
"fillColor": "#df5942", "fillColor": "#df5942",
"textAlpha": 1 "textAlpha": 1
}, },
......
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import Container = FYGE.Container;
import { Tools } from "../Tools";
import Sprite = FYGE.Sprite;
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
export class SuccessNoPrizePanel extends Panel { export class SuccessNoPrizePanel extends Panel {
get groupNames() { return ["SuccessNoPrizePanel"] } get groupNames() {
get skinName() { return "SuccessNoPrizePanel" } return ["SuccessPanel"]
closeBtn:FYGE.Button; }
tipsTex:FYGE.TextField;
checkTex:FYGE.TextField; get skinName() {
againBtn:FYGE.Button; return "SuccessNoPrizePanel"
continueBtn:FYGE.Button; }
totalContinueBtn:FYGE.Button;
closeBtn: FYGE.Button;
tipsTex: FYGE.TextField;
checkTex: FYGE.TextField;
againBtn: FYGE.Button;
continueBtn: FYGE.Button;
totalContinueBtn: FYGE.Button;
private starGroup: SuccessStarGroup = null;
initUi() { initUi() {
this.checkTex.textWidth = 750;
this.checkTex.x = 0;
this.checkTex.textAlign = TEXT_ALIGN.CENTER;
this.tipsTex.textAlign = TEXT_ALIGN.CENTER;
this.starGroup = this.addChild(new SuccessStarGroup());
this.starGroup.position.set(373, 680);
this.starGroup.play(3);
} }
start(data) { start(data) {
super.start(); super.start();
} }
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
} }
removeEvents() { removeEvents() {
super.removeEvents(); super.removeEvents();
} }
} }
export class SuccessStarGroup extends Container {
private leftStar: SuccessStar = null;
private midStar: SuccessStar = null;
private rightStar: SuccessStar = null;
constructor() {
super();
this.leftStar = this.addChild(new SuccessStar());
this.midStar = this.addChild(new SuccessStar());
this.rightStar = this.addChild(new SuccessStar());
this.leftStar.position.set(-158, 36);
this.leftStar.rotation = -25;
this.leftStar.scale.set(0.81, 0.81);
this.rightStar.position.set(157, 37);
this.rightStar.rotation = 25;
this.rightStar.scale.set(0.81, 0.81);
}
public play(count: number) {
this.leftStar.play();
if (count == 1) return;
this.midStar.play(400);
if (count == 2) return;
this.rightStar.play(800);
}
}
export class SuccessStar extends Container {
private starEn: Sprite = null;
private starDis: Sprite = null;
constructor() {
super();
this.starDis = this.addChild(Tools.getSprite('star_mid_dis.png'));
this.starDis.anchorTexture.set(0.5, 0.5);
this.starEn = this.addChild(Tools.getSprite('star_mid_en.png'));
this.starEn.anchorTexture.set(0.5, 0.5);
this.starEn.scale.set(0, 0);
this.starEn.y = 2;
}
public play(wait: number = 0, time: number = 400) {
Tween.get(this.starEn)
.wait(wait)
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1, scaleY: 1}, time, Ease.quadInOut);
}
}
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
export class SuccessPrizePanel extends Panel { export class SuccessPrizePanel extends Panel {
get groupNames() { return ["SuccessPrizePanel"] } get groupNames() {
get skinName() { return "SuccessPrizePanel" } return ["SuccessPanel"]
closeBtn:FYGE.Button; }
tipsTex:FYGE.TextField;
checkTex:FYGE.TextField;
againBtn:FYGE.Button;
noPrizeAgainBtn:FYGE.Button;
initUi() { get skinName() {
return "SuccessPrizePanel"
}
closeBtn: FYGE.Button;
tipsTex: FYGE.TextField;
checkTex: FYGE.TextField;
againBtn: FYGE.Button;
noPrizeAgainBtn: FYGE.Button;
initUi() {
this.checkTex.textWidth = 750;
this.checkTex.x = 0;
this.checkTex.textAlign = TEXT_ALIGN.CENTER;
} }
start(data) { start(data) {
super.start(); super.start();
} }
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
} }
removeEvents() { removeEvents() {
super.removeEvents(); super.removeEvents();
} }
......
...@@ -10,6 +10,8 @@ import ScrollPage = FYGE.ScrollPage; ...@@ -10,6 +10,8 @@ import ScrollPage = FYGE.ScrollPage;
import Container = FYGE.Container; import Container = FYGE.Container;
import { Tools } from "../../Tools"; import { Tools } from "../../Tools";
import Graphics = FYGE.Graphics; import Graphics = FYGE.Graphics;
import { showPanel } from "../../../module/ctrls";
import { SuccessNoPrizePanel } from "../../panels/SuccessNoPrizePanel";
export class MapScene extends Scene { export class MapScene extends Scene {
private mapContainer: Container = null; private mapContainer: Container = null;
...@@ -46,6 +48,8 @@ export class MapScene extends Scene { ...@@ -46,6 +48,8 @@ export class MapScene extends Scene {
this.uiLayer = this.addChild(new MapUI()); this.uiLayer = this.addChild(new MapUI());
this.initMap(); this.initMap();
this.updateMapCheck(); this.updateMapCheck();
showPanel(SuccessNoPrizePanel);
} }
private updateMapCheck() { private updateMapCheck() {
......
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