mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Architecture implemented.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import RetroSprite from "./RetroSprite.js";
|
||||
import GeometryRect from "../geometry/GeometryRect.js";
|
||||
|
||||
export default class RetroAnimation extends RetroSprite
|
||||
{
|
||||
@@ -18,6 +19,10 @@ export default class RetroAnimation extends RetroSprite
|
||||
return this.frameWidth;
|
||||
}
|
||||
|
||||
getRect() {
|
||||
return new GeometryRect(this.position.x, this.position.y, this.frameWidth, this.canvas.height);
|
||||
}
|
||||
|
||||
setFootPosition(x, y) {
|
||||
this.position.x = x - this.frameWidth * 0.5;
|
||||
this.position.y = y - this.canvas.height;
|
||||
|
||||
Reference in New Issue
Block a user