Commit 9efc4adc authored by haiyoucuv's avatar haiyoucuv

上传

parent 261b357f
......@@ -190,7 +190,6 @@ export class MainGame extends Scene {
}
onPlayerCollision(event: ICollisionEvent) {
console.log(event)
if (this.isOver) return;
const {otherCollider, selfCollider} = event;
......@@ -273,13 +272,10 @@ export class MainGame extends Scene {
this.playerConstraint.pivotB = v3(0, constraintY, 0);
this.playerConstraint.enabled = true;
console.log(this.getDifficultyRatio());
const velocityMultiplier = lerp(0, 1, this.getDifficultyRatio());
const linear = v3();
this.playerBody.getLinearVelocity(linear);
console.log(linear)
linear.multiplyScalar(velocityMultiplier);
this.playerBody.setLinearVelocity(linear);
......@@ -359,7 +355,6 @@ export class MainGame extends Scene {
}
updateScore(addScore) {
console.log(this.scoreRadio);
this.score += ~~((addScore * 15) * this.scoreRadio);
if (this.score > 9999) {
this.score = 9999;
......
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