GameComponentExtensions extension
Methods
-
getComponentDirectionFromMe(
GameComponent? comp) → Direction -
Available on GameComponent, provided by the GameComponentExtensions extension
-
seeComponent(
GameComponent component, {required dynamic observed(GameComponent), VoidCallback? notObserved, double radiusVision = 32}) → void -
Available on GameComponent, provided by the GameComponentExtensions extension
This method we notify when detect the component when enter inradiusVision
configuration Method that bo used in update method. -
seeComponentType<
T extends GameComponent> ({required dynamic observed(List< T> ), VoidCallback? notObserved, double radiusVision = 32}) → void -
Available on GameComponent, provided by the GameComponentExtensions extension
This method we notify when detect components by type when enter inradiusVision
configuration Method that bo used in update method. -
showDamage(
double damage, {TextStyle? config, double initVelocityTop = -5, double gravity = 0.5, double maxDownSize = 20, DirectionTextDamage direction = DirectionTextDamage.RANDOM, bool onlyUp = false}) → void -
Available on GameComponent, provided by the GameComponentExtensions extension
Add in the game a text with animation representing damage received -
simpleAttackMeleeByAngle(
{required Future< SpriteAnimation> animationTop, required double damage, required double radAngleDirection, dynamic id, required double height, required double width, bool withPush = true}) → void -
Available on GameComponent, provided by the GameComponentExtensions extension
Execute simple attack melee using animation -
simpleAttackMeleeByDirection(
{Future< SpriteAnimation> ? animationRight, Future<SpriteAnimation> ? animationDown, Future<SpriteAnimation> ? animationLeft, Future<SpriteAnimation> ? animationUp, dynamic id, required double damage, required Direction direction, required double height, required double width, bool withPush = true, double? sizePush}) → void -
Available on GameComponent, provided by the GameComponentExtensions extension
Execute simple attack melee using animation -
simpleAttackRangeByAngle(
{required Future< SpriteAnimation> animationUp, required double width, required double height, required double radAngleDirection, Future<SpriteAnimation> ? animationDestroy, dynamic id, double speed = 150, double damage = 1, bool withCollision = true, VoidCallback? onDestroy, CollisionConfig? collision, LightingConfig? lightingConfig}) → void -
Available on GameComponent, provided by the GameComponentExtensions extension
Execute the ranged attack using a component with animation -
simpleAttackRangeByDirection(
{required Future< SpriteAnimation> animationRight, required Future<SpriteAnimation> animationLeft, required Future<SpriteAnimation> animationUp, required Future<SpriteAnimation> animationDown, required double width, required double height, required Direction direction, dynamic id, double speed = 150, double damage = 1, bool withCollision = true, bool enableDiagonal = true, VoidCallback? destroy, CollisionConfig? collision, LightingConfig? lightingConfig, Future<SpriteAnimation> ? animationDestroy}) → void -
Available on GameComponent, provided by the GameComponentExtensions extension
Execute the ranged attack using a component with animation