Commit 29d62bbc authored by wildfirecode's avatar wildfirecode

1

parent 5502e65c
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<script src="libs/downloadApp.js"></script> <script src="libs/downloadApp.js"></script>
<script> <script>
// localStorage.clear(); localStorage.clear();
var __t0__ = Date.now(); var __t0__ = Date.now();
var __debug__ = 1; var __debug__ = 1;
var __mode__ = 2; var __mode__ = 2;
......
...@@ -31,7 +31,7 @@ export abstract class ABNetManager { ...@@ -31,7 +31,7 @@ export abstract class ABNetManager {
if (net.addUrl) { if (net.addUrl) {
realUrl += net.addUrl; realUrl += net.addUrl;
} }
console.log(`[send][${net.uri}]${JSON.stringify(net.param)}`) // console.log(`[send][${net.uri}]${JSON.stringify(net.param)}`)
window['$'].ajax({ window['$'].ajax({
type: net.type, type: net.type,
// url: realUrl + gTime, // url: realUrl + gTime,
...@@ -40,7 +40,7 @@ export abstract class ABNetManager { ...@@ -40,7 +40,7 @@ export abstract class ABNetManager {
data: net.param, data: net.param,
async: true, async: true,
success: (result) => { success: (result) => {
console.log(`[success][${net.uri}]${JSON.stringify(result)}`) // console.log(`[success][${net.uri}]${JSON.stringify(result)}`)
this.onResponse(net, result); this.onResponse(net, result);
}, },
error: (message) => { error: (message) => {
......
...@@ -61,13 +61,7 @@ export default class StartScene extends Scene { ...@@ -61,13 +61,7 @@ export default class StartScene extends Scene {
this._keyResCounter++; this._keyResCounter++;
this._guideCtrl.addEventListener(egret.Event.COMPLETE, this.checkKeyResource, this); this._guideCtrl.addEventListener(egret.Event.COMPLETE, this.checkKeyResource, this);
this._guideCtrl.start(); this._guideCtrl.start();
this._guideCtrl.enableInteract();
const net = new Net();
this.getLayer(LayerTypes.net).addChild(net);
this._net = net;
this._keyResCounter++;
net.addEventListener(egret.Event.COMPLETE, this.checkKeyResource, this);
if (__debug__) { if (__debug__) {
this._debug = new debug(this.getLayer(LayerTypes.top)); this._debug = new debug(this.getLayer(LayerTypes.top));
...@@ -83,9 +77,16 @@ export default class StartScene extends Scene { ...@@ -83,9 +77,16 @@ export default class StartScene extends Scene {
this._keyResCounter--; this._keyResCounter--;
if (this._keyResCounter != 0) return; if (this._keyResCounter != 0) return;
const t = Date.now() - __t0__; console.log(`关键元素完全时间:${t / 1000}s`); const t = Date.now() - __t0__; console.log(`关键元素完全时间:${t / 1000}s`);
this._guideCtrl.enableInteract();
this._kids = new Kids(); this._kids = new Kids();
this.getLayer(LayerTypes.kids).addChild(this._kids); this.getLayer(LayerTypes.kids).addChild(this._kids);
this.getLayer(LayerTypes.river).addChild(new River()); this.getLayer(LayerTypes.river).addChild(new River());
const net = new Net();
this.getLayer(LayerTypes.net).addChild(net);
this._net = net;
} }
addTouchEvent() { addTouchEvent() {
...@@ -105,7 +106,7 @@ export default class StartScene extends Scene { ...@@ -105,7 +106,7 @@ export default class StartScene extends Scene {
_isBoxFlying: boolean; _isBoxFlying: boolean;
doAction() { doAction() {
this._net.doAction(); this._net && this._net.doAction();
if (this._kids) this._kids.doAction(); if (this._kids) this._kids.doAction();
const catchedBoxs = this._boxListCtrl.boxs.filter( const catchedBoxs = this._boxListCtrl.boxs.filter(
box => Math.abs(box.y - Box.MIDDLE_Y) < StartScene.NET_RANGE); box => Math.abs(box.y - Box.MIDDLE_Y) < StartScene.NET_RANGE);
......
...@@ -5,5 +5,10 @@ export const getBoxKeyList = () => { ...@@ -5,5 +5,10 @@ export const getBoxKeyList = () => {
list.push(key); list.push(key);
} }
} }
const str = 'goldenbox';
const index = list.indexOf(str);
if(index !=-1)
list.splice(index,1);
list.unshift(str);
return list; return list;
} }
\ 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