Record Class AudioStopData
java.lang.Object
java.lang.Record
com.csse3200.game.cutscene.models.object.actiondata.AudioStopData
- Record Components:
bus
- The audio bus of the soundfadeMs
- The time it takes for the music to fade out (0 for instant)await
- Wait for fade completion before continuing
- All Implemented Interfaces:
ActionData
public record AudioStopData(AudioBus bus, int fadeMs, boolean await)
extends Record
implements ActionData
Stores the data for the audio.stop event
-
Constructor Summary
ConstructorsConstructorDescriptionAudioStopData
(AudioBus bus, int fadeMs, boolean await) Creates an instance of aAudioStopData
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
await()
Returns the value of theawait
record component.bus()
Returns the value of thebus
record component.final boolean
Indicates whether some other object is "equal to" this one.int
fadeMs()
Returns the value of thefadeMs
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
bus
Returns the value of thebus
record component.- Returns:
- the value of the
bus
record component
-
fadeMs
public int fadeMs()Returns the value of thefadeMs
record component.- Returns:
- the value of the
fadeMs
record component
-
await
public boolean await()Returns the value of theawait
record component.- Returns:
- the value of the
await
record component
-