Commit f1341317 authored by zhangjinzhou's avatar zhangjinzhou

代码暂存

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