Commit 3adad886 authored by wildfirecode13's avatar wildfirecode13

u

parent 67b5eacc
......@@ -29,7 +29,7 @@
"name": "loading"
},
{
"keys": "newbie_bg.png,newbie_marqee.png,newbie_open.png,newbie_pic2.png,newbie_pic3.png,newbie_pic4.png,newbie_pic5.png,newbie_pic6.png,newbie_pic7.png,newbie_pic8.png,newbie_rule.png,newbie_title.png",
"keys": "newbie_bg.png,newbie_marqee.png,newbie_open.png,newbie_pic2.png,newbie_pic6.png,newbie_pic7.png,newbie_rule.png,newbie_title.png",
"name": "newbie"
},
{
......
......@@ -1201,15 +1201,7 @@
"source": "newbie_bg.png"
}
},
{
"name": "newbie_pic8",
"x": 184,
"y": 555,
"type": "sprite",
"props": {
"source": "newbie_pic8.png"
}
},
{
"name": "newbie_pic7",
"x": 93,
......@@ -1228,33 +1220,8 @@
"source": "newbie_pic6.png"
}
},
{
"name": "newbie_pic5",
"x": 0,
"y": 173,
"type": "sprite",
"props": {
"source": "newbie_pic5.png"
}
},
{
"name": "newbie_pic4",
"x": 0,
"y": 90,
"type": "sprite",
"props": {
"source": "newbie_pic4.png"
}
},
{
"name": "newbie_pic3",
"x": 81,
"y": 310,
"type": "sprite",
"props": {
"source": "newbie_pic3.png"
}
},
{
"name": "newbie_pic2",
"x": 231,
......
import { changeScene, destroyAllCtrls } from "../module/ctrls";
import { changeScene, destroyAllCtrls, hideWaiting, showWaiting } from "../module/ctrls";
import { RES } from "../module/RES";
import { destroyLayers, layers } from "../module/views/layers";
import getQueryParams from "./common/getQueryParams";
......@@ -68,6 +68,7 @@ export class Main {
await RES.loadGroup("common");
console.log("通用资源加载完成")
//h5环境时,隐藏加载中
if (FYGE.getEnv() == "web" && document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
//显示场景
......@@ -79,6 +80,10 @@ export class Main {
if (!alreadyAcquiredResult.data) {
updateShareFunc('inNewbieScene', '');
showWaiting();
await RES.loadGroup("svga");
console.log("svga加载完成");
hideWaiting();
changeScene(NewbieScene);
}
else {
......
......@@ -29,7 +29,7 @@ export const ResJson = {
"name": "loading"
},
{
"keys": "newbie_bg.png,newbie_marqee.png,newbie_open.png,newbie_pic2.png,newbie_pic3.png,newbie_pic4.png,newbie_pic5.png,newbie_pic6.png,newbie_pic7.png,newbie_pic8.png,newbie_rule.png,newbie_title.png",
"keys": "newbie_bg.png,newbie_marqee.png,newbie_open.png,newbie_pic2.png,newbie_pic6.png,newbie_pic7.png,newbie_rule.png,newbie_title.png",
"name": "newbie"
},
{
......
......@@ -1213,15 +1213,7 @@ export const SkinJson ={
"source": "newbie_bg.png"
}
},
{
"name": "newbie_pic8",
"x": 184,
"y": 555,
"type": "sprite",
"props": {
"source": "newbie_pic8.png"
}
},
{
"name": "newbie_pic7",
"x": 93,
......@@ -1240,33 +1232,9 @@ export const SkinJson ={
"source": "newbie_pic6.png"
}
},
{
"name": "newbie_pic5",
"x": 0,
"y": 173,
"type": "sprite",
"props": {
"source": "newbie_pic5.png"
}
},
{
"name": "newbie_pic4",
"x": 0,
"y": 90,
"type": "sprite",
"props": {
"source": "newbie_pic4.png"
}
},
{
"name": "newbie_pic3",
"x": 81,
"y": 310,
"type": "sprite",
"props": {
"source": "newbie_pic3.png"
}
},
{
"name": "newbie_pic2",
"x": 231,
......
import { unwatchPageVisibility, watchPageVisibility } from "@spark/utils";
import { changeScene, closeCurrentPanel, hideWaiting, showPanel, showWaiting } from "../../module/ctrls";
import { RES } from "../../module/RES";
import { Scene } from "../../module/views/Scene";
import getObject from "../common/getObject";
import getQueryParams from "../common/getQueryParams";
import Group from "../common/Group";
import Marquee from "../common/Marquee";
import { hideShareMask } from "../common/ShareMask";
import TestButton from "../common/TestButton";
import { PrizePanel } from "../panels/prize";
import { RulePanel } from "../panels/rule";
import { getPxTokenSave, sendWebNet, WebNetName } from "../WebNet";
......@@ -29,10 +28,16 @@ export class NewbieScene extends Scene {
async start(data) {
super.start();
const query = getQueryParams();
if (query.autoprize == 1) {
this.openPrize();
}
const indexsvga = new FYGE.MovieClip(RES.getRes('index.svga'));
indexsvga.mouseChildren = indexsvga.mouseEnable = false;
this.addChild(indexsvga);
}
openPrize() {
......@@ -41,7 +46,7 @@ export class NewbieScene extends Scene {
getPxTokenSave().then(token => {
sendWebNet(WebNetName.acquireExperienceAmount, { token: token }).then(acquireExperienceAmount => {
hideWaiting();
if(acquireExperienceAmount.success)
if (acquireExperienceAmount.success)
showPanel(PrizePanel, acquireExperienceAmount.data);
})
})
......@@ -59,7 +64,7 @@ export class NewbieScene extends Scene {
initUi() {
super.initUi();
// loadSvga()
sendWebNet(WebNetName.carouselInfo).then(res => {
......@@ -71,23 +76,23 @@ export class NewbieScene extends Scene {
return str
});
const q = this.addChild(new Marquee(datas));
q.x = 135; q.y=448;
window['q']=q;
q.x = 135; q.y = 448;
window['q'] = q;
});
}
initEvents() {
super.initEvents();
watchPageVisibility(this.onPageVisibilityChange);
getObject(this,'newbie_open').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_openBtn, this);
getObject(this,'newbie_rule').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_ruleBtn, this);
getObject(this, 'newbie_open').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_openBtn, this);
getObject(this, 'newbie_rule').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_ruleBtn, this);
}
removeEvents() {
super.removeEvents();
unwatchPageVisibility(this.onPageVisibilityChange)
getObject(this,'newbie_open').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_openBtn, this);
getObject(this,'newbie_rule').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_ruleBtn, this);
getObject(this, 'newbie_open').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_openBtn, this);
getObject(this, 'newbie_rule').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_ruleBtn, this);
}
get groupNames() { return ["newbie"] }
......
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