MovementExtensions extension

on

Methods

followComponent(GameComponent target, double dt, {required dynamic closeComponent(GameComponent), double margin = 10}) bool

Available on Movement, provided by the MovementExtensions extension

This method move this component to target Need use Movement mixin. Method that bo used in update method. return true if moved.
positionsItselfAndKeepDistance(GameComponent target, {required dynamic positioned(GameComponent), double radiusVision = 32, double? minDistanceFromPlayer, bool runOnlyVisibleInScreen = true}) bool

Available on Movement, provided by the MovementExtensions extension

Checks whether the component is within range. If so, position yourself and keep your distance. Method that bo used in update method.