that was supposed to be an flxobject ok (#908)

* mouseOverlaps

* This makes more sense yeah

thinking of not even allowing disjointed overlap checks
keeping it for now

* oops forgot to define that var as flxcamera

* h
This commit is contained in:
Bitto
2026-02-20 20:15:53 +01:00
committed by GitHub
parent 370d5ede81
commit 3e084397a8
+2 -2
View File
@@ -1030,11 +1030,11 @@ final class CoolUtil
/**
* Returns if the mouse is overlapping the sprite on a given camera, taking the camera's position, scroll and zoom into account.
*
* @param sprite Any `FlxBasic`
* @param sprite Any `FlxObject`
* @param camera The camera you want to check overlap on. Uses the sprite's camera by default.
* @return Bool
*/
public static function mouseOverlaps(sprite:FlxBasic, ?camera:FlxCamera) {
public static function mouseOverlaps(sprite:FlxObject, ?camera:FlxCamera) {
var camToCheck:FlxCamera = camera ?? sprite.camera;
var posthing:FlxPoint = FlxG.mouse.getWorldPosition(camToCheck);