Commit 27ce5e84 authored by shunx 马's avatar shunx 马

111

parent 8be616ad
export const SkinJson ={
"x": 0,
"y": 0,
"type": "container",
"children": [
{
"name": "RulePanel",
"x": 0,
"y": 0,
"type": "container",
"children": [
{
"name": "ruleBg",
"x": 28,
"y": 248,
"type": "sprite",
"props": {
"source": "ruleBg.png"
}
},
{
"name": "规则内容",
"x": 74,
"y": 369,
"type": "text",
"props": {
"text": "游戏规则\n",
"size": 30,
"fillColor": "#000000",
"textAlpha": 1
},
"id": "ruleTxt"
},
{
"name": "我知道了",
"x": 164,
"y": 1197,
"type": "button",
"props": {
"tUp": "我知道了.png"
},
"id": "knowBtn"
},
{
"name": "关闭按钮",
"x": 625,
"y": 272,
"type": "button",
"props": {
"tUp": "关闭按钮.png"
},
"id": "closeBtn"
}
]
},
{
"name": "StartScene",
"x": 0,
"y": 0,
"type": "container",
"children": [
{
"name": "startSceneBg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "startSceneBg.jpg"
}
},
{
"name": "底部按钮区",
"x": 0,
"y": 1242,
"type": "container",
"children": [
{
"name": "底部按钮区背景",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "底部按钮区背景.png"
}
},
{
"name": "icon",
"x": 56,
"y": 35,
"type": "container",
"children": [
{
"name": "赚次数按钮",
"x": 547,
"y": 0,
"type": "button",
"props": {
"tUp": "赚次数按钮.png"
},
"id": "taskBtn"
},
{
"name": "运动锦鲤按钮",
"x": 258,
"y": 0,
"type": "button",
"props": {
"tUp": "运动锦鲤按钮.png"
},
"id": "lotBtn"
},
{
"name": "排行榜按钮",
"x": 0,
"y": 0,
"type": "button",
"props": {
"tUp": "排行榜按钮.png"
},
"id": "rankBtn"
}
]
}
]
},
{
"name": "timesTxt",
"x": 286,
"y": 1205,
"type": "text",
"props": {
"text": "剩余次数:3次",
"size": 16.00722,
"fillColor": "#ffffff",
"textAlpha": 1
},
"id": "timesTxt"
},
{
"name": "开始游戏",
"x": 171,
"y": 1052,
"type": "button",
"props": {
"tUp": "开始游戏.png"
},
"id": "startBtn"
},
{
"name": "规则按钮",
"x": 621,
"y": 212,
"type": "button",
"props": {
"tUp": "规则按钮.png"
},
"id": "ruleBtn"
},
{
"name": "奖品按钮",
"x": 11,
"y": 212,
"type": "button",
"props": {
"tUp": "奖品按钮.png"
},
"id": "recordBtn"
}
]
},
{
"name": "share",
"x": 126,
"y": 508,
"type": "container",
"children": [
{
"name": "share_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "share_bg.png"
}
},
{
"name": "share_go",
"x": 139,
"y": 458,
"type": "sprite",
"props": {
"source": "share_go.png"
}
},
{
"name": "share_tips",
"x": 122,
"y": 299,
"type": "text",
"props": {
"text": "获得一次拆盲盒机会",
"size": 28,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "share_close",
"x": 216,
"y": 635,
"type": "sprite",
"props": {
"source": "share_close.png"
}
}
]
},
{
"name": "index",
"x": 0,
"y": 0,
"type": "container",
"children": [
{
"name": "index_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "index_bg.png"
}
},
{
"name": "index_bg2",
"x": 31,
"y": 424,
"type": "sprite",
"props": {
"source": "index_bg2.png"
}
},
{
"name": "index_moneytips2",
"x": 608,
"y": 1133,
"type": "text",
"props": {
"text": "XX",
"size": 32,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "index_moneytips",
"x": 490,
"y": 1133,
"type": "text",
"props": {
"text": "我的积分:",
"size": 24,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "index_timestips2",
"x": 255,
"y": 1132,
"type": "text",
"props": {
"text": "XX",
"size": 32,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "index_timestips",
"x": 137,
"y": 1132,
"type": "text",
"props": {
"text": "剩余次数:",
"size": 24,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "index_costtips",
"x": 322,
"y": 434,
"type": "text",
"props": {
"text": "XX积分/次",
"size": 30,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "index_prizebg",
"x": 31,
"y": 1256,
"type": "sprite",
"props": {
"source": "index_prizebg.png"
}
},
{
"name": "index_opentips",
"x": 200,
"y": 1206,
"type": "sprite",
"props": {
"source": "index_opentips.png"
}
},
{
"name": "index_logo2",
"x": 173,
"y": 291,
"type": "sprite",
"props": {
"source": "index_logo2.png"
}
},
{
"name": "index_logo1",
"x": 237,
"y": 215,
"type": "sprite",
"props": {
"source": "index_logo1.png"
}
},
{
"name": "index_rule",
"x": 0,
"y": 230,
"type": "sprite",
"props": {
"source": "index_rule.png"
}
},
{
"name": "index_record",
"x": 608,
"y": 230,
"type": "sprite",
"props": {
"source": "index_record.png"
}
},
{
"name": "index_sharetips",
"x": 184,
"y": 1187,
"type": "sprite",
"props": {
"source": "index_sharetips.png"
}
}
]
},
{
"name": "cost",
"x": 126,
"y": 508,
"type": "container",
"children": [
{
"name": "cost_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "cost_bg.png"
}
},
{
"name": "cost_tips",
"x": 133,
"y": 296,
"type": "text",
"props": {
"text": "消耗10积分拆开1个盲盒",
"size": 24,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "cost_open",
"x": 139,
"y": 455,
"type": "sprite",
"props": {
"source": "cost_open.png"
}
},
{
"name": "cost_close",
"x": 216,
"y": 635,
"type": "sprite",
"props": {
"source": "cost_close.png"
}
}
]
},
{
"name": "prize",
"x": 9,
"y": 447,
"type": "container",
"children": [
{
"name": "prize_bg2",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "prize_bg2.png"
}
},
{
"name": "prize_bg",
"x": 78,
"y": 23,
"type": "sprite",
"props": {
"source": "prize_bg.png"
}
},
{
"name": "prize_tips",
"x": 251,
"y": 565,
"type": "text",
"props": {
"text": "请在中奖后24小时内领取~",
"size": 22,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "prize_close",
"x": 333,
"y": 696,
"type": "sprite",
"props": {
"source": "prize_close.png"
}
},
{
"name": "prize_open",
"x": 256,
"y": 500,
"type": "sprite",
"props": {
"source": "prize_open.png"
}
},
{
"name": "prize_name",
"x": 325,
"y": 454,
"type": "text",
"props": {
"text": "奖品名称",
"size": 24,
"fillColor": "#000000",
"textAlpha": 1
}
}
]
},
{
"name": "noprize",
"x": 126,
"y": 508,
"type": "container",
"children": [
{
"name": "noprize_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "noprize_bg.png"
}
},
{
"name": "noprize_ok",
"x": 139,
"y": 455,
"type": "sprite",
"props": {
"source": "noprize_ok.png"
}
},
{
"name": "noprize_close",
"x": 216,
"y": 635,
"type": "sprite",
"props": {
"source": "noprize_close.png"
}
}
]
},
{
"name": "newRule",
"x": 110,
"y": 463,
"type": "container",
"children": [
{
"name": "newRule_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "newRule_bg.png"
}
},
{
"name": "newRule_tips",
"x": 51,
"y": 158,
"type": "text",
"props": {
"text": "加载中... ...",
"size": 24,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "newRule_close",
"x": 232,
"y": 772,
"type": "sprite",
"props": {
"source": "newRule_close.png"
}
}
]
},
{
"name": "timesNotEnough",
"x": 126,
"y": 508,
"type": "container",
"children": [
{
"name": "timesNotEnough_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "timesNotEnough_bg.png"
}
},
{
"name": "timesNotEnough_ok",
"x": 139,
"y": 458,
"type": "sprite",
"props": {
"source": "timesNotEnough_ok.png"
}
},
{
"name": "timesNotEnough_close",
"x": 216,
"y": 635,
"type": "sprite",
"props": {
"source": "timesNotEnough_close.png"
}
}
]
},
{
"name": "notEnoughMoney",
"x": 126,
"y": 508,
"type": "container",
"children": [
{
"name": "notEnoughMoney_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "notEnoughMoney_bg.png"
}
},
{
"name": "notEnoughMoney_btn",
"x": 139,
"y": 455,
"type": "sprite",
"props": {
"source": "notEnoughMoney_btn.png"
}
},
{
"name": "notEnoughMoney_tips",
"x": 86,
"y": 293,
"type": "text",
"props": {
"text": "积分不足哟,先去赚积分吧~",
"size": 28,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "notEnoughMoney_close",
"x": 216,
"y": 635,
"type": "sprite",
"props": {
"source": "notEnoughMoney_close.png"
}
}
]
},
{
"name": "share",
"x": 126,
"y": 508,
"type": "container",
"children": [
{
"name": "share_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "share_bg.png"
}
},
{
"name": "share_go",
"x": 139,
"y": 458,
"type": "sprite",
"props": {
"source": "share_go.png"
}
},
{
"name": "share_tips",
"x": 122,
"y": 299,
"type": "text",
"props": {
"text": "获得一次拆盲盒机会",
"size": 28,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "share_close",
"x": 216,
"y": 635,
"type": "sprite",
"props": {
"source": "share_close.png"
}
}
]
},
{
"name": "memberGuide",
"x": 115,
"y": 506,
"type": "container",
"children": [
{
"name": "memberGuide_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "memberGuide_bg.png"
}
},
{
"name": "memberGuide_btn",
"x": 150,
"y": 457,
"type": "sprite",
"props": {
"source": "memberGuide_btn.png"
}
},
{
"name": "memberGuide_close",
"x": 227,
"y": 637,
"type": "sprite",
"props": {
"source": "memberGuide_close.png"
}
}
]
},
{
"name": "getTimes",
"x": 126,
"y": 508,
"type": "container",
"children": [
{
"name": "getTimes_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "getTimes_bg.png"
}
},
{
"name": "getTimes_tips1",
"x": 131,
"y": 504,
"type": "text",
"props": {
"text": "最多可增加1次拆盒机会/天",
"size": 22,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "getTimes_tips2",
"x": 146,
"y": 313,
"type": "text",
"props": {
"text": "一次免费拆盒机会",
"size": 28,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "getTimes_close",
"x": 216,
"y": 635,
"type": "sprite",
"props": {
"source": "getTimes_close.png"
}
},
{
"name": "getTimes_go",
"x": 139,
"y": 432,
"type": "sprite",
"props": {
"source": "getTimes_go.png"
}
}
]
}
]
}
\ No newline at end of file
...@@ -728,15 +728,7 @@ export const SkinJson ={ ...@@ -728,15 +728,7 @@ export const SkinJson ={
"y": 0, "y": 0,
"type": "container", "type": "container",
"children": [ "children": [
{
"name": "prize_bg2",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "prize_bg2.png"
}
},
{ {
"name": "prize_bg", "name": "prize_bg",
"x": 78, "x": 78,
......
import { showPanel } from "../../module/ctrls";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import centerTextField from "../common/centerTextField"; import centerTextField from "../common/centerTextField";
import getObject from "../common/getObject"; import getObject from "../common/getObject";
import { PrizePanel } from "./prize";
let section; let section;
export class CostPanel extends Panel { export class CostPanel extends Panel {
...@@ -11,13 +13,9 @@ export class CostPanel extends Panel { ...@@ -11,13 +13,9 @@ export class CostPanel extends Panel {
getObject(this, "cost_tips").text = `消耗${cost}积分拆开1个盲盒`; getObject(this, "cost_tips").text = `消耗${cost}积分拆开1个盲盒`;
} }
cost_open() { cost_open() {
const indexsvga = new FYGE.MovieClip(RES.getRes("盲盒开启-打开-输出.svga")); this.dispatchEvent("stopIndexEnterFrame", { });
indexsvga.mouseChildren = indexsvga.mouseEnable = false; this.hidePanel();
// indexsvga.position.set(100,100) showPanel(PrizePanel)
this.addChild(indexsvga);
indexsvga.startAniRange(1, indexsvga.totalFrames, 1, () => {
});
} }
get groupNames() { get groupNames() {
...@@ -41,6 +39,11 @@ export class CostPanel extends Panel { ...@@ -41,6 +39,11 @@ export class CostPanel extends Panel {
this.cost_open, this.cost_open,
this this
); );
getObject(this, "cost_close").addEventListener(
FYGE.MouseEvent.CLICK,
this.closePop,
this
)
} }
removeEvents() { removeEvents() {
...@@ -52,7 +55,11 @@ export class CostPanel extends Panel { ...@@ -52,7 +55,11 @@ export class CostPanel extends Panel {
); );
} }
protected get closeBtns(): any[] { closePop() {
return [getObject(this, "cost_close")]; this.stage.dispatchEvent("restartEnterFrame", {})
this.hidePanel();
} }
} }
...@@ -13,11 +13,32 @@ export class NoPrizePanel extends Panel { ...@@ -13,11 +13,32 @@ export class NoPrizePanel extends Panel {
get groupNames() { return ["noprize"] } get groupNames() { return ["noprize"] }
get skinName() { return "noprize" } get skinName() { return "noprize" }
prizeContainer: FYGE.Sprite;
initUi() { initUi() {
super.initUi(); super.initUi();
var skin = RES.getSkinDataByName(this.skinName); var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y); this.position.set(skin.x, skin.y);
// centerTextField(getObject(this,'prize_name'),731); centerTextField(getObject(this, 'prize_name'), 731);
centerTextField(getObject(this, 'prize_tips'), 731);
const prizePop = getObject(this, "prizeInner");
prizePop.visible = false;
const indexsvga = new FYGE.MovieClip(RES.getRes('盲盒开启-打开-输出.svga'));
const container = this.prizeContainer = prizePop.addChild(new FYGE.Sprite);
container.position.set(286, 276);
indexsvga.mouseChildren = indexsvga.mouseEnable = false;
indexsvga.position.set(731/2-750/2,720/2-1624/2)
this.addChild(indexsvga);
this.addChild(prizePop)
indexsvga.addEventListener(FYGE.Event.ENTER_FRAME, () => {
if (indexsvga.currentFrame == indexsvga.totalFrames-10) {
prizePop.visible = true;
}
},this)
indexsvga.startAniRange(1, indexsvga.totalFrames, 1, () => {
this.removeChild(indexsvga)
});
} }
initEvents() { initEvents() {
......
...@@ -2,8 +2,10 @@ import { RES } from "../../module/RES"; ...@@ -2,8 +2,10 @@ import { RES } from "../../module/RES";
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import centerTextField from "../common/centerTextField"; import centerTextField from "../common/centerTextField";
import { createMask } from "../common/createMask"; import { createMask } from "../common/createMask";
import { showPanel } from "../../module/ctrls";
import { getImage } from "../common/getImage"; import { getImage } from "../common/getImage";
import getObject from "../common/getObject"; import getObject from "../common/getObject";
import { CostPanel } from "./cost";
let section; let section;
export class PrizePanel extends Panel { export class PrizePanel extends Panel {
...@@ -20,7 +22,7 @@ export class PrizePanel extends Panel { ...@@ -20,7 +22,7 @@ export class PrizePanel extends Panel {
} }
click_prize_open() { click_prize_open() {
console.log('click_prize_open'); console.log('click_prize_open')
} }
get groupNames() { return ["prize"] } get groupNames() { return ["prize"] }
...@@ -33,10 +35,23 @@ export class PrizePanel extends Panel { ...@@ -33,10 +35,23 @@ export class PrizePanel extends Panel {
this.position.set(skin.x, skin.y); this.position.set(skin.x, skin.y);
centerTextField(getObject(this, 'prize_name'), 731); centerTextField(getObject(this, 'prize_name'), 731);
centerTextField(getObject(this, 'prize_tips'), 731); centerTextField(getObject(this, 'prize_tips'), 731);
const prizePop = getObject(this, "prizeInner");
const container = this.prizeContainer = this.addChild(new FYGE.Sprite); prizePop.visible = false;
const indexsvga = new FYGE.MovieClip(RES.getRes('盲盒开启-打开-输出.svga'));
const container = this.prizeContainer = prizePop.addChild(new FYGE.Sprite);
container.position.set(286, 276); container.position.set(286, 276);
window['q'] = container; indexsvga.mouseChildren = indexsvga.mouseEnable = false;
indexsvga.position.set(731/2-750/2,720/2-1624/2)
this.addChild(indexsvga);
this.addChild(prizePop)
indexsvga.addEventListener(FYGE.Event.ENTER_FRAME, () => {
if (indexsvga.currentFrame == indexsvga.totalFrames-13) {
prizePop.visible = true;
}
},this)
indexsvga.startAniRange(1, indexsvga.totalFrames, 1, () => {
this.removeChild(indexsvga)
});
} }
initEvents() { initEvents() {
...@@ -48,6 +63,11 @@ export class PrizePanel extends Panel { ...@@ -48,6 +63,11 @@ export class PrizePanel extends Panel {
getObject(this, 'prize_open').removeEventListener(FYGE.MouseEvent.CLICK, this.click_prize_open, this); getObject(this, 'prize_open').removeEventListener(FYGE.MouseEvent.CLICK, this.click_prize_open, this);
} }
hidePanel() {
this.stage.dispatchEvent("restartEnterFrame",{})
super.hidePanel();
}
protected get closeBtns(): any[] { protected get closeBtns(): any[] {
return [getObject(this, 'prize_close')] return [getObject(this, 'prize_close')]
} }
......
...@@ -12,9 +12,11 @@ let boxGroupDown = []; ...@@ -12,9 +12,11 @@ let boxGroupDown = [];
let boxGroupUpRight = []; let boxGroupUpRight = [];
export class BoxGroup extends FYGE.Sprite { export class BoxGroup extends FYGE.Sprite {
indexsvga;
constructor() { constructor() {
super(); super();
this.initBox(); this.initBox();
} }
...@@ -70,8 +72,8 @@ export class BoxGroup extends FYGE.Sprite { ...@@ -70,8 +72,8 @@ export class BoxGroup extends FYGE.Sprite {
} }
handleClick(e) { handleClick(e) {
const indexsvga = new FYGE.MovieClip(RES.getRes('盲盒选中-输出.svga')); const indexsvga = this.indexsvga = new FYGE.MovieClip(RES.getRes('盲盒选中-输出.svga'));
this.dispatchEvent("stopIndexEnterFrame", { isMove: false }); this.dispatchEvent("stopIndexEnterFrame", { });
indexsvga.mouseChildren = indexsvga.mouseEnable = false; indexsvga.mouseChildren = indexsvga.mouseEnable = false;
indexsvga.position.set(e.target.x-200,e.target.y-190) indexsvga.position.set(e.target.x-200,e.target.y-190)
this.addChild(indexsvga); this.addChild(indexsvga);
......
...@@ -18,7 +18,7 @@ import { sendWebNet } from "../WebNet"; ...@@ -18,7 +18,7 @@ import { sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName"; import { WebNetName } from "../WebNetName";
let boxGroup; let boxGroup: BoxGroup;
let boxArea; let boxArea;
export class IndexScene extends Scene { export class IndexScene extends Scene {
...@@ -32,15 +32,19 @@ export class IndexScene extends Scene { ...@@ -32,15 +32,19 @@ export class IndexScene extends Scene {
start() { start() {
super.start(); super.start();
this.getIndex(); this.getIndex();
// showPanel(SharePanel);
getObject(this,'index_sharetips').visible=false; getObject(this,'index_sharetips').visible=false;
this.initContainer(); this.initContainer();
this.initmask(); this.initmask();
const limit = getObject(this, 'index_timestips2');
limit.position.set(255, 1129);
const credits = getObject(this, 'index_moneytips2');
credits.position.set(608, 1129);
const list = new FYGE.ScrollList(ScrollItem, 131+20, 131, 620, 154, false); const list = new FYGE.ScrollList(ScrollItem, 131+20, 131, 620, 154, false);
const array = ['//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png']; const array = ['//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'];
list.updateData(array); list.updateData(array);
list.position.set(80, 1240+30); list.position.set(80, 1240+30);
this.addChild(list); this.addChild(list);
this.stage.addEventListener("restartEnterFrame",this.onRestartFrame,this);
} }
initContainer() { initContainer() {
...@@ -64,6 +68,7 @@ export class IndexScene extends Scene { ...@@ -64,6 +68,7 @@ export class IndexScene extends Scene {
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this); this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
this.addEventListener("restartEnterFrame", this.onRestartFrame, this);
const rulePop = getObject(this,'index_rule'); const rulePop = getObject(this,'index_rule');
rulePop && rulePop.addEventListener(FYGE.MouseEvent.CLICK, this.toRule, this); rulePop && rulePop.addEventListener(FYGE.MouseEvent.CLICK, this.toRule, this);
} }
...@@ -73,13 +78,17 @@ export class IndexScene extends Scene { ...@@ -73,13 +78,17 @@ export class IndexScene extends Scene {
boxGroup.addEventListener("stopIndexEnterFrame", this.removeEvent, this); boxGroup.addEventListener("stopIndexEnterFrame", this.removeEvent, this);
} }
onRestartFrame() {
boxGroup.removeChild(boxGroup.indexsvga);
this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
}
toRule() { toRule() {
showPanel(RulePanel); showPanel(RulePanel);
} }
removeEvent() { removeEvent() {
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this); this.removeEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
} }
getIndex = async () => { getIndex = async () => {
...@@ -95,6 +104,5 @@ export class IndexScene extends Scene { ...@@ -95,6 +104,5 @@ export class IndexScene extends Scene {
} }
} }
} }
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