reformatted

This commit is contained in:
s-prechtl 2022-12-13 08:39:17 +01:00
parent eff60389d4
commit dbff8cfb56

View file

@ -5,11 +5,9 @@ class Raspberry extends Entity {
private _image: any; private _image: any;
private static readonly maxVelocity: number = 5; private static readonly maxVelocity: number = 5;
constructor() {
super(new Position(width / 6, height / 2), 180, 70, 0);
}
//region Getter & Setter //region Getter & Setter
get velocity(): number { get velocity(): number {
return this._velocity; return this._velocity;
} }
@ -28,6 +26,10 @@ class Raspberry extends Entity {
//endregion //endregion
constructor() {
super(new Position(width / 6, height / 2), 180, 70, 0);
}
public update(): void { public update(): void {
this.applyGravity(); this.applyGravity();
this.forceBoundaries(); this.forceBoundaries();