Commit f1341317 authored by zhangjinzhou's avatar zhangjinzhou

代码暂存

parent 6dff793e
...@@ -47,7 +47,7 @@ function launchWithCustomModule(customModule) { ...@@ -47,7 +47,7 @@ function launchWithCustomModule(customModule) {
setTimeout(() => { setTimeout(() => {
engine.globalEvent.dispatchEvent('bqgame-start', { engine.globalEvent.dispatchEvent('bqgame-start', {
guide:true guide:false
}); });
}, 510); }, 510);
......
...@@ -327,9 +327,10 @@ export default class Ball extends MoveObjcet implements PoolElement { ...@@ -327,9 +327,10 @@ export default class Ball extends MoveObjcet implements PoolElement {
drop.physics.velocity.y = -(x * 5 * MUtils.random(0.9, 1.1)); drop.physics.velocity.y = -(x * 5 * MUtils.random(0.9, 1.1));
if (GuideMgr.instance.guideFlag && i == 1) { if (GuideMgr.instance.guideFlag && i == 1) {
MTimer.setFrameTimer(20, () => { // MTimer.setFrameTimer(20, () => {
GuideMgr.instance.runGuide(1, Math.floor(drop.x), Math.floor(drop.y), true); // GuideMgr.instance.runGuide(1, Math.floor(drop.x), Math.floor(drop.y), true);
}); // });
GuideMgr.instance.setGuideTwo(1);
} }
} }
} }
......
...@@ -165,8 +165,8 @@ export default class Game { ...@@ -165,8 +165,8 @@ export default class Game {
this.node.width = MConst.DesignResolution.width; this.node.width = MConst.DesignResolution.width;
this.node.height = MConst.DesignResolution.height; this.node.height = MConst.DesignResolution.height;
let bg = new engine.Image(getTexture("d99368b8-af5d-4d9e-981e-7bce3e1c1e84")); // let bg = new engine.Image(getTexture("d99368b8-af5d-4d9e-981e-7bce3e1c1e84"));
this.node.addChild(bg); // this.node.addChild(bg);
//子弹层 //子弹层
this.node.addChild(this.layers.bullet); this.node.addChild(this.layers.bullet);
//炮车 //炮车
......
...@@ -88,7 +88,7 @@ class SpBoomEffect extends engine.Container implements PoolElement { ...@@ -88,7 +88,7 @@ class SpBoomEffect extends engine.Container implements PoolElement {
constructor(color: number, size: number) { constructor(color: number, size: number) {
super(); super();
this.scaleX = this.scaleY = 0.5 * size + 0.5; this.scaleX = this.scaleY = 1 * size + 1;
this.rotation = MUtils.random(0, 90); this.rotation = MUtils.random(0, 90);
for (let i = 0; i < 16; i++) { for (let i = 0; i < 16; i++) {
let line = new Line(this, i % 2, color, i * 22.5); let line = new Line(this, i % 2, color, i * 22.5);
......
...@@ -5,7 +5,7 @@ export namespace MConst { ...@@ -5,7 +5,7 @@ export namespace MConst {
height: 1624 height: 1624
}; };
export const GroundLine = 1110; export let GroundLine = 1330;//1110;
export const BulletFireSpeed = { export const BulletFireSpeed = {
min: 10, min: 10,
max: 20 max: 20
......
...@@ -50,7 +50,18 @@ export default class GuideMgr { ...@@ -50,7 +50,18 @@ export default class GuideMgr {
if (end) { if (end) {
this.guideFlag = false; this.guideFlag = false;
} }
engine.globalEvent.dispatchEvent("bqgame_ctrl",{
istop:"false"
})
}; };
this._container.addChild(this.currentGuideMask); this._container.addChild(this.currentGuideMask);
} }
public setGuideTwo(index){
this.done.push(index);
if(this.done.length >= Object.keys(MConfigs.guide).length){
DataMgr.game.onGuideDone();
}
this.guideFlag = false;
}
} }
\ No newline at end of file
...@@ -15,6 +15,7 @@ export default class SoundMgr { ...@@ -15,6 +15,7 @@ export default class SoundMgr {
} }
public playEffect(name: string, loop: boolean = false) { public playEffect(name: string, loop: boolean = false) {
return;
if (!this.enabled) return; if (!this.enabled) return;
engine.playSound(getAssetByUUID(nameToUuid[name]).uuid, { engine.playSound(getAssetByUUID(nameToUuid[name]).uuid, {
......
...@@ -6,9 +6,11 @@ class BallPool extends Pool<Ball>{ ...@@ -6,9 +6,11 @@ class BallPool extends Pool<Ball>{
public spwan(sizeIndex: number) { public spwan(sizeIndex: number) {
let element: Ball = null; let element: Ball = null;
if (this.data.length > 0) { if (this.data.length > 0) {
// console.log("复用========Ball");
element = this.data.shift(); element = this.data.shift();
element.onElementInit(); element.onElementInit();
} else { } else {
// console.error("new==========Ball");
element = new Ball(sizeIndex); element = new Ball(sizeIndex);
this.layer.addChild(element); this.layer.addChild(element);
} }
......
...@@ -46,6 +46,7 @@ export class ShootPlanet extends engine.Container { ...@@ -46,6 +46,7 @@ export class ShootPlanet extends engine.Container {
public onActive() { public onActive() {
if(!this.game){ if(!this.game){
console.error("新建game========");
this.game = new Game(this); this.game = new Game(this);
} }
// this.setChildIndex(this.testbtn,100); // this.setChildIndex(this.testbtn,100);
......
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