AllyExtensions extension

Created by

─▄▀─▄▀ ──▀──▀ █▀▀▀▀▀█▄ █░░░░░█─█ ▀▄▄▄▄▄▀▀

Rafaelbarbosatec on 24/03/22

on

Methods

seeAndMoveToAttackRange({dynamic positioned(Enemy)?, BoolCallback? notObserved, dynamic observed(Enemy)?, double radiusVision = 32, double? visionAngle, double? angle, double? minDistanceFromPlayer, bool runOnlyVisibleInScreen = true}) → void
Checks whether the Enemy is within range. If so, move to it. visionAngle in radians angle in radians. is automatically picked up using the component's direction.
simpleAttackMelee({required double damage, required Vector2 size, int? id, int interval = 1000, bool withPush = false, double? sizePush, Direction? direction, Future<SpriteAnimation>? animationRight, VoidCallback? execute, Vector2? centerOffset}) → void
Execute simple attack melee using animation
simpleAttackRange({required Future<SpriteAnimation> animationRight, required Future<SpriteAnimation> animationDestroy, required Vector2 size, Vector2? destroySize, int? id, double speed = 150, double damage = 1, Direction? direction, int interval = 1000, bool withCollision = true, ShapeHitbox? collision, VoidCallback? onDestroy, VoidCallback? execute, LightingConfig? lightingConfig}) → void
Execute the ranged attack using a component with animation