mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-15 12:19:40 +08:00
Add hitbox to PositionComponent (#618)
* Move out collision detection methods * Add possibility to define a hull for PositionComponents * Add example of how to use hull with tapable * Update contains point comment * Fix contains point * Hull should be based on center position * Remove collision detection parts * Added tests * Use percentage of size instead of absolute size * Separate hull from PositionComponent * Clarify hull example * Fix formatting * Override correct method * Use mixin for hitbox * Update changelog * Rename HasHitbox to Hitbox * Clarified names * Center to edge is considered as 1.0 * Fix test * Add spaces within braces * Removed extra spaces in the braces * Add hitbox docs * Fix link * Moved point rotation to Vector2 extension * Render hitbox within extension * Fix rebase * Fix rebase * Fix formatting
This commit is contained in:
@@ -43,7 +43,7 @@ class MyComponent extends PositionComponent with Tapable, HasGameRef {
|
||||
}
|
||||
|
||||
@override
|
||||
bool checkOverlap(Vector2 v) => true;
|
||||
bool containsPoint(Vector2 v) => true;
|
||||
|
||||
@override
|
||||
void onRemove() {
|
||||
|
||||
Reference in New Issue
Block a user