Player constructor
Player({})
Implementation
Player({
required Vector2 position,
required double width,
required double height,
double life = 100,
double speed = 100,
}) {
this.speed = speed;
receivesAttackFrom = ReceivesAttackFromEnum.ENEMY;
initialLife(life);
this.position = Rect.fromLTWH(
position.x,
position.y,
width,
height,
).toVector2Rect();
}