From a1b02a7f18201587fd5967f5f33d865d9c1db698 Mon Sep 17 00:00:00 2001 From: Luan Nico Date: Tue, 1 Jan 2019 22:46:40 -0200 Subject: [PATCH] improved docs --- lib/animation.dart | 8 ++++---- lib/audio_pool.dart | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/animation.dart b/lib/animation.dart index 9abac0235..f1ca4c114 100644 --- a/lib/animation.dart +++ b/lib/animation.dart @@ -1,14 +1,14 @@ import 'sprite.dart'; -/// Represents a single animation frame +/// Represents a single animation frame. class Frame { - /// The [Sprite] to be displayed + /// The [Sprite] to be displayed. Sprite sprite; - /// The duration to display it, in seconds + /// The duration to display it, in seconds. double stepTime; - /// Create based on the parameters + /// Create based on the parameters. Frame(this.sprite, this.stepTime); } diff --git a/lib/audio_pool.dart b/lib/audio_pool.dart index 9c58c3734..b184eabf5 100644 --- a/lib/audio_pool.dart +++ b/lib/audio_pool.dart @@ -6,6 +6,10 @@ import 'package:synchronized/synchronized.dart'; typedef void Stoppable(); +/// An AudioPool is a provider of AudioPlayers that leaves them pre-loaded to minimize delays. +/// +/// All AudioPlayers loaded are for the same [sound]. If you want multiple sounds use multiple [AudioPool]. +/// Use this class if you'd like have extremely quick firing, repetitive and simultaneous sounds, like shooting a laser in a fast-paced spaceship game. class AudioPool { AudioCache cache; Map currentPlayers = {};