Npc constructor

Npc({
  1. required Vector2 position,
  2. required Vector2 size,
  3. double? speed,
})

Implementation

Npc({
  required Vector2 position,
  required Vector2 size,
  double? speed,
}) {
  this.speed = speed ?? this.speed;
  this.position = position;
  this.size = size;
}