GameComponentExtensions extension
Properties
- bottom → double
-
Available on GameComponent, provided by the GameComponentExtensions extension
no setter - left → double
-
Available on GameComponent, provided by the GameComponentExtensions extension
no setter - rectConsideringCollision → Rect
-
Available on GameComponent, provided by the GameComponentExtensions extension
Gets rect used how base in calculations considering collisionno setter - right → double
-
Available on GameComponent, provided by the GameComponentExtensions extension
no setter - top → double
-
Available on GameComponent, provided by the GameComponentExtensions extension
no setter
Methods
-
getComponentDirectionFromMe(
GameComponent? comp) → Direction -
Available on GameComponent, provided by the GameComponentExtensions extension
-
overlaps(
Rect other) → bool -
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, required AttackFromEnum attacker, dynamic id, required Vector2 size, 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 Vector2 size, required AttackFromEnum attackFrom, bool withPush = true, double? sizePush}) → void -
Available on GameComponent, provided by the GameComponentExtensions extension
Execute simple attack melee using animation -
simpleAttackRangeByAngle(
{required Future< SpriteAnimation> animation, required Vector2 size, required double angle, required double damage, required AttackFromEnum attackFrom, Vector2? destroySize, Future<SpriteAnimation> ? animationDestroy, dynamic id, double speed = 150, bool withDecorationCollision = true, VoidCallback? onDestroy, CollisionConfig? collision, LightingConfig? lightingConfig, double marginFromOrigin = 16}) → 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 Vector2 size, required Direction direction, required AttackFromEnum attackFrom, Vector2? destroySize, dynamic id, double speed = 150, double damage = 1, bool withCollision = true, bool enableDiagonal = true, VoidCallback? onDestroy, 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