Undo all sheep changes for now

This commit is contained in:
Dustin Brett 2024-02-09 20:31:06 -08:00
parent 4dce7ade0d
commit 6f19794f6f

View file

@ -29,7 +29,6 @@ window.Sheep = class eSheep {
this.sprite = new Image(); // sprite image (Tiles)
this.HTMLelement = null; // the HTML element where the pet is walking on
this.randS = Math.random() * 100; // random value, will change when page is reloaded
this.taskbarHeight = 30;
this.screenW =
window.innerWidth ||
@ -193,17 +192,10 @@ window.Sheep = class eSheep {
if (absolute) {
this.imageX = Number.parseInt(x);
this.imageY = Number.parseInt(y);
const maxY = (this.screenH - this.imageH - this.taskbarHeight);
if (this.imageY > maxY && !this._checkOverlapping()) {
this.imageY = maxY;
}
} else {
this.imageX = Number.parseInt(this.imageX) + Number.parseInt(x);
this.imageY = Number.parseInt(this.imageY) + Number.parseInt(y);
}
this.DOMdiv.style.left = `${this.imageX}px`;
this.DOMdiv.style.top = `${this.imageY}px`;
}