mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
RemoveEffect (#1063)
* Added FlameAnimationController class * Added MainAnimationController class * Update doc comments * formatting * rename MainAnimationController * Added tests for StandardAnimationController * Added more tests * comment * Added changelog note * Export StandardAnimationController * formatting * Use a default for 'curve' parameter * rename onsetDelay -> startDelay * Added Transofm2DEffect * Added EffectComponent * Added .transform getter * formatting * Rename EffectComponent -> Effect * Add documentation for the Effect class * minor * Added a test for Effect class * Adding tests for removeOnFinish * Adding tests for onStart and onFinish * Also check the effect after reset * Fix-up merge * formatting * added doc-comments * changelog note * Added test for transform2DEffect * Adjusted comments * Make PositionComponent._transform public * change changelog * Added SimpleEffectController * Added DestroyEffect * Changelog note * Rename DestroyEffect -> RemoveEffect * Added example for RemoveEffect * flutter format * Move description of the RemoveEffectExample game * move the description again * minor
This commit is contained in:
@ -18,4 +18,11 @@ class CircleComponent extends PositionComponent {
|
||||
super.render(canvas);
|
||||
canvas.drawCircle(Offset(radius, radius), radius, paint);
|
||||
}
|
||||
|
||||
@override
|
||||
bool containsPoint(Vector2 point) {
|
||||
final local = absoluteToLocal(point);
|
||||
final center = Vector2.all(radius);
|
||||
return local.distanceToSquared(center) <= radius * radius;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user