PlayerExtensions extension

on

Methods

seeEnemy({required dynamic observed(List<Enemy>), VoidCallback? notObserved, double radiusVision = 32, double? visionAngle, double? angle}) PolygonShape?
This method we notify when detect the enemy when enter in radiusVision configuration Method that bo used in update method. visionAngle in radians angle in radians. is automatically picked up using the component's direction.
simpleAttackMelee({Future<SpriteAnimation>? animationRight, required double damage, required Vector2 size, dynamic id, Direction? direction, bool withPush = true, double? sizePush, Vector2? centerOffset, double? marginFromCenter, bool diagonalEnabled = true}) → void
simpleAttackRange({required Future<SpriteAnimation> animationRight, Future<SpriteAnimation>? animationDestroy, required Vector2 size, Vector2? destroySize, dynamic id, double speed = 150, double damage = 1, Direction? direction, bool withCollision = true, bool diagonalEnabled = true, VoidCallback? onDestroy, ShapeHitbox? collision, LightingConfig? lightingConfig}) → void