Settings invented, restructuring of graphics folders and enhancements for target point.

This commit is contained in:
Mal
2020-02-12 21:29:06 +01:00
parent 9d1bd467b5
commit b06186043f
9 changed files with 32 additions and 27 deletions

View File

@@ -1,14 +1,15 @@
import Movable from "./Movable.js";
import RetroAnimation from "./retro/RetroAnimation.js";
import Setting from "./Setting.js";
export default class MrCroc extends Movable
{
constructor() {
const SCALE = 2;
super(new RetroAnimation('graphics/mr-croc-walk-right.png', 2, SCALE), 7);
super(new RetroAnimation(Setting.GRAPHICS_LOCATION + 'mr-croc-walk-right.png', 2, SCALE), 7);
this.isJumping = false;
this.addAnimation('WALK_RIGHT', new RetroAnimation('graphics/mr-croc-walk-right.png', 2, SCALE, 10));
this.addAnimation('WALK_LEFT', new RetroAnimation('graphics/mr-croc-walk-left.png', 2, SCALE, 10));
this.addAnimation('WALK_RIGHT', new RetroAnimation(Setting.GRAPHICS_LOCATION + 'mr-croc-walk-right.png', 2, SCALE, 10));
this.addAnimation('WALK_LEFT', new RetroAnimation(Setting.GRAPHICS_LOCATION + 'mr-croc-walk-left.png', 2, SCALE, 10));
}
moveRight(timestamp, delta = 1)