Interface MessageData
- All Known Implementing Classes:
FirstContact
,FlagGotDropped
,FlagGotPickedUp
,FlagReturnedInBase
,GameConfig
,GameState
,GotHit
,Hit
,MessageError
,MoveTankCommand
,PlayerDied
,PlayerRespawned
,RotateTankBodyCommand
,RotateTankTurretCommand
,ShootCommand
,SimpleTextMessage
,StartGameConfig
,SuccessfullyJoinedLobby
,TeamScored
public interface MessageData
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
applyBeforeSend
(InternalGameWorld world) Applies to the world before sendingdefault void
Applies to the world when added to the queuedefault boolean
applyOnReceive
(InternalGameWorld world) Applies to the world when receiveddefault boolean
isUnique()
Determines if the message is unique.
-
Method Details
-
applyOnReceive
Applies to the world when received- Parameters:
world
- the world- Returns:
- if true, we add it to the Input Queue, so Bots can read them. If false, we don't.
-
applyBeforeSend
Applies to the world before sending- Parameters:
world
- the world
-
applyOnAddingToQueue
Applies to the world when added to the queue- Parameters:
world
- the world
-
isUnique
default boolean isUnique()Determines if the message is unique. If it is unique, before sending all messages to the server at the end of the tick, we remove all other messages of the same type. So only the latest message of this type is sent.- Returns:
- if the message is unique
-