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

111

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