Record Class DialogueShowData
java.lang.Object
java.lang.Record
com.csse3200.game.cutscene.models.object.actiondata.DialogueShowData
- Record Components:
character
- The character that "says" the texttext
- The text that is being "said"await
- Wait for the text to finish displaying before continuing
- All Implemented Interfaces:
ActionData
public record DialogueShowData(Character character, String text, boolean await)
extends Record
implements ActionData
Stores the data for the dialogue.show event
-
Constructor Summary
ConstructorsConstructorDescriptionDialogueShowData
(Character character, String text, boolean await) Creates an instance of aDialogueShowData
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
await()
Returns the value of theawait
record component.Returns the value of thecharacter
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.text()
Returns the value of thetext
record component.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 '=='. -
character
Returns the value of thecharacter
record component.- Returns:
- the value of the
character
record component
-
text
Returns the value of thetext
record component.- Returns:
- the value of the
text
record component
-
await
public boolean await()Returns the value of theawait
record component.- Returns:
- the value of the
await
record component
-