Class TouchingNotification

java.lang.Object
net.demilich.metastone.game.events.TouchingNotification
All Implemented Interfaces:
Serializable, Notification

public class TouchingNotification extends Object implements Notification
An entity is being "touched" by the client.
See Also:
  • Constructor Details

    • TouchingNotification

      public TouchingNotification(int playerId, int entityId, boolean touched)
  • Method Details

    • getSource

      public Entity getSource()
      Description copied from interface: Notification
      For visualization purposes, what is the source of this notification?
      Specified by:
      getSource in interface Notification
      Returns:
      A reference to the entity that is the visualizable source of this notification.
    • getSource

      public Entity getSource(GameContext context)
      Specified by:
      getSource in interface Notification
    • getTargets

      public List<Entity> getTargets(GameContext context, int player)
      Description copied from interface: Notification
      For visualization purposes, what are the targets of this notification?
      Specified by:
      getTargets in interface Notification
      Parameters:
      context - game context
      player - the player
      Returns:
      A reference to the entity that is the visualizable target of this notification.
    • isPowerHistory

      public boolean isPowerHistory()
      Description copied from interface: Notification
      When true, indicates to processors of this notification that it belongs in the power history.
      Specified by:
      isPowerHistory in interface Notification
      Returns:
      true if this notification should be stored in the power history of the game where it occurred.
    • getDescription

      public String getDescription(GameContext context, int playerId)
      Description copied from interface: Notification
      A user-renderable description of what occurred in this notification.
      Specified by:
      getDescription in interface Notification
      Parameters:
      context - the game context
      playerId - the player ID
      Returns:
      a description string
    • getEntityReference

      public EntityReference getEntityReference()
    • isTouched

      public boolean isTouched()
    • getPlayerId

      public int getPlayerId()
    • isClientInterested

      public boolean isClientInterested()
      Description copied from interface: Notification
      Should this notification be sent to the client?
      Specified by:
      isClientInterested in interface Notification
      Returns:
      false by default.