PlatformPlayer constructor

PlatformPlayer({
  1. required Vector2 position,
  2. required Vector2 size,
  3. PlatformAnimations? animation,
  4. Direction initDirection = Direction.right,
  5. double? speed,
  6. double life = 100,
  7. int countJumps = 1,
})

Implementation

PlatformPlayer({
  required super.position,
  required super.size,
  PlatformAnimations? animation,
  Direction initDirection = Direction.right,
  double? speed,
  double life = 100,
  int countJumps = 1,
}) : super(
        initDirection: initDirection,
        speed: speed,
        life: life,
        animation: animation?.toSimpleDirectionAnimation(),
      ) {
  setupJumper(maxJump: countJumps);
}