Commit 32476dd5 authored by 熊东起's avatar 熊东起

add:urlLink

parent 5a19e615
...@@ -23,6 +23,11 @@ export namespace GameMgr { ...@@ -23,6 +23,11 @@ export namespace GameMgr {
"敬请期待哦~", "敬请期待哦~",
"点我进入游戏哦~" "点我进入游戏哦~"
]; ];
export let LINK_LIST = [
"",
"",
""
];
} }
export const CHANGE_POINT = [ export const CHANGE_POINT = [
{ x: 400, y: 4568, dir: 'R' }, { x: 400, y: 4568, dir: 'R' },
......
...@@ -102,6 +102,7 @@ export class GameIndex extends GAME.WidgetBase { ...@@ -102,6 +102,7 @@ export class GameIndex extends GAME.WidgetBase {
GameMgr.options.curSteps = data.curSteps; GameMgr.options.curSteps = data.curSteps;
GameMgr.GAME_STEP = data.gameSteps; GameMgr.GAME_STEP = data.gameSteps;
GameMgr.SITE_NAME = data.siteName; GameMgr.SITE_NAME = data.siteName;
GameMgr.LINK_LIST = data.linkList;
let endPoint = getCurPoint(GameMgr.options.curSteps); let endPoint = getCurPoint(GameMgr.options.curSteps);
this.player.stepCount = GameMgr.options.curSteps; this.player.stepCount = GameMgr.options.curSteps;
this.player.reset(endPoint); this.player.reset(endPoint);
...@@ -119,6 +120,7 @@ export class GameIndex extends GAME.WidgetBase { ...@@ -119,6 +120,7 @@ export class GameIndex extends GAME.WidgetBase {
this.namePart.refreshNames(); this.namePart.refreshNames();
this.stepWord.refreshSteps(); this.stepWord.refreshSteps();
this.gameMask.refreshData(); this.gameMask.refreshData();
this.namePart.refreshLinktxts();
// this.onMaskPlayer(); // this.onMaskPlayer();
} }
...@@ -183,9 +185,6 @@ export class GameIndex extends GAME.WidgetBase { ...@@ -183,9 +185,6 @@ export class GameIndex extends GAME.WidgetBase {
self.dispatchOutEvent("arrive-site", { step: GameMgr.options.endSteps }); self.dispatchOutEvent("arrive-site", { step: GameMgr.options.endSteps });
}, 1000); }, 1000);
} }
} }
/** 盖住移动的人物 */ /** 盖住移动的人物 */
......
...@@ -30,8 +30,8 @@ export default class GamePart extends GAME.Container { ...@@ -30,8 +30,8 @@ export default class GamePart extends GAME.Container {
this.partLayers["part4"] = cqgPart; 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()); let dbdshape2 = this.addChild(new GAME.Graphics());
dbdshape2.beginFill("#ffffff",0); dbdshape2.beginFill("#ffffff", 0);
dbdshape2.drawCircle(600,4110,200); dbdshape2.drawCircle(600, 4110, 200);
dbdshape2.endFill(); dbdshape2.endFill();
dbdshape2.addEventListener(GAME.MouseEvent.CLICK, this.onGotoActivities.bind(this, 1), this); dbdshape2.addEventListener(GAME.MouseEvent.CLICK, this.onGotoActivities.bind(this, 1), this);
...@@ -58,10 +58,10 @@ export default class GamePart extends GAME.Container { ...@@ -58,10 +58,10 @@ export default class GamePart extends GAME.Container {
chbPart.y = 1972; chbPart.y = 1972;
chbPart.x = 0; chbPart.x = 0;
this.partLayers["part8"] = chbPart; this.partLayers["part8"] = chbPart;
let dbdshape1 = this.addChild(new GAME.Graphics()); let dbdshape1 = this.addChild(new GAME.Graphics());
dbdshape1.beginFill("#ffffff",0); dbdshape1.beginFill("#ffffff", 0);
dbdshape1.drawCircle(200,2600,250); dbdshape1.drawCircle(200, 2600, 250);
dbdshape1.endFill(); dbdshape1.endFill();
dbdshape1.addEventListener(GAME.MouseEvent.CLICK, this.onGotoActivities.bind(this, 2), this); dbdshape1.addEventListener(GAME.MouseEvent.CLICK, this.onGotoActivities.bind(this, 2), this);
...@@ -70,10 +70,10 @@ export default class GamePart extends GAME.Container { ...@@ -70,10 +70,10 @@ export default class GamePart extends GAME.Container {
dbdPart.y = 740; dbdPart.y = 740;
dbdPart.x = 750 - 653; dbdPart.x = 750 - 653;
this.partLayers["part9"] = dbdPart; this.partLayers["part9"] = dbdPart;
let dbdshape = this.addChild(new GAME.Graphics()); let dbdshape = this.addChild(new GAME.Graphics());
dbdshape.beginFill("#ffffff",0); dbdshape.beginFill("#ffffff", 0);
dbdshape.drawCircle(600,1180,250); dbdshape.drawCircle(600, 1180, 250);
dbdshape.endFill(); dbdshape.endFill();
dbdshape.addEventListener(GAME.MouseEvent.CLICK, this.onGotoActivities.bind(this, 3), this); dbdshape.addEventListener(GAME.MouseEvent.CLICK, this.onGotoActivities.bind(this, 3), this);
...@@ -88,7 +88,7 @@ export default class GamePart extends GAME.Container { ...@@ -88,7 +88,7 @@ export default class GamePart extends GAME.Container {
//点击事件 //点击事件
onGotoActivities(e: any) { onGotoActivities(e: any) {
GameMgr.game.dispatchOutEvent("goto-activity", { type: e }); GameMgr.game.dispatchOutEvent("goto-activity", { url: GameMgr.LINK_LIST[e - 1] || "" });
} }
} }
\ No newline at end of file
import * as GAME from "spark-wrapper-fyge"; import * as GAME from "spark-wrapper-fyge";
export default class GameSVGA extends GAME.Container { export default class GameSVGA extends GAME.Container {
constructor() { constructor() {
super(); super();
//宝石山 //宝石山
...@@ -55,6 +54,5 @@ export default class GameSVGA extends GAME.Container { ...@@ -55,6 +54,5 @@ export default class GameSVGA extends GAME.Container {
let sfcy2SVGA = this.addChild(new GAME.MovieClip(GAME.getAssetByUUID("sfcy2_svga"))); let sfcy2SVGA = this.addChild(new GAME.MovieClip(GAME.getAssetByUUID("sfcy2_svga")));
sfcy2SVGA.x = 450; sfcy2SVGA.x = 450;
sfcy2SVGA.y = 638; sfcy2SVGA.y = 638;
} }
} }
\ No newline at end of file
...@@ -132,4 +132,11 @@ export default class SiteNamePart extends GAME.Container { ...@@ -132,4 +132,11 @@ export default class SiteNamePart extends GAME.Container {
this.txtDialogs[`txt${i}`].txt = GameMgr.TXT_DIALOG[i]; this.txtDialogs[`txt${i}`].txt = GameMgr.TXT_DIALOG[i];
} }
} }
/** 刷新气泡数据 */
refreshLinktxts(){
for(let i = 0;i < 3;i++){
this.txtDialogs[`txt${i}`].txt = GameMgr.LINK_LIST[i] ? "点我进入游戏哦~" : "敬请期待哦~";
}
}
} }
\ 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