|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.maps.Broadcast
Handles the standard broadcasting commands, for broadcasting a message to all players (and monsters that are listening) nearby.
Field Summary | |
static int |
DEFAULT_BROADCAST_RADIUS
|
Constructor Summary | |
Broadcast()
|
Method Summary | |
static java.util.List |
broadcast(GameObject obj,
java.lang.String msg)
Broadcast message to everyone in sight. |
static java.util.List |
broadcast(GameObject obj,
java.lang.String msg,
byte style)
Broadcast message to everyone in sight. |
static java.util.List |
broadcast(GameObject obj,
java.lang.String message,
Predicate p)
Broadcast message to everyone in sight. |
static java.util.List |
broadcast(GameObject obj,
java.lang.String msg,
Predicate p,
byte style)
Sends the specified message to everyone in sight. |
static java.util.List |
broadcast(GameObject src,
java.lang.String msg,
Predicate p,
byte style,
int radius)
Sends the specified message to everyone in sight. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_BROADCAST_RADIUS
Constructor Detail |
public Broadcast()
Method Detail |
public static java.util.List broadcast(GameObject obj, java.lang.String msg)
obj
- the object doing the broadcastingmsg
- the message to broadcast - if null, returns
an empty list
public static java.util.List broadcast(GameObject obj, java.lang.String msg, byte style)
obj
- the object doing the broadcastingmsg
- the message to sendstyle
- the Kernel.TextStyle to use
public static java.util.List broadcast(GameObject obj, java.lang.String message, Predicate p)
obj
- the object doing the broadcastingmessage
- the message to broadcast - if null, returns
the empty listp
- a Predicate to match the players and monsters
to hear the messagepublic static java.util.List broadcast(GameObject obj, java.lang.String msg, Predicate p, byte style)
obj
- the object doing the broadcastingmsg
- the message to sendp
- an optional predicate used to filter the recipients.
If p is false for a potential recipient, the message is not
delivered to that recipient.style
- the Kernel.TextStyle to use
public static java.util.List broadcast(GameObject src, java.lang.String msg, Predicate p, byte style, int radius)
src
- the object doing the broadcastingmsg
- the message to sendp
- an optional predicate used to filter the recipients.
If p is false for a potential recipient, the message is not
delivered to that recipient. (I.e. if p is non-null, then
messages will only be delivered to recipients for which the
predicate returns true.)style
- the Kernel.TextStyle to useradius
- the radius around the player to broadcast to.
Includes the player's location, so a radius of 7 would cover
their whole view.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |