Commit 37b25a57 authored by shunx 马's avatar shunx 马

111

parent 42567dc7
...@@ -10,7 +10,7 @@ export interface Move { ...@@ -10,7 +10,7 @@ export interface Move {
let boxGroupUpLeft = []; let boxGroupUpLeft = [];
let boxGroupDown = []; let boxGroupDown = [];
let boxGroupUpRight = []; let boxGroupUpRight = [];
let flag = 0;
export class BoxGroup extends FYGE.Sprite { export class BoxGroup extends FYGE.Sprite {
indexsvga; indexsvga;
constructor() { constructor() {
...@@ -73,11 +73,13 @@ export class BoxGroup extends FYGE.Sprite { ...@@ -73,11 +73,13 @@ export class BoxGroup extends FYGE.Sprite {
handleClick(e) { handleClick(e) {
const indexsvga = this.indexsvga = new FYGE.MovieClip(RES.getRes('盲盒选中-输出.svga')); const indexsvga = this.indexsvga = new FYGE.MovieClip(RES.getRes('盲盒选中-输出.svga'));
flag = 1;
this.dispatchEvent("stopIndexEnterFrame", { }); 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);
indexsvga.startAniRange(1, indexsvga.totalFrames, 1, () => { indexsvga.startAniRange(1, indexsvga.totalFrames, 1, () => {
flag = 0;
showPanel(CostPanel); showPanel(CostPanel);
}); });
} }
......
...@@ -16,6 +16,7 @@ import { BoxGroup } from "./BoxGroup"; ...@@ -16,6 +16,7 @@ import { BoxGroup } from "./BoxGroup";
import { ScrollItem } from "./ScrollItem"; import { ScrollItem } from "./ScrollItem";
import { getWebData, sendWebNet } from "../WebNet"; import { getWebData, sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName"; import { WebNetName } from "../WebNetName";
import { layers } from "../../module/views/layers";
let boxGroup: BoxGroup; let boxGroup: BoxGroup;
...@@ -32,6 +33,7 @@ export class IndexScene extends Scene { ...@@ -32,6 +33,7 @@ export class IndexScene extends Scene {
start() { start() {
super.start(); super.start();
this.getIndex(); this.getIndex();
// this.initNonmemberMask();
getObject(this,'index_sharetips').visible=false; getObject(this,'index_sharetips').visible=false;
this.initContainer(); this.initContainer();
this.initmask(); this.initmask();
...@@ -44,7 +46,9 @@ export class IndexScene extends Scene { ...@@ -44,7 +46,9 @@ export class IndexScene extends Scene {
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); this.stage.addEventListener("restartEnterFrame", this.onRestartFrame, this);
boxGroup.addEventListener("stopIndexEnterFrame", this.removeEvent, this);
} }
initContainer() { initContainer() {
...@@ -55,6 +59,17 @@ export class IndexScene extends Scene { ...@@ -55,6 +59,17 @@ export class IndexScene extends Scene {
boxArea.addChild(boxGroup); boxArea.addChild(boxGroup);
} }
initNonmemberMask() {
const mask = new FYGE.Shape();
mask.beginFill(0, 0.1);
mask.drawRect(0, 0, 750, 1624);
mask.endFill();
layers.topLayer.addChild(mask);
mask.addEventListener(FYGE.MouseEvent.CLICK, () => {
showPanel(memberGuidePanel);
},this)
}
initmask() { initmask() {
const mask = new FYGE.Shape(); const mask = new FYGE.Shape();
mask.beginFill(0, 0.3); mask.beginFill(0, 0.3);
...@@ -75,7 +90,6 @@ export class IndexScene extends Scene { ...@@ -75,7 +90,6 @@ export class IndexScene extends Scene {
onEnterFrame() { onEnterFrame() {
boxGroup && boxGroup.move(); boxGroup && boxGroup.move();
boxGroup.addEventListener("stopIndexEnterFrame", this.removeEvent, this);
} }
onRestartFrame() { onRestartFrame() {
...@@ -94,17 +108,16 @@ export class IndexScene extends Scene { ...@@ -94,17 +108,16 @@ export class IndexScene extends Scene {
getIndex = async () => { getIndex = async () => {
const result = getWebData(WebNetName.index); const result = getWebData(WebNetName.index);
if (result && result.data) { if (result && result.data) {
const reDegree = getObject(this, 'index_timestips2'); const reDegree = getObject(this, 'index_timestips2');
reDegree.text = result.data.surplusCount;
const credits = getObject(this, 'index_moneytips2'); const credits = getObject(this, 'index_moneytips2');
credits.text = result.data.credits; credits.text = result.data.credits;
const needCredits = getObject(this, 'index_costtips'); const needCredits = getObject(this, 'index_costtips');
needCredits.text = result.data.needCredits + "积分/次"; needCredits.text = result.data.needCredits + "积分/次";
if (result.data.type == 2) { if (result.data.type == 2) {
reDegree.text = result.data.surplusCount;
} else if (result.data.type == 2) { } else {
reDegree.text = 0;
} }
......
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