SimplePlayer constructor
SimplePlayer({})
Implementation
SimplePlayer({
required Vector2 position,
required Vector2 size,
SimpleDirectionAnimation? animation,
Direction initDirection = Direction.right,
double? speed,
double life = 100,
}) : super(
position: position,
size: size,
life: life,
speed: speed,
) {
this.animation = animation;
lastDirection = initDirection;
if (initDirection == Direction.left || initDirection == Direction.right) {
lastDirectionHorizontal = initDirection;
}
}