Commit 5289f81a authored by 邱旭's avatar 邱旭

08.FlppyBird-模拟重力

parent 41481088
......@@ -51,10 +51,10 @@
this.speed = speed; // 保存speed
this.gravity = gravity; // 保存gravity
// 放到屏幕中间
// 放到合适的位置
const { width, height } = this.getSize();
this.setPosition(
(winSize.height - height) / 2,
(winSize.height - height) / 2 - 100,
(winSize.width - width) / 2,
);
}
......
......@@ -25,10 +25,10 @@ class Bird extends GameObject {
this.speed = speed; // 保存speed
this.gravity = gravity; // 保存gravity
// 放到屏幕中间
// 放到合适的位置
const { width, height } = this.getSize();
this.setPosition(
(winSize.height - height) / 2,
(winSize.height - height) / 2 - 100,
(winSize.width - width) / 2,
);
}
......
images/bird/background.png

8.18 KB | W: | H:

images/bird/background.png

11.5 KB | W: | H:

images/bird/background.png
images/bird/background.png
images/bird/background.png
images/bird/background.png
  • 2-up
  • Swipe
  • Onion skin
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