velocity property
Implementation
Vector2 get velocity => _velocity;
Implementation
set velocity(Vector2 newVelocity) {
_velocity = newVelocity;
if (!_velocity.isZero()) {
direction = _getDirectionFromVelocity(_velocity);
} else {
_handleIdle();
}
}