Commit 110b7ec8 authored by wildfirecode's avatar wildfirecode

1

parent 1d041c80
import { loadSvga } from "../../src/loadSvga";
import MainScene from "../../src/mainScene/MainScene";
import MapScene from "../../src/mapScene/MapScene";
import BloodPanel from "../../src/panels/BloodPanel";
import Box2Panel from "../../src/panels/Box2Panel";
import BoxPanel from "../../src/panels/BoxPanel";
import Buy1Panel from "../../src/panels/Buy1Panel";
import Buy2Panel from "../../src/panels/Buy2Panel";
import Buy3Panel from "../../src/panels/Buy3Panel";
import FailedPanel from "../../src/panels/FailedPanel";
import GoldPanel from "../../src/panels/GoldPanel";
import Prize2Panel from "../../src/panels/Prize2Panel";
import QuitPanel from "../../src/panels/QuitPanel";
import ShopPanel from "../../src/panels/ShopPanel";
import SignPanel from "../../src/panels/SignPanel";
import StartPanel from "../../src/panels/StartPanel";
import PlayScene from "../../src/playScene/PlayScene"; import PlayScene from "../../src/playScene/PlayScene";
import { Loading2 } from "../../src/something/uis/Loading2";
import { getBgOn, playBg, stopBg } from "../../src/soundCtrl";
import { playGameBg, stopGamebg } from "../../src/soundCtrl2";
import StartScene from "../../src/startScene/StartScene"; import StartScene from "../../src/startScene/StartScene";
import getResPath from "../new_tc/getResPath"; import getResPath from "../new_tc/getResPath";
import { DataManager } from "../tw/manager/DataManager"; import { DataManager } from "../tw/manager/DataManager";
...@@ -8,35 +27,15 @@ import { Buried } from "../tw/util/Buried"; ...@@ -8,35 +27,15 @@ import { Buried } from "../tw/util/Buried";
import AssetAdapter from "./adapter/AssetAdapter"; import AssetAdapter from "./adapter/AssetAdapter";
import ThemeAdapter from "./adapter/ThemeAdapter"; import ThemeAdapter from "./adapter/ThemeAdapter";
import Alert from "./components/Alert"; import Alert from "./components/Alert";
import HTMLRulePanel from "./components/HTMLRulePanel";
import Loading from "./components/Loading"; import Loading from "./components/Loading";
import NoPrizePanel from "./components/NoPrizePanel"; import NoPrizePanel from "./components/NoPrizePanel";
import OptionsPanel from "./components/OptionsPanel";
import PrizePanel from "./components/PrizePanel"; import PrizePanel from "./components/PrizePanel";
import RankPanel from "./components/RankPanel";
import RulePanel from "./components/RulePanel"; import RulePanel from "./components/RulePanel";
import PanelCtrl from "./ctrls/panelCtrl"; import PanelCtrl from "./ctrls/panelCtrl";
import SceneCtrl from "./ctrls/sceneCtrl"; import SceneCtrl from "./ctrls/sceneCtrl";
import { ModuleTypes } from "./types/sceneTypes"; import { ModuleTypes } from "./types/sceneTypes";
import layers from "./views/layers"; import layers from "./views/layers";
import MapScene from "../../src/mapScene/MapScene"; import SignPrizePanel from "../../src/panels/SignPrizePanel";
import { loadSvga } from "../../src/loadSvga";
import BloodPanel from "../../src/panels/BloodPanel";
import GoldPanel from "../../src/panels/GoldPanel";
import ShopPanel from "../../src/panels/ShopPanel";
import StartPanel from "../../src/panels/StartPanel";
import Buy1Panel from "../../src/panels/Buy1Panel";
import Buy2Panel from "../../src/panels/Buy2Panel";
import Buy3Panel from "../../src/panels/Buy3Panel";
import FailedPanel from "../../src/panels/FailedPanel";
import QuitPanel from "../../src/panels/QuitPanel";
import BoxPanel from "../../src/panels/BoxPanel";
import MainScene from "../../src/mainScene/MainScene";
import { Loading2 } from "../../src/something/uis/Loading2";
import Box2Panel from "../../src/panels/Box2Panel";
import Prize2Panel from "../../src/panels/Prize2Panel";
import { stopBg, playBg, getBgOn } from "../../src/soundCtrl";
import { stopGamebg, playGameBg } from "../../src/soundCtrl2";
export default class MainBase extends eui.UILayer { export default class MainBase extends eui.UILayer {
constructor() { constructor() {
...@@ -66,6 +65,8 @@ export default class MainBase extends eui.UILayer { ...@@ -66,6 +65,8 @@ export default class MainBase extends eui.UILayer {
['box', { cls: BoxPanel }], ['box', { cls: BoxPanel }],
['box2', { cls: Box2Panel }], ['box2', { cls: Box2Panel }],
['prize2', { cls: Prize2Panel }], ['prize2', { cls: Prize2Panel }],
['sign', { cls: SignPanel }],
['signPrize', { cls: SignPrizePanel }],
]; ];
const scenes = [ const scenes = [
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
"skins": {}, "skins": {},
"autoGenerateExmlsList": true, "autoGenerateExmlsList": true,
"exmls": [ "exmls": [
"resource/skins/SignSkin.exml",
"resource/skins/SignPrizeSkin.exml",
"resource/skins/AlertSkin.exml", "resource/skins/AlertSkin.exml",
"resource/skins/BloodSkin.exml", "resource/skins/BloodSkin.exml",
"resource/skins/Box2Skin.exml", "resource/skins/Box2Skin.exml",
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SignPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui">
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SignSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui">
</e:Skin>
\ No newline at end of file
import Panel from "../../libs/new_wx/components/Panel";
export default class SignPanel extends Panel {
start(data) {
super.start();
// this['close2Btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
// NetManager.ins.clickLog(getlogItem(17));
// }, this);
// this.showlog();
// this.data.img = DataManager.ins.getData('getPlugOrderStatus').lottery.imgurl;
}
// showlog() {
// NetManager.ins.showLog(getlogItem(17));
// }
protected get closeBtns(): eui.Button[] { return [this['closeBtn'],this['close2Btn']] }
get skinKey() { return 'Sign' }
}
\ No newline at end of file
import wait from "../../libs/new_tc/wait";
import Panel from "../../libs/new_wx/components/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
import getShowOffPic from "../getShowOffPic";
import { iswx } from "../iswx";
import { getlogItem } from "../Main";
import setGray from "../setGray";
import { showShare } from "../shareCtrl";
import { changeMapScene } from "../startScene/StartScene";
export default class SignPrizePanel extends Panel {
_level;
start(data) {
super.start();
setGray(this['pica']);
setGray(this['picb']);
setGray(this['picc']);
this._level = parseInt(data.level + '');
const submitdata = DataManager.ins.getData('hc_submit').data;
this['tips'].text = `${submitdata.prizeResponse.changeMoney}元宝`;
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(15));
if (iswx()) {
getShowOffPic(this.stage, this);
} else
showShare(2);
}, this);
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel();
if (this._level + 1 <= 70)
changeMapScene({ level: this._level + 1 });
else
changeMapScene();
}, this);
this.showlog();
NetManager.ins.hc_home(() => { }, window['collectRuleId']);
const hc_submitData = DataManager.ins.getData('hc_submit').data;
this.setStar(hc_submitData.stars);
}
showlog() {
NetManager.ins.showLog(getlogItem(15));
}
async setStar(nums: number) {
this['pic1'].visible = this['pic2'].visible = this['pic3'].visible = false;
this['light'].visible = false;
await wait(500);
if (nums == 1) {
this['pic1'].visible = true;
await this.playAni1();
}
if (nums == 2) {
this['pic1'].visible = true;
await this.playAni1();
this['pic2'].visible = true;
await this.playAni2();
}
if (nums == 3) {
this['pic1'].visible = true;
await this.playAni1();
this['pic2'].visible = true;
await this.playAni2();
this['pic3'].visible = true;
await this.playAni3();
}
if (nums >= 1) {
this['light'].visible = true;
egret.Tween.get(this['light']).set({ scaleX: 0, scaleY: 0, alpha: 0, }).to({ scaleX: 1, scaleY: 1, alpha: 1 }, 300).call(() => {
egret.Tween.get(this['light'], { loop: true }).to({ rotation: 360 }, 3000);
});
}
}
async playAni1() {
return new Promise(r => {
egret.Tween.get(this['pic1']).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 }, 400, egret.Ease.getBackOut(1)).call(r)
})
}
async playAni2() {
return new Promise(r => {
egret.Tween.get(this['pic2']).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 }, 400, egret.Ease.getBackOut(1)).call(r)
})
}
async playAni3() {
return new Promise(r => {
egret.Tween.get(this['pic3']).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: -1, scaleY: 1 }, 400, egret.Ease.getBackOut(1)).call(r)
})
}
destroy() {
super.destroy();
egret.Tween.removeTweens(this['light']);
}
onTouchTap_closeBtn(): any {
super.onTouchTap_closeBtn();
changeMapScene();
}
get picBigWidth() { return 510 };
get bigPicRatio() { return 640 / 300 }
useBtn: eui.Button;
get skinKey() { return 'SignPrize' }
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
}
\ 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