Undo all sheep changes for now
This commit is contained in:
parent
4dce7ade0d
commit
6f19794f6f
1 changed files with 0 additions and 8 deletions
|
@ -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`;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue