moveLeftOnce method
Implementation
void moveLeftOnce({double? speed}) {
_lastSpeed = speed ?? this.speed;
setVelocityAxis(x: -_lastSpeed);
onApplyDisplacement(dtUpdate);
_velocity.add(Vector2(_lastSpeed, 0));
setVelocityAxis(x: 0);
}
void moveLeftOnce({double? speed}) {
_lastSpeed = speed ?? this.speed;
setVelocityAxis(x: -_lastSpeed);
onApplyDisplacement(dtUpdate);
_velocity.add(Vector2(_lastSpeed, 0));
setVelocityAxis(x: 0);
}