Small changes to the cluster services: cluster information is published in

the scene object; clusters are centered within their group of occupants; a
player must start a cluster with another player rather than by themselves.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2278 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-02-13 21:55:22 +00:00
parent 24b6d1fcec
commit 2d5d1c56a8
5 changed files with 204 additions and 34 deletions
@@ -0,0 +1,38 @@
//
// $Id: Cluster.java,v 1.1 2003/02/13 21:55:22 mdb Exp $
package com.threerings.whirled.spot.data;
import com.threerings.presents.dobj.DSet;
/**
* Contains information on clusters.
*/
public class Cluster
implements DSet.Entry
{
/** A unique identifier for this cluster (also the distributed object
* id of the cluster chat object). */
public int clusterOid;
/** The x-coordinate of the cluster in the scene. */
public int x;
/** The y-coordinate of the cluster in the scene. */
public int y;
/** The number of occupants in this cluster. */
public int occupants;
// documentation inherited
public Comparable getKey ()
{
if (_key == null) {
_key = new Integer(clusterOid);
}
return _key;
}
/** Used for {@link #geyKey}. */
protected transient Integer _key;
}