-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Right now, whenever you want a sprite that can do any sort of hit-testing, you have to (1) create a new Bounds and assign to localBounds, (2) assign its width and height (almost always from the image width and height).
It'd be nice to make life easier for the simple and common case, by automatically instantiating this localBounds as soon as you do any operation on the sprite that implies the need for one. So, as soon as you call contains, overlaps , worldBounds, corners, or setCorners; or use it as the argument to some other contains call.
When any of these things happen, if localBounds is null, then initialize it to a new Bounds set to match the current image of the sprite.
Metadata
Metadata
Assignees
Labels
No labels