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