GameComponentExtensions extension

on

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 collision
no setter

Available on GameComponent, provided by the GameComponentExtensions extension

no setter
top double

Available on GameComponent, provided by the GameComponentExtensions extension

no setter

Methods

addParticle(Particle particle, {Vector2? position, Vector2? size, Vector2? scale, double? angle, Anchor? anchor, int? priority}) → void

Available on GameComponent, provided by the GameComponentExtensions extension

Used to add particles in your component.
directionThePlayerIsIn() Direction?

Available on GameComponent, provided by the GameComponentExtensions extension

generateValues(Duration duration, {double begin = 0.0, double end = 1.0, Curve curve = Curves.linear, bool autoStart = true, VoidCallback? onFinish, ValueChanged<double>? onChange}) ValueGeneratorComponent

Available on GameComponent, provided by the GameComponentExtensions extension

Used to generate numbers to create your animations or anythings
getComponentDirectionFromMe(GameComponent? comp) Direction

Available on GameComponent, provided by the GameComponentExtensions extension

isObjectCollision() bool

Available on GameComponent, provided by the GameComponentExtensions extension

Method that checks if this component contain collisions
overlaps(Rect other) bool

Available on GameComponent, provided by the GameComponentExtensions extension

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({dynamic id, Future<SpriteAnimation>? animation, required double damage, required double angle, required AttackFromEnum attackFrom, required Vector2 size, bool withPush = true, double marginFromOrigin = 16, Vector2? centerOffset}) → void

Available on GameComponent, provided by the GameComponentExtensions extension

Execute simple attack melee using animation
simpleAttackMeleeByDirection({Future<SpriteAnimation>? animationRight, dynamic id, required double damage, required Direction direction, required Vector2 size, required AttackFromEnum attackFrom, bool withPush = true, double? sizePush, Vector2? centerOffset}) → 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, Vector2? centerOffset}) → void

Available on GameComponent, provided by the GameComponentExtensions extension

Execute the ranged attack using a component with animation
simpleAttackRangeByDirection({required Future<SpriteAnimation> animationRight, 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, double marginFromOrigin = 16, Vector2? centerOffset}) → void

Available on GameComponent, provided by the GameComponentExtensions extension

Execute the ranged attack using a component with animation