Mr. Croc is less fat now
This commit is contained in:
parent
feb3f9c844
commit
de5df11193
36
js/MrCroc.js
36
js/MrCroc.js
|
@ -23,4 +23,38 @@ export default class MrCroc extends Movable
|
||||||
this.playAnimation('WALK_LEFT', timestamp);
|
this.playAnimation('WALK_LEFT', timestamp);
|
||||||
super.moveLeft(delta);
|
super.moveLeft(delta);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
getPositionFootLeft() {
|
||||||
|
const position = super.getPositionFootLeft();
|
||||||
|
position.x += 10;
|
||||||
|
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
getPositionFootRight() {
|
||||||
|
const position = super.getPositionFootRight();
|
||||||
|
position.x -= 10;
|
||||||
|
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
getPositionHeadLeft() {
|
||||||
|
const position = super.getPositionHeadLeft();
|
||||||
|
|
||||||
|
if (this.currentAnimation === 'WALK_RIGHT') {
|
||||||
|
position.x += 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
getPositionHeadRight() {
|
||||||
|
const position = super.getPositionHeadRight();
|
||||||
|
|
||||||
|
if (this.currentAnimation === 'WALK_LEFT') {
|
||||||
|
position.x += 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue