chore: format

fix: doc/example/particles/readme, attempt to embed webm preview
fix: doc/example/particles better sample for chaining
refactor: Particle, dropped duration support
This commit is contained in:
Ivan Cherepanov
2019-11-28 23:02:28 +03:00
parent ff425afa26
commit 0f98a8542d
22 changed files with 135 additions and 87 deletions

View File

@ -7,7 +7,7 @@ import 'component.dart';
/// Base container for [Particle] instances to be attach
/// to a [Component] tree. Could be added either to [BaseGame]
/// or [ComposedComponent] as needed.
/// or [ComposedComponent] as needed.
/// Proxies [Component] lifecycle hooks to nested [Particle].
class ParticleComponent extends Component {
Particle particle;
@ -17,12 +17,15 @@ class ParticleComponent extends Component {
});
/// This [Component] will be automatically destroyed
/// as soon as
/// as soon as
@override
bool destroy() => particle.destroy();
/// Returns progress of the child [Particle]
/// so could be used by external code for something
double get progress => particle.progress;
/// Passes rendering chain down to the inset
/// Passes rendering chain down to the inset
/// [Particle] within this [Component].
@override
void render(Canvas canvas) {