- Fix typo in collision message from "Ihr seit koolidiert!" to "Es gab eine Kollision!" - Reorder TODO comment in endGame method - Rename "Früchte" folder to "Fruits" for consistency - Add TileLoader class to preload and cache game assets - Refactor Overlay class to use TileLoader for improved image handling
15 lines
364 B
JavaScript
15 lines
364 B
JavaScript
import TileLoader from "./TileLoader.js";
|
|
|
|
class Overlay{
|
|
/** @param {TileLoader} tileLoader */
|
|
constructor(tileLoader, imgSrc = null, deg = 0){
|
|
this.tileLoader = tileLoader;
|
|
this.deg = deg;
|
|
this.src = imgSrc;
|
|
|
|
if(!this.src) return;
|
|
this.image = this.tileLoader.tileMap.get(this.src);
|
|
}
|
|
}
|
|
|
|
export default Overlay |