AllyExtensions extension
Created by
─▄▀─▄▀ ──▀──▀ █▀▀▀▀▀█▄ █░░░░░█─█ ▀▄▄▄▄▄▀▀
Rafaelbarbosatec on 24/03/22
- on
Methods
-
seeAndMoveToAttackRange(
{required dynamic positioned(Enemy), VoidCallback? notObserved, VoidCallback? observed, double radiusVision = 32, double? minDistanceFromPlayer, bool runOnlyVisibleInScreen = true}) → void -
Available on Ally, provided by the AllyExtensions extension
Checks whether the Enemy is within range. If so, move to it. -
simpleAttackMelee(
{required double damage, required Vector2 size, int? id, int interval = 1000, bool withPush = false, double? sizePush, Direction? direction, Future< SpriteAnimation> ? animationRight, Future<SpriteAnimation> ? animationDown, Future<SpriteAnimation> ? animationLeft, Future<SpriteAnimation> ? animationUp, VoidCallback? execute}) → void -
Available on Ally, provided by the AllyExtensions extension
Execute simple attack melee using animation -
simpleAttackRange(
{required Future< SpriteAnimation> animationRight, required Future<SpriteAnimation> animationLeft, required Future<SpriteAnimation> animationUp, required Future<SpriteAnimation> animationDown, 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, bool enableDiagonal = true, CollisionConfig? collision, VoidCallback? onDestroy, VoidCallback? execute, LightingConfig? lightingConfig}) → void -
Available on Ally, provided by the AllyExtensions extension
Execute the ranged attack using a component with animation