simpleAttackMelee method
void
simpleAttackMelee({})
Execute simple attack melee using animation
Implementation
void simpleAttackMelee({
required Future<SpriteAnimation> animationRight,
required double damage,
required Vector2 size,
int? id,
bool withPush = true,
double? radAngleDirection,
VoidCallback? execute,
int interval = 1000,
double marginFromCenter = 16,
Vector2? centerOffset,
}) {
if (!checkInterval('attackMelee', interval, dtUpdate)) return;
if (isDead) return;
simpleAttackMeleeByAngle(
id: id,
withPush: withPush,
centerOffset: centerOffset,
marginFromCenter: marginFromCenter,
damage: damage,
size: size,
angle: angle,
animation: animationRight,
attackFrom: AttackOriginEnum.ENEMY,
);
execute?.call();
}