Commit 4fa4a42b authored by haiyoucuv's avatar haiyoucuv

1

parent 7cfb78dc
......@@ -2,14 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="9cef0552-af3c-4a1c-be1f-dc41ebe5b6db" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/resource/map/cur_light_1.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/cur_light_2.png" 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/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$/libs/FYGE.d.ts" beforeDir="false" afterPath="$PROJECT_DIR$/libs/FYGE.d.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/scene/map/CheckBtn.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/CheckBtn.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>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -84,8 +80,8 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" />
<item itemvalue="npm.flushRes" />
</list>
</recent_temporary>
</component>
......@@ -101,7 +97,8 @@
<updated>1594106513515</updated>
<workItem from="1594106517562" duration="5224000" />
<workItem from="1594111755267" duration="29551000" />
<workItem from="1594260676967" duration="30021000" />
<workItem from="1594260676967" duration="30060000" />
<workItem from="1594604662575" duration="5635000" />
</task>
<task id="LOCAL-00001" summary="111">
<created>1594122339119</created>
......@@ -131,7 +128,14 @@
<option name="project" value="LOCAL" />
<updated>1594287699523</updated>
</task>
<option name="localTasksCounter" value="5" />
<task id="LOCAL-00005" summary="111">
<created>1594303577256</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1594303577256</updated>
</task>
<option name="localTasksCounter" value="6" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -150,26 +154,26 @@
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="251" y="471" key="ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/31.23.1889.1177@31.23.1889.1177" timestamp="1594113080922" />
<state x="58" y="183" key="CommitChangelistDialog2" timestamp="1594287699267">
<state x="58" y="183" key="CommitChangelistDialog2" timestamp="1594303577069">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="58" y="183" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1594287699267" />
<state width="879" height="329" key="GridCell.Tab.0.bottom" timestamp="1594293636459">
<state x="58" y="183" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1594303577069" />
<state width="879" height="329" key="GridCell.Tab.0.bottom" timestamp="1594605745156">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="879" height="329" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1594293636459" />
<state width="879" height="329" key="GridCell.Tab.0.center" timestamp="1594293636458">
<state width="879" height="329" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1594605745156" />
<state width="879" height="329" key="GridCell.Tab.0.center" timestamp="1594605745155">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="879" height="329" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1594293636458" />
<state width="879" height="329" key="GridCell.Tab.0.left" timestamp="1594293636456">
<state width="879" height="329" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1594605745155" />
<state width="879" height="329" key="GridCell.Tab.0.left" timestamp="1594605745155">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="879" height="329" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1594293636456" />
<state width="879" height="329" key="GridCell.Tab.0.right" timestamp="1594293636458">
<state width="879" height="329" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1594605745155" />
<state width="879" height="329" key="GridCell.Tab.0.right" timestamp="1594605745156">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="879" height="329" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1594293636458" />
<state width="879" height="329" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1594605745156" />
<state x="210" y="320" key="RollbackChangesDialog" timestamp="1594173186663">
<screen x="31" y="23" width="1889" height="1177" />
</state>
......@@ -178,10 +182,10 @@
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="31" y="250" key="SettingsEditor/31.23.1889.1177@31.23.1889.1177" timestamp="1594195630991" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1594287700770">
<state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1594303578553">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1594287700770" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1594303578553" />
<state x="87" y="216" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1594111906161">
<screen x="31" y="23" width="1889" height="1177" />
</state>
......@@ -194,17 +198,17 @@
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="907" y="23" width="879" height="1158" key="dock-window-2/31.23.1889.1177@31.23.1889.1177" timestamp="1594285002126" />
<state x="805" y="23" width="879" height="1158" key="dock-window-3" timestamp="1594294028057">
<state x="805" y="23" width="879" height="1158" key="dock-window-3" timestamp="1594604843980">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="805" y="23" width="879" height="1158" key="dock-window-3/31.23.1889.1177@31.23.1889.1177" timestamp="1594294028057" />
<state x="805" y="23" width="879" height="1158" key="dock-window-3/31.23.1889.1177@31.23.1889.1177" timestamp="1594604843980" />
<state x="157" y="286" key="run.anything.popup" timestamp="1594188122355">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="157" y="286" key="run.anything.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594188122355" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1594286333221">
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1594609774151">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594286333221" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594609774151" />
</component>
</project>
\ No newline at end of file
......@@ -8020,4 +8020,4 @@ export var Stats: (canvasId: any) => {
}
export { Stats };}
declare module "fyge" {export = FYGE;}
// declare module "fyge" {export = FYGE;}
......@@ -440,13 +440,13 @@ export const SkinJson = {
},
{
"name": "关卡文字",
"x": 312,
"x": 317,
"y": 519,
"alpha": 1,
"type": "text",
"props": {
"text": "第 6 关",
"size": 24.78875,
"size": 40,
"fillColor": "#df5942",
"textAlpha": 1
},
......@@ -1023,4 +1023,4 @@ export const SkinJson = {
]
}
]
}
\ No newline at end of file
}
import { Panel } from "../../module/views/Panel";
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import { getChapterData } from "../something/chapters/getChapter";
import Container = FYGE.Container;
export class StartPanel extends Panel {
get groupNames() {
return ["StartPanel"]
}
get skinName() {
return "StartPanel"
}
closeBtn: FYGE.Button;
checkTex: FYGE.TextField;
tipsTex: FYGE.TextField;
startBtn2: FYGE.Button;
startBtn: FYGE.Button;
initUi() {
this.checkTex.textWidth = 750;
this.checkTex.textAlign = TEXT_ALIGN.CENTER;
this.checkTex.x = 0;
this.checkTex.text = `第 ${this.data.check} 关`;
this.addChild(new StartTarget(this.data.check));
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
export class StartTarget extends Container {
constructor(checkNum: number) {
super();
const passTarget = getChapterData(checkNum).passTarget;
if (passTarget.type == 0) { // 分数
} else if (passTarget.type == 1) { // 消除元素个数
}
}
}
......@@ -9,6 +9,10 @@ import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import MouseEvent = FYGE.MouseEvent;
import Point = FYGE.Point;
import FrameAni = FYGE.FrameAni;
import Tween = FYGE.Tween;
import { Panel } from "../../../module/views/Panel";
import { showPanel } from "../../../module/ctrls";
import { StartPanel } from "../../panels/StartPanel";
export enum CHECK_TYPE {
COM, // 普通
......@@ -26,6 +30,7 @@ export default class CheckBtn extends Container {
private curAnim: FrameAni = null;
private checkNum: number = null;
private checkCurEffect: CheckCurEffect = null;
private _data: any = null;
public set data(data) {
......@@ -57,7 +62,7 @@ export default class CheckBtn extends Container {
this.btn.enabled = enabled;
this.star.forEach(v => v.visible = enabled);
this.checkLabel.visible = enabled;
if(!enabled && this._isPrize){
if (!enabled && this._isPrize) {
!this.prizeAnim.parent && this.addChild(this.prizeAnim);
}
}
......@@ -86,8 +91,10 @@ export default class CheckBtn extends Container {
RES.getRes('map_check_enable.png'),
RES.getRes('map_check_enable.png'),
RES.getRes('map_check_disable.png'));
this.checkLabel.strokeColor = '#316ec6';
this.checkCurEffect.visible = false;
this.checkCurEffect.stop();
break;
case CHECK_TYPE.CUR:
......@@ -95,8 +102,10 @@ export default class CheckBtn extends Container {
RES.getRes('map_check_enable_cur.png'),
RES.getRes('map_check_enable_cur.png'),
RES.getRes('map_check_disable.png'));
this.checkLabel.strokeColor = '#a55507';
this.checkCurEffect.visible = true;
this.checkCurEffect.play();
break;
}
}
......@@ -152,11 +161,15 @@ export default class CheckBtn extends Container {
this.checkLabel.stroke = 2;
this.checkLabel.strokeColor = '#316ec6';
this.checkCurEffect = this.addChild(new CheckCurEffect());
this.checkCurEffect.visible = false;
this.enabled = false; // 先设置成关闭
// 点击事件
this.btn.addEventListener(MouseEvent.CLICK, () => {
console.log(`关卡:${this.checkNum}`);
showPanel(StartPanel, {check: this.checkNum});
}, this);
}
......@@ -182,3 +195,67 @@ class CheckStar extends Sprite {
}
}
class CheckCurEffect extends Container {
private light1: Sprite = null;
private light2: Sprite = null;
constructor() {
super();
this.light1 = this.addChild(Tools.getSprite('cur_light_1.png'));
this.light2 = this.addChild(Tools.getSprite('cur_light_2.png'));
this.light1.anchorTexture.set(0.5, 0.5);
this.light2.anchorTexture.set(0.5, 0.5);
this.position.set(53, 50);
this.mouseEnable = this.mouseChildren = false;
}
public play() {
// 时间 0 0.4 0.7 1 1.3 2
// point_light_1
// 缩放 0% 150% 150%
// 透明度 100% 0 0
// point_light_2
// 缩放 80% 130% 130%
// 透明度 0% 100% 0% 0%
Tween.get(this.light1, {loop: true})
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1.5, scaleY: 1.5}, 1300)
.wait(700);
Tween.get(this.light1, {loop: true})
.set({alpha: 0})
.to({alpha: 1}, 700)
.to({alpha: 0}, 600)
.wait(700)
Tween.get(this.light2, {loop: true})
.set({scaleX: 0.8, scaleY: 0.8})
.to({scaleX: 1.3, scaleY: 1.3}, 1000)
.wait(700);
Tween.get(this.light2, {loop: true})
.set({alpha: 0})
.to({alpha: 1}, 400)
.to({alpha: 0}, 600)
.wait(1000);
return this;
}
public stop() {
Tween.removeTweens(this.light1);
Tween.removeTweens(this.light2);
return this;
}
}
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