MovementExtensions extension

on

Methods

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

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.
positionsItselfAndKeepDistance(GameComponent target, {required dynamic positioned(GameComponent), double radiusVision = 32, double? minDistanceFromPlayer, bool runOnlyVisibleInScreen = true}) → void

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.