Commit 7feb0c46 authored by 邱旭's avatar 邱旭

1

parent 901e7037
......@@ -91,7 +91,7 @@ export default class MapScene extends Scene {
this.sendInvite();
PanelCtrl.instance.show("HbGame");
// PanelCtrl.instance.show("HbGame");
this.updateMyInfo();
this.updateAdData();
......
......@@ -41,8 +41,8 @@ export default class RainMgr {
}
private addRain() {
let num = Utils.RandomInt(3, 5);
for(let i = 0; i < Utils.RandomInt(3, 5); i++) {
let num = Utils.RandomInt(3, 6);
for(let i = 0; i < num; i++) {
let newRainObj = this.rainPool.get();
if(!newRainObj) {
newRainObj = new RainObj({
......@@ -51,7 +51,9 @@ export default class RainMgr {
pool:this.rainPool,
});
}
newRainObj.addStage((this.rainGroup.width - 200) / num * i + 100, Utils.RandomInt(7, 10) / 10);
setTimeout(()=>{
newRainObj.addStage((this.rainGroup.width) / num * i + 100, Utils.RandomInt(7, 10) / 10);
}, Utils.RandomInt(0, 6) * 100);
}
}
......
......@@ -17,6 +17,7 @@ export default class RainObj {
public addStage(x, scale) {
this.module.x = x;
console.log(x);
this.module.y = -200;
this.module.scaleX = this.module.scaleY = scale;
this.module.visible = true;
......
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