mirror of
				https://github.com/flame-engine/flame.git
				synced 2025-11-04 04:47:13 +08:00 
			
		
		
		
	improved docs
This commit is contained in:
		@ -1,14 +1,14 @@
 | 
				
			|||||||
import 'sprite.dart';
 | 
					import 'sprite.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Represents a single animation frame
 | 
					/// Represents a single animation frame.
 | 
				
			||||||
class Frame {
 | 
					class Frame {
 | 
				
			||||||
  /// The [Sprite] to be displayed
 | 
					  /// The [Sprite] to be displayed.
 | 
				
			||||||
  Sprite sprite;
 | 
					  Sprite sprite;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// The duration to display it, in seconds
 | 
					  /// The duration to display it, in seconds.
 | 
				
			||||||
  double stepTime;
 | 
					  double stepTime;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Create based on the parameters
 | 
					  /// Create based on the parameters.
 | 
				
			||||||
  Frame(this.sprite, this.stepTime);
 | 
					  Frame(this.sprite, this.stepTime);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,10 @@ import 'package:synchronized/synchronized.dart';
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
typedef void Stoppable();
 | 
					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 {
 | 
					class AudioPool {
 | 
				
			||||||
  AudioCache cache;
 | 
					  AudioCache cache;
 | 
				
			||||||
  Map<String, AudioPlayer> currentPlayers = {};
 | 
					  Map<String, AudioPlayer> currentPlayers = {};
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user