Level class created and gravity editable.

This commit is contained in:
Mal
2020-02-16 00:53:03 +01:00
parent cec3cc726f
commit a7ecbf9d2e
20 changed files with 277 additions and 133 deletions

View File

@@ -3,10 +3,10 @@ import GeometryRect from "../geometry/GeometryRect.js";
export default class RetroSprite
{
constructor(image, scale = 1)
constructor(imagePath, scale = 1)
{
this.image = new Image();
this.image.src = image;
this.image.src = imagePath;
this.canvas = document.createElement('canvas');
this.context = this.canvas.getContext('2d');
this.position = new GeometryPoint();