mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-03 20:36:31 +08:00
improved docs
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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<String, AudioPlayer> currentPlayers = {};
|
||||
|
||||
Reference in New Issue
Block a user