mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 20:13:50 +08:00
Simplify BaseGame interactions
This commit is contained in:
@ -73,12 +73,12 @@ class MyGame extends BaseGame with DoubleTapDetector, TapDetector {
|
||||
components.forEach((c) {
|
||||
if (c is PositionComponent && c.toRect().overlaps(touchArea)) {
|
||||
handled = true;
|
||||
markToRemove(c);
|
||||
remove(c);
|
||||
}
|
||||
});
|
||||
|
||||
if (!handled) {
|
||||
addLater(Square()
|
||||
add(Square()
|
||||
..x = touchArea.left
|
||||
..y = touchArea.top);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user