public class SpotSceneDirector extends com.threerings.presents.client.BasicDirector implements SpotCodes, com.threerings.presents.dobj.Subscriber<com.threerings.presents.dobj.DObject>, com.threerings.presents.dobj.AttributeChangeListener
CLUSTER_CHAT_TYPE, CLUSTER_FULL, INVALID_LOCATION, LOCATION_OCCUPIED, NO_SUCH_CLUSTER, NO_SUCH_PORTALBROADCAST_ACCESS, BROADCAST_MODE, CHAT_ACCESS, CHAT_CHANNEL_NOTIFICATION, CHAT_NOTIFICATION, DEFAULT_IDLE_TIME, DEFAULT_MODE, EMOTE_MODE, IDLE_TIME_KEY, LAST_MODE, PLACE_CHAT_TYPE, SHOUT_MODE, SUCCESS, THINK_MODE, USER_CHAT_TYPE, USER_DISCONNECTED, USER_NOT_ONLINE, XLATE_MODESSCENE_UPDATE, WHIRLED_GROUP| Constructor and Description |
|---|
SpotSceneDirector(WhirledContext ctx,
com.threerings.crowd.client.LocationDirector locdir,
SceneDirector scdir)
Creates a new spot scene director with the specified context and which will cooperate with
the supplied scene director.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attributeChanged(com.threerings.presents.dobj.AttributeChangedEvent event) |
void |
changeLocation(Location loc,
ResultListener<Location> listener)
Issues a request to change our location within the scene to the specified location.
|
void |
clientDidLogoff(com.threerings.presents.client.Client client) |
void |
clientDidLogon(com.threerings.presents.client.Client client) |
void |
clientObjectDidChange(com.threerings.presents.client.Client client) |
Location |
getIntendedLocation()
Returns our current location unless we have a location change pending, in which case our
pending location is returned.
|
void |
joinCluster(int froid,
ResultListener<Void> listener)
Issues a request to join the cluster associated with the specified user (starting one if
necessary).
|
void |
objectAvailable(com.threerings.presents.dobj.DObject object) |
boolean |
requestClusterSpeak(String message)
Sends a chat message to the other users in the cluster to which the location that we
currently occupy belongs.
|
boolean |
requestClusterSpeak(String message,
byte mode)
Sends a chat message to the other users in the cluster to which the location that we
currently occupy belongs.
|
void |
requestFailed(int oid,
com.threerings.presents.dobj.ObjectAccessException cause) |
void |
setChatDirector(com.threerings.crowd.chat.client.ChatDirector chatdir)
Configures this spot scene director with a chat director, with which it will coordinate to
implement cluster chatting.
|
boolean |
traversePortal(int portalId)
Requests that this client move to the location specified by the supplied portal id.
|
boolean |
traversePortal(int portalId,
ResultListener<com.threerings.crowd.data.PlaceConfig> rl)
Requests that this client move to the location specified by the supplied portal id.
|
public SpotSceneDirector(WhirledContext ctx, com.threerings.crowd.client.LocationDirector locdir, SceneDirector scdir)
ctx - the active client context.locdir - the location director with which we will be cooperating.scdir - the scene director with which we will be cooperating.public void setChatDirector(com.threerings.crowd.chat.client.ChatDirector chatdir)
public Location getIntendedLocation()
public boolean traversePortal(int portalId)
public boolean traversePortal(int portalId,
ResultListener<com.threerings.crowd.data.PlaceConfig> rl)
public void changeLocation(Location loc, ResultListener<Location> listener)
loc - the new location to which to move.listener - will be notified of success or failure. Most client entities find out about
location changes via changes to the occupant info data, but the initiator of a location
change request can be notified of its success or failure, primarily so that it can act in
anticipation of a successful location change (like by starting a sprite moving toward the
new location), but backtrack if it finds out that the location change failed.public void joinCluster(int froid,
ResultListener<Void> listener)
froid - the bodyOid of another user; the calling user will be made to join the target
user's cluster.listener - will be notified of success or failure.public boolean requestClusterSpeak(String message)
public boolean requestClusterSpeak(String message, byte mode)
public void objectAvailable(com.threerings.presents.dobj.DObject object)
objectAvailable in interface com.threerings.presents.dobj.Subscriber<com.threerings.presents.dobj.DObject>public void requestFailed(int oid,
com.threerings.presents.dobj.ObjectAccessException cause)
requestFailed in interface com.threerings.presents.dobj.Subscriber<com.threerings.presents.dobj.DObject>public void attributeChanged(com.threerings.presents.dobj.AttributeChangedEvent event)
attributeChanged in interface com.threerings.presents.dobj.AttributeChangeListenerpublic void clientDidLogon(com.threerings.presents.client.Client client)
clientDidLogon in interface com.threerings.presents.client.SessionObserverclientDidLogon in class com.threerings.presents.client.BasicDirectorpublic void clientObjectDidChange(com.threerings.presents.client.Client client)
clientObjectDidChange in interface com.threerings.presents.client.SessionObserverclientObjectDidChange in class com.threerings.presents.client.BasicDirectorpublic void clientDidLogoff(com.threerings.presents.client.Client client)
clientDidLogoff in interface com.threerings.presents.client.SessionObserverclientDidLogoff in class com.threerings.presents.client.BasicDirectorCopyright © 2015. All rights reserved.