Commit f2b1003a authored by wjf's avatar wjf

1

parents 2a1fd592 abab27cf
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -55,14 +55,15 @@ export const SkinJson = {
{
"name": "关卡文字",
"x": 300,
"y": 519,
"y": 521,
"alpha": 1,
"type": "text",
"props": {
"text": "第 24 关",
"size": 24.78875,
"size": 40,
"fillColor": "#df5942",
"textAlpha": 1
"textAlpha": 1,
"bold": true
},
"id": "checkTex"
},
......@@ -80,16 +81,6 @@ export const SkinJson = {
},
"id": "tipsTex"
},
{
"name": "star",
"x": 145,
"y": 601,
"alpha": 1,
"type": "sprite",
"props": {
"source": "star.png"
}
},
{
"name": "关闭按钮",
"x": 631,
......@@ -142,26 +133,28 @@ export const SkinJson = {
"id": "againBtn"
},
{
"name": "按钮-继续闯关",
"name": "去抽奖",
"x": 383,
"y": 1095,
"alpha": 1,
"type": "sprite",
"type": "button",
"props": {
"source": "按钮-继续闯关.png"
}
"tUp": "去抽奖.png"
},
"id": "goPrizeBtn"
},
{
"name": "关卡文字",
"x": 300,
"y": 519,
"y": 521,
"alpha": 1,
"type": "text",
"props": {
"text": "第 24 关",
"size": 24.78875,
"size": 40,
"fillColor": "#df5942",
"textAlpha": 1
"textAlpha": 1,
"bold": true
},
"id": "checkTex"
},
......@@ -230,16 +223,6 @@ export const SkinJson = {
}
]
},
{
"name": "star",
"x": 145,
"y": 601,
"alpha": 1,
"type": "sprite",
"props": {
"source": "star.png"
}
},
{
"name": "关闭按钮",
"x": 631,
......@@ -337,14 +320,15 @@ export const SkinJson = {
{
"name": "关卡文字",
"x": 300,
"y": 519,
"y": 521,
"alpha": 1,
"type": "text",
"props": {
"text": "第 24 关",
"size": 24.78875,
"size": 40,
"fillColor": "#df5942",
"textAlpha": 1
"textAlpha": 1,
"bold": true
},
"id": "checkTex"
},
......@@ -441,14 +425,15 @@ export const SkinJson = {
{
"name": "关卡文字",
"x": 317,
"y": 519,
"y": 521,
"alpha": 1,
"type": "text",
"props": {
"text": "第 6 关",
"size": 40,
"fillColor": "#df5942",
"textAlpha": 1
"textAlpha": 1,
"bold": true
},
"id": "checkTex"
},
......@@ -484,14 +469,15 @@ export const SkinJson = {
{
"name": "关卡数",
"x": 312,
"y": 519,
"y": 521,
"alpha": 1,
"type": "text",
"props": {
"text": "第 6 关",
"size": 40,
"fillColor": "#df5942",
"textAlpha": 1
"textAlpha": 1,
"bold": true
},
"id": "checkTex"
},
......
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;
import FrameAni = FYGE.FrameAni;
import Texture = FYGE.Texture;
import { RES } from "../../module/RES";
export class SuccessNoPrizePanel extends Panel {
get groupNames() { return ["SuccessNoPrizePanel"] }
get skinName() { return "SuccessNoPrizePanel" }
closeBtn:FYGE.Button;
tipsTex:FYGE.TextField;
checkTex:FYGE.TextField;
againBtn:FYGE.Button;
continueBtn:FYGE.Button;
totalContinueBtn:FYGE.Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
get groupNames() {
return ["SuccessPanel", 'starLight']
}
get skinName() {
return "SuccessNoPrizePanel"
}
public showAni() {
if (this.isShowing) return;
this.isShowing = true;
this.anchor.set(375, 812);
Tween.get(this)
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1, scaleY: 1}, 400, Ease.backOut)
.call(() => {
this.isShowing = false;
});
}
closeBtn: FYGE.Button;
tipsTex: FYGE.TextField;
checkTex: FYGE.TextField;
againBtn: FYGE.Button;
continueBtn: FYGE.Button;
totalContinueBtn: FYGE.Button;
private starGroup: SuccessStarGroup = null;
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) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
export class SuccessStarGroup extends Container {
private leftStarDis: Sprite = null;
private midStarDis: Sprite = null;
private rightStarDis: Sprite = null;
private leftStarEn: Sprite = null;
private midStarEn: Sprite = null;
private rightStarEn: Sprite = null;
private leftStarAni: FrameAni = null;
private midStarAni: FrameAni = null;
private rightStarAni: FrameAni = null;
constructor() {
super();
this.leftStarDis = this.addChild(Tools.getSprite('star_dis.png'));
this.midStarDis = this.addChild(Tools.getSprite('star_dis.png'));
this.rightStarDis = this.addChild(Tools.getSprite('star_dis.png'));
this.leftStarEn = this.addChild(Tools.getSprite('star_en.png'));
this.midStarEn = this.addChild(Tools.getSprite('star_en.png'));
this.rightStarEn = this.addChild(Tools.getSprite('star_en.png'));
this.leftStarDis.anchorTexture.set(0.5, 0.5);
this.midStarDis.anchorTexture.set(0.5, 0.5);
this.rightStarDis.anchorTexture.set(0.5, 0.5);
this.leftStarEn.anchorTexture.set(0.5, 0.5);
this.midStarEn.anchorTexture.set(0.5, 0.5);
this.rightStarEn.anchorTexture.set(0.5, 0.5);
this.leftStarDis.position.set(-158, 36);
this.leftStarDis.rotation = -25;
this.leftStarDis.scale.set(0.81, 0.81);
this.leftStarEn.position.set(-157, 41);
this.leftStarEn.rotation = -25;
this.leftStarEn.scale.set(0.81, 0.81);
this.midStarEn.y = 5;
this.rightStarDis.position.set(157, 37);
this.rightStarDis.rotation = 25;
this.rightStarDis.scale.set(0.81, 0.81);
this.rightStarEn.position.set(156, 41);
this.rightStarEn.rotation = 25;
this.rightStarEn.scale.set(0.81, 0.81);
this.leftStarEn.scale.set(0, 0);
this.midStarEn.scale.set(0, 0);
this.rightStarEn.scale.set(0, 0);
const starAniFrame: Texture[] = new Array(16);
for (let i = 0; i < 15; i++) {
starAniFrame[i] = RES.getRes(`star_light_${i}.png`);
}
starAniFrame[15] = null;
this.leftStarAni = this.addChild(new FrameAni(starAniFrame));
this.leftStarAni.visible = false;
this.leftStarAni.position.set(-158, 44);
this.midStarAni = this.addChild(new FrameAni(starAniFrame));
this.midStarAni.visible = false;
this.midStarAni.y = 8;
this.rightStarAni = this.addChild(new FrameAni(starAniFrame));
this.rightStarAni.visible = false;
this.rightStarAni.position.set(158, 42);
}
public play(count: number, wait: number = 600) {
const time1 = 200;
const time2 = 100;
const max = 3;
const interval = 100;
Tween.get(this.leftStarEn)
.wait(wait)
.set({scaleX: max, scaleY: max})
.to({scaleX: 0.648, scaleY: 0.648}, time1, Ease.quadOut)
.call(() => {
this.leftStarAni.visible = true;
this.leftStarAni.play(1);
})
.to({scaleX: 0.81, scaleY: 0.81}, time2, Ease.quadOut)
.wait(interval)
.call(() => {
if (count <= 1) return;
Tween.get(this.midStarEn)
.set({scaleX: max, scaleY: max})
.to({scaleX: 0.8, scaleY: 0.8}, time1, Ease.quadOut)
.call(() => {
this.midStarAni.visible = true;
this.midStarAni.play(1);
})
.to({scaleX: 1, scaleY: 1}, time2, Ease.quadOut)
.wait(interval)
.call(() => {
if (count <= 2) return;
Tween.get(this.rightStarEn)
.set({scaleX: max, scaleY: max})
.to({scaleX: 0.648, scaleY: 0.648}, time1, Ease.quadOut)
.call(() => {
this.rightStarAni.visible = true;
this.rightStarAni.play(1);
})
.to({scaleX: 0.81, scaleY: 0.81}, time2, Ease.quadOut)
});
});
}
}
// export class SuccessStar extends Container {
// private starEn: Sprite = null;
// private starDis: Sprite = null;
//
// constructor() {
// super();
// this.starDis = this.addChild(Tools.getSprite('star_dis.png'));
// this.starDis.anchorTexture.set(0.5, 0.5);
// this.starEn = this.addChild(Tools.getSprite('star_en.png'));
// this.starEn.anchorTexture.set(0.5, 0.5);
// this.starEn.scale.set(0, 0);
// this.starEn.y = 3;
// }
//
// public play(wait: number = 0, time: number = 400) {
// Tween.get(this.starEn)
// .wait(wait)
// .set({scaleX: 3, scaleY: 3})
// .to({scaleX: 1, scaleY: 1}, time, Ease.quadInOut);
//
// }
//
// }
import { Panel } from "../../module/views/Panel";
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import { SuccessStarGroup } from "./SuccessNoPrizePanel";
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
export class SuccessPrizePanel extends Panel {
get groupNames() { return ["SuccessPrizePanel"] }
get skinName() { return "SuccessPrizePanel" }
closeBtn:FYGE.Button;
tipsTex:FYGE.TextField;
checkTex:FYGE.TextField;
againBtn:FYGE.Button;
noPrizeAgainBtn:FYGE.Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
get groupNames() {
return ["SuccessPanel", 'starLight']
}
get skinName() {
return "SuccessPrizePanel"
}
public showAni() {
if (this.isShowing) return;
this.isShowing = true;
this.anchor.set(375, 812);
Tween.get(this)
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1, scaleY: 1}, 400, Ease.backOut)
.call(() => {
this.isShowing = false;
});
}
closeBtn: FYGE.Button;
tipsTex: FYGE.TextField;
checkTex: FYGE.TextField;
againBtn: FYGE.Button;
noPrizeAgainBtn: FYGE.Button;
goPrizeBtn: FYGE.Button;
private starGroup: SuccessStarGroup = null;
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, 678);
this.starGroup.play(4);
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
......@@ -10,6 +10,9 @@ import ScrollPage = FYGE.ScrollPage;
import Container = FYGE.Container;
import { Tools } from "../../Tools";
import Graphics = FYGE.Graphics;
import { showPanel } from "../../../module/ctrls";
import { SuccessNoPrizePanel } from "../../panels/SuccessNoPrizePanel";
import { SuccessPrizePanel } from "../../panels/SuccessPrizePanel";
export class MapScene extends Scene {
private mapContainer: Container = null;
......@@ -46,6 +49,8 @@ export class MapScene extends Scene {
this.uiLayer = this.addChild(new MapUI());
this.initMap();
this.updateMapCheck();
showPanel(SuccessPrizePanel);
}
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