Commit cff2afcb authored by haiyoucuv's avatar haiyoucuv

11

parent a807b838
......@@ -48,10 +48,10 @@ export class Game extends Base {
const qsBg = this.addChild(new Sprite(Assets.get("问题.png")));
qsBg.position.set(49, 316);
// this.level = this.addChild(new Level21(this.setPauseCd));
this.level = this.addChild(new Level7(this.setPauseCd));
globalEvent.on(GameEvent.NextLevel, this.nextLevel, this);
this.nextLevel();
// this.nextLevel();
this.startCd();
}
......
......@@ -70,7 +70,12 @@ export class Level7 extends LevelBase {
const angle = this.calcAngle(x, y);
this.pig.angle = angle - this.sAngle;
if (this.pig.angle < -150 && this.pig.angle > -200) {
const pAngle = this.pig.angle % 360;
if (
(pAngle < -150 && pAngle > -200)
|| (pAngle > 160 && pAngle < 210)
) {
this.passLevel();
}
};
......
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