Package de.gurkenlabs.litiengine.sound
Class SoundPlayback.VolumeControl
java.lang.Object
de.gurkenlabs.litiengine.sound.SoundPlayback.VolumeControl
- All Implemented Interfaces:
Tweenable,AutoCloseable
- Enclosing class:
SoundPlayback
An object for controlling the volume of a
SoundPlayback. Each distinct instance
represents an independent factor contributing to its volume.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()floatget()Gets the value of this volume control.float[]getTweenValues(TweenType tweenType) Gets one or many values from the target object associated to the given tween type.voidset(float value) Sets the value of this volume control.voidsetTweenValues(TweenType tweenType, float[] newValues) This method is called in a Tween's update() method to set the new interpolated values.
-
Method Details
-
get
public float get()Gets the value of this volume control.- Returns:
- The value of this control.
-
set
public void set(float value) Sets the value of this volume control.- Parameters:
value- The value to be set.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getTweenValues
Description copied from interface:TweenableGets one or many values from the target object associated to the given tween type. It is used by the Tween Engine to determine starting values.- Specified by:
getTweenValuesin interfaceTweenable- Parameters:
tweenType- The tween type of this interpolation, determining which values are modified.- Returns:
- The array of current tween values.
-
setTweenValues
Description copied from interface:TweenableThis method is called in a Tween's update() method to set the new interpolated values.- Specified by:
setTweenValuesin interfaceTweenable- Parameters:
tweenType- The tween type of this interpolation, determining which values are modified.newValues- The new values determined by the tween equation.
-