Commit 81154e79 authored by 熊东起's avatar 熊东起

666

parent 65485d09
......@@ -99,6 +99,7 @@ export class GameIndex extends GAME.WidgetBase {
this.onMove();
break;
case "refresh-data":
this._index = 0;
GameMgr.options.curSteps = data.curSteps;
GameMgr.GAME_STEP = data.gameSteps;
GameMgr.SITE_NAME = data.siteName;
......@@ -190,7 +191,7 @@ export class GameIndex extends GAME.WidgetBase {
/** 盖住移动的人物 */
private _index = 0;
onMaskPlayer() {
if (this.player.y <= 4489 && this._index == 0) {
if (this.player.y <= 4589 && this._index == 0) {
this._index++;
this.gameMask.resetLayers(this._index);
} else if (this.player.y <= 4400 && this._index == 1) {
......
......@@ -45,18 +45,42 @@ function App() {
}
function onClickButton(type) {
_widget.dispatchInEvent(type,{curSteps: 220000,endSteps: 350000})
switch (type) {
case "game-start":
_widget.dispatchInEvent(type, { curSteps: 0, endSteps: 200000 })
break;
case "refresh-data":
_widget.dispatchInEvent(type, {
curSteps: 0,
gameSteps: [0, 10000, 30000, 100000, 200000, 350000],
siteName: [
"宝石山",
"金猪存钱罐",
"断桥残雪",
"平湖秋月",
"拆红包",
"苏堤春晓",
"曲苑风荷",
"打病毒",
"双峰插云"
],
linkList: []
});
break;
}
}
return (
<div className="App">
<div className="control-bar">
<button onClick={e => onClickButton('refresh-data')}>refresh-data</button>
<button onClick={e => onClickButton('game-start')}>GO</button>
</div>
<CanvasWidget className="canvas-widget" widgetFactory={WalkCom} widgetConfig={widgetConfig}
onEvent={onEvent}
onReady={onReady} onAssetsProcess={onAssetsProcess}
onAssetsComplete={onAssetsComplete} />
onAssetsComplete={onAssetsComplete} />
</div>
);
}
......
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