Gisela and target point added.

This commit is contained in:
Mal
2020-02-11 21:20:11 +01:00
parent 3be3ffb89a
commit acd8b92731
10 changed files with 168 additions and 28 deletions

View File

@@ -8,6 +8,7 @@ export default class Field
this.tileset = tileset;
this.index = index;
this.isEntrancePoint = false;
this.isTargetPoint = false;
this.initHtml();
this.initEventListeners();
}
@@ -75,6 +76,17 @@ export default class Field
}
}
setTargetPoint(bool)
{
this.isTargetPoint = bool;
if (this.isTargetPoint) {
this.htmlElement.classList.add('target');
} else {
this.htmlElement.classList.remove('target');
}
}
getElement()
{
return this.htmlElement;