|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.game.GameEvent
com.tootsville.game.HauntedOrgan
public class HauntedOrgan
| Nested Class Summary | |
|---|---|
private class |
HauntedOrgan.HauntedOrganClickButton
WRITEME edward.winkelman@gmail.com Oct 11, 2010 |
| Field Summary | |
|---|---|
private boolean |
dark
If the room is dark or not |
private long |
lastClicked
Click cooldown so that people can't spam |
private Room |
room
Haunted organ room object |
| Fields inherited from class org.starhope.appius.game.GameEvent |
|---|
freezeTag, gameCode, gameState, players, rooms, scores, scoreWatchRooms |
| Constructor Summary | |
|---|---|
HauntedOrgan(Zone z)
WRITEME edward.winkelman@gmail.com Sep 28, 2010 |
|
| Method Summary | |
|---|---|
void |
acceptGameAction(AbstractUser u,
org.json.JSONObject action)
Broadcast message of a game action taking place |
void |
acceptOutOfBandMessage(AbstractUser sender,
Room inRoom,
org.json.JSONObject body)
Accept an out-of-band communications packet that was broadcast to a room in which this Listener is listening. |
void |
acceptPublicMessage(AbstractUser from,
String message)
Accept a public chat message. |
void |
acceptUserAction(Room r,
AbstractUser u)
User actions (go/do actions) propagate through this channel. |
void |
destroySelf()
Destroy this event — during Zone shutdown usually |
String |
getGameEventPrefix()
Get the prefix to be applied to event types for this game |
long |
getLastClicked()
|
String |
getName()
Return a user-visible, unique name for this class. |
boolean |
isDark()
|
void |
setDark(boolean darkNow)
|
void |
setLastClicked(long thisClicked)
|
| Methods inherited from class org.starhope.appius.game.GameEvent |
|---|
acceptCommand, acceptCommand, acceptGameStateChange, acceptObjectJoinRoom, acceptObjectPartRoom, acceptPublicMessage, acceptUserVariableUpdate, changeGameState, compareTo, decrementScore, disconnect, equals, equals, getCountdownDuration, getEveryone, getGameCode, getGameDuration, getGameShortName, getLeaderBonus, getPlayers, getRoom, getRooms, getScoreWatchRooms, getSpectators, getTimer, getZone, hashCode, incrementScore, propagateGameStateChange, resetPlayers, sendEndEvents, sendStartEvents, tick, toString, updateRoomVars, updateScore, updateScores |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private transient boolean dark
private transient long lastClicked
private final transient Room room
| Constructor Detail |
|---|
public HauntedOrgan(Zone z)
throws NotFoundException,
GameLogicException
z - Zone in which haunted organ is placed
NotFoundException - WRITEME
GameLogicException - WRITEME| Method Detail |
|---|
public void acceptGameAction(AbstractUser u,
org.json.JSONObject action)
RoomListener
u - the senderaction - The game action. The verb is in
action.getString("action").RoomListener.acceptGameAction(org.starhope.appius.user.AbstractUser,
org.json.JSONObject)
public void acceptOutOfBandMessage(AbstractUser sender,
Room inRoom,
org.json.JSONObject body)
RoomListener
sender - The sender of the OOB messageinRoom - The room in which the OOB message is being broadcastbody - A JSON object containing the OOB message. The
contents of this message are not constrained.RoomListener.acceptOutOfBandMessage(org.starhope.appius.user.AbstractUser,
org.starhope.appius.game.Room, org.json.JSONObject)
public void acceptPublicMessage(AbstractUser from,
String message)
RoomListener
from - The speakermessage - The spoken text or /emoteRoomListener.acceptPublicMessage(org.starhope.appius.user.AbstractUser,
java.lang.String)
public void acceptUserAction(Room r,
AbstractUser u)
RoomListener
r - the room in which the user is taking an actionu - the user taking an actionRoomListener.acceptUserAction(org.starhope.appius.game.Room,
org.starhope.appius.user.AbstractUser)public void destroySelf()
GameEvent
destroySelf in class GameEventGameEvent.destroySelf()public String getGameEventPrefix()
GameEvent
getGameEventPrefix in class GameEventGameEvent.getGameEventPrefix()public long getLastClicked()
public String getName()
HasName
HasName.getName()public boolean isDark()
public void setDark(boolean darkNow)
darkNow - the dark to setpublic void setLastClicked(long thisClicked)
thisClicked - the lastClicked to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||