simpleAttackMelee method

void simpleAttackMelee({
  1. Future<SpriteAnimation>? animationRight,
  2. required double damage,
  3. required Vector2 size,
  4. dynamic id,
  5. Direction? direction,
  6. bool withPush = true,
  7. double? sizePush,
  8. Vector2? centerOffset,
  9. double? marginFromCenter,
  10. bool diagonalEnabled = true,
})

Implementation

void simpleAttackMelee({
  Future<SpriteAnimation>? animationRight,
  required double damage,
  required Vector2 size,
  dynamic id,
  Direction? direction,
  bool withPush = true,
  double? sizePush,
  Vector2? centerOffset,
  double? marginFromCenter,
  bool diagonalEnabled = true,
}) {
  simpleAttackMeleeByDirection(
    direction: direction ?? _getLastDirection(diagonalEnabled),
    animationRight: animationRight,
    damage: damage,
    id: id,
    size: size,
    withPush: withPush,
    sizePush: sizePush,
    attackFrom: AttackOriginEnum.PLAYER_OR_ALLY,
    centerOffset: centerOffset,
    marginFromCenter: marginFromCenter,
  );
}