SpritesheetAnimator.addX - HermesPasser/Ramu GitHub Wiki

SpritesheetAnimator.addX()

Parameters

int x: Value to be added to x.

Description

Add a value to current x position of it and its animations.

You can test this snippet of code here.

let animator = new SpritesheetAnimator(10, 10, 35, 35);

new GameObj().update = function() {
  animator.addX(3 * Ramu.time.delta);
};

See also SpritesheetAnimator.addY, SpritesheetAnimator.setX and SpritesheetAnimator.setY.