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

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, ComponentKey? key}) → 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, Curve? reverseCurve, bool autoStart = true, bool infinite = false, VoidCallback? onFinish, ValueChanged<double>? onChange}) ValueGeneratorComponent

Available on GameComponent, provided by the GameComponentExtensions extension

Used to generate numbers to create your animations or anythings
getAngleFromTarget(GameComponent target) double

Available on GameComponent, provided by the GameComponentExtensions extension

Get angle between this comp to target
getComponentDirectionFromMe(GameComponent comp) Direction

Available on GameComponent, provided by the GameComponentExtensions extension

globalToViewportPosition(Offset position) Offset

Available on GameComponent, provided by the GameComponentExtensions extension

loadCameraParallaxComponent(Iterable<ParallaxData> dataList, {Vector2? baseVelocity, Vector2? velocityMultiplierDelta, ImageRepeat repeat = ImageRepeat.repeatX, Alignment alignment = Alignment.bottomLeft, LayerFill fill = LayerFill.height, Images? images, Vector2? position, Vector2? size, Vector2? scale, double? angle, Anchor? anchor, int? priority, FilterQuality? filterQuality, ComponentKey? key}) Future<ParallaxComponent<FlameGame<World>>>

Available on GameComponent, provided by the GameComponentExtensions extension

loadParallaxComponent(Iterable<ParallaxData> dataList, {Vector2? baseVelocity, Vector2? velocityMultiplierDelta, ImageRepeat repeat = ImageRepeat.repeatX, Alignment alignment = Alignment.bottomLeft, LayerFill fill = LayerFill.height, Images? images, Vector2? position, Vector2? size, Vector2? scale, double? angle, Anchor? anchor, int? priority, FilterQuality? filterQuality, ComponentKey? key}) Future<ParallaxComponent<FlameGame<World>>>

Available on GameComponent, provided by the GameComponentExtensions extension

overlaps(Rect other) bool

Available on GameComponent, provided by the GameComponentExtensions extension

showDamage(double damage, {TextStyle? config, double initVelocityVertical = -5, double initVelocityHorizontal = 1, 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 AttackOriginEnum attackFrom, required Vector2 size, bool withPush = true, double marginFromCenter = 0, Vector2? centerOffset, void onDamage(Attackable attackable)?}) → 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 AttackOriginEnum attackFrom, bool withPush = true, double? sizePush, double? marginFromCenter, Vector2? centerOffset, void onDamage(Attackable attackable)?}) → 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 AttackOriginEnum attackFrom, Vector2? destroySize, Future<SpriteAnimation>? animationDestroy, dynamic id, double speed = 150, bool withDecorationCollision = true, VoidCallback? onDestroy, ShapeHitbox? 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 AttackOriginEnum attackFrom, Vector2? destroySize, dynamic id, double speed = 150, double damage = 1, bool withCollision = true, VoidCallback? onDestroy, ShapeHitbox? 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
viewportPositionToGlobal(Offset position) Offset

Available on GameComponent, provided by the GameComponentExtensions extension