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