瀏覽代碼

screen shake tweaks

master
mort 8 年之前
父節點
當前提交
57b09e4142
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      es/game.js

+ 3
- 1
es/game.js 查看文件

@@ -235,7 +235,7 @@ class Player extends Entity {
}

draw(ctx, selfId) {
let h = 255-((100-this.health) * 2);
let h = Math.round((this.health * 2.4) + 15);

if (selfId == this.id) {
ctx.fillStyle = "rgb("+h+", "+h+", "+h+")";
@@ -254,6 +254,8 @@ class Player extends Entity {

if (this.keys.sprint) {
this.thrustAnim.dheight = 100;
if (this.id == selfId)
this.game.screenShake(10);
} else {
this.thrustAnim.dheight = 64;
}

Loading…
取消
儲存