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