RandomSound class
A random sound.
This sound will be played at a random point on a map, at a random interval.
- Annotations
-
- @JsonSerializable()
Constructors
-
RandomSound({required AssetReference sound, required Point<
double> minCoordinates, required Point<double> maxCoordinates, required int minInterval, required int maxInterval, double minGain = 0.75, double maxGain = 0.75}) -
Create an instance.
const
-
RandomSound.fromJson(Map<
String, dynamic> json) -
Return an instance from JSON.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
maxCoordinates
→ Point<
double> -
The maximum coordinates.
final
- maxGain → double
-
The maximum gain.
final
- maxInterval → int
-
The maximum number of milliseconds between this sound playing.
final
-
minCoordinates
→ Point<
double> -
The minimum coordinates.
final
- minGain → double
-
The minimum gain.
final
- minInterval → int
-
The minimum number of milliseconds between this sound playing.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sound → AssetReference
-
The sound to play.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert an instance to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited