Commit 8b820040 authored by 熊东起's avatar 熊东起

222

parent 81154e79
File added
......@@ -122,6 +122,7 @@ export class GameIndex extends GAME.WidgetBase {
this.stepWord.refreshSteps();
this.gameMask.refreshData();
this.namePart.refreshLinktxts();
this.gameSvga.refreshredPack();
// this.onMaskPlayer();
}
......
......@@ -3,6 +3,7 @@ import { GameMgr } from "./GameConfig";
import GameMask from "./GamneMask";
export default class GamePart extends GAME.Container {
private partLayers: any = {};
private isTouch: boolean = true;
constructor() {
super();
......@@ -28,7 +29,7 @@ export default class GamePart extends GAME.Container {
cqgPart.y = 3735;
cqgPart.x = 750 - 628;
this.partLayers["part4"] = cqgPart;
cqgPart.addEventListener(GAME.MouseEvent.CLICK, this.onGotoActivities.bind(this, 1), this);
// cqgPart.addEventListener(GAME.MouseEvent.CLICK, this.onGotoActivities.bind(this, 1), this);
let dbdshape2 = this.addChild(new GAME.Graphics());
dbdshape2.beginFill("#ffffff", 0);
dbdshape2.drawCircle(600, 4110, 200);
......@@ -88,7 +89,11 @@ export default class GamePart extends GAME.Container {
//点击事件
onGotoActivities(e: any) {
if (!this.isTouch) return;
this.isTouch = false;
GameMgr.game.dispatchOutEvent("goto-activity", { url: GameMgr.LINK_LIST[e - 1] || "" });
setTimeout(() => {
this.isTouch = true
}, 1500);
}
}
\ No newline at end of file
import * as GAME from "spark-wrapper-fyge";
import { GameMgr } from "./GameConfig";
export default class GameSVGA extends GAME.Container {
private _qhbMask: GAME.Sprite;
private _redPack: GAME.MovieClip;
constructor() {
super();
//宝石山
......@@ -23,12 +26,12 @@ export default class GameSVGA extends GAME.Container {
phqySVGA.y = 2892;
//拆红包
let chbSVGA = this.addChild(new GAME.MovieClip(GAME.getAssetByUUID("qhb_svga")));
chbSVGA.x = 0;
chbSVGA.y = 2160;
let qhbMask = this.addChild(new GAME.Sprite(GAME.TextureCache["qhbmask"]));
qhbMask.x = 0;
qhbMask.y = 2145;
this._redPack = this.addChild(new GAME.MovieClip(GAME.getAssetByUUID("qhb_svga")));
this._redPack.x = 0;
this._redPack.y = 2160;
this._qhbMask = this.addChild(new GAME.Sprite(GAME.TextureCache["qhbmask"]));
this._qhbMask.x = 0;
this._qhbMask.y = 2145;
//苏堤春晓
let sdcxSVGA = this.addChild(new GAME.MovieClip(GAME.getAssetByUUID("sdcx_svga")));
......@@ -55,4 +58,15 @@ export default class GameSVGA extends GAME.Container {
sfcy2SVGA.x = 450;
sfcy2SVGA.y = 638;
}
//初始化
refreshredPack() {
if (GameMgr.LINK_LIST[1]) {
this._qhbMask.visible = false;
this._redPack.visible = false;
} else {
this._qhbMask.visible = true;
this._redPack.visible = true;
}
}
}
\ 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