|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatavism.server.objects.Region
public class Region
Regions are bounded areas of the world with zero or more features. Regions are two-dimensional (they have no Y component) and are pinned to the terrain. Several features can be assigned to a region such as sound, light, fog, grass, and water. A region can have multiple features, but only one of a given type. Regions are placed in the world using the WorldEditor tool.
Regions have a name, a boundary (ordered list of points), a set of
region configs, and a set of properties. The region configs describe
the builtin region features applied to the region. The properties
are the NameValue properties defined in the WorldEditor. Custom
region triggers are called when the "onEnter" or "onLeave"
properties are set. See RegionTrigger
.
Nested Class Summary | |
---|---|
static class |
Region.Search
Region search parameters. |
Field Summary | |
---|---|
static java.lang.Integer |
DEFAULT_PRIORITY
|
static ObjectType |
OBJECT_TYPE
Region object type. |
static long |
PROP_ALL
Get all region information (search selection flag). |
static long |
PROP_BOUNDARY
Get the region boundary (search selection flag). |
static long |
PROP_PROPERTIES
Get the region properties (search selection flag). |
Constructor Summary | |
---|---|
Region()
|
|
Region(java.lang.String name)
|
Method Summary | |
---|---|
void |
addConfig(RegionConfig config)
Add a region config (builtin region feature). |
Boundary |
getBoundary()
Get the region boundary. |
RegionConfig |
getConfig(java.lang.String type)
Get the region config by type. |
java.util.Collection<RegionConfig> |
getConfigs()
Get all the region configs. |
java.lang.String |
getName()
Get the region name. |
java.lang.Integer |
getPriority()
Get the region priority. |
java.io.Serializable |
getProperty(java.lang.String key)
Get property value. |
java.util.Map<java.lang.String,java.io.Serializable> |
getPropertyMapRef()
Get the property map. |
void |
setBoundary(Boundary b)
Set the region boundary. |
void |
setName(java.lang.String name)
Set the region name. |
void |
setPriority(java.lang.Integer priority)
Set the region priority. |
void |
setProperties(java.util.Map<java.lang.String,java.io.Serializable> props)
Set the region property map. |
java.io.Serializable |
setProperty(java.lang.String key,
java.io.Serializable value)
Set property value. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.Integer DEFAULT_PRIORITY
public static final long PROP_BOUNDARY
public static final long PROP_PROPERTIES
public static final long PROP_ALL
public static final ObjectType OBJECT_TYPE
Constructor Detail |
---|
public Region()
public Region(java.lang.String name)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void setName(java.lang.String name)
public java.lang.String getName()
public void setPriority(java.lang.Integer priority)
DEFAULT_PRIORITY
.
public java.lang.Integer getPriority()
public void setBoundary(Boundary b)
public Boundary getBoundary()
public void addConfig(RegionConfig config)
public RegionConfig getConfig(java.lang.String type)
public java.util.Collection<RegionConfig> getConfigs()
public java.io.Serializable getProperty(java.lang.String key)
key
- Property name
setProperty(String, Serializable)
public java.io.Serializable setProperty(java.lang.String key, java.io.Serializable value)
key
- Property name.value
- Property value.
public java.util.Map<java.lang.String,java.io.Serializable> getPropertyMapRef()
public void setProperties(java.util.Map<java.lang.String,java.io.Serializable> props)
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |