Class TouchingNotification
java.lang.Object
net.demilich.metastone.game.events.TouchingNotification
- All Implemented Interfaces:
Serializable,Notification
An entity is being "touched" by the client.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDescription(GameContext context, int playerId) A user-renderable description of what occurred in this notification.intFor visualization purposes, what is the source of this notification?getSource(GameContext context) getTargets(GameContext context, int player) For visualization purposes, what are the targets of this notification?booleanShould this notification be sent to the client?booleanWhen true, indicates to processors of this notification that it belongs in the power history.boolean
-
Constructor Details
-
TouchingNotification
public TouchingNotification(int playerId, int entityId, boolean touched)
-
-
Method Details
-
getSource
Description copied from interface:NotificationFor visualization purposes, what is the source of this notification?- Specified by:
getSourcein interfaceNotification- Returns:
- A reference to the entity that is the visualizable source of this notification.
-
getSource
- Specified by:
getSourcein interfaceNotification
-
getTargets
Description copied from interface:NotificationFor visualization purposes, what are the targets of this notification?- Specified by:
getTargetsin interfaceNotification- Parameters:
context- game contextplayer- the player- Returns:
- A reference to the entity that is the visualizable target of this notification.
-
isPowerHistory
public boolean isPowerHistory()Description copied from interface:NotificationWhen true, indicates to processors of this notification that it belongs in the power history.- Specified by:
isPowerHistoryin interfaceNotification- Returns:
trueif this notification should be stored in the power history of the game where it occurred.
-
getDescription
Description copied from interface:NotificationA user-renderable description of what occurred in this notification.- Specified by:
getDescriptionin interfaceNotification- Parameters:
context- the game contextplayerId- the player ID- Returns:
- a description string
-
getEntityReference
-
isTouched
public boolean isTouched() -
getPlayerId
public int getPlayerId() -
isClientInterested
public boolean isClientInterested()Description copied from interface:NotificationShould this notification be sent to the client?- Specified by:
isClientInterestedin interfaceNotification- Returns:
falseby default.
-