Commit 652bed3a authored by 邱旭's avatar 邱旭

08.FlppyBird-模拟重力

parent 5289f81a
......@@ -25,7 +25,6 @@ class GameObject {
this.id = id;
this.dom = document.getElementById(id); // 在构造函数中绑定dom元素
this.dom.style.position = "absolute";
this.dom.style.transformOrigin = "center";
}
......@@ -34,7 +33,6 @@ class GameObject {
* @returns {{width: number, height: number}}
*/
getSize() {
const { x, y } = this.getScale();
return {
width: this.dom.clientWidth,
height: this.dom.clientHeight,
......
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