|
|||||||||
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.NamedPropertyClass
atavism.server.objects.Entity
atavism.server.objects.AOObject
public class AOObject
AOObject is a properties object, it does not contain 'logic' when you set a property, there are no callbacks which will then notify other players
Nested Class Summary | |
---|---|
static class |
AOObject.StateMap
|
Field Summary | |
---|---|
static java.lang.String |
aoidKey
this is the master account id for this user (unique to each register atavism user) |
static java.lang.String |
dcKey
|
static java.lang.String |
perceiverKey
|
static java.lang.String |
stateMapKey
|
static java.util.concurrent.locks.Lock |
transferLock
use this global object to synchronize all object transfers. if you drop and object, pick up an object, destory an object, trade an object, etc, you must grab this lock to make sure there is no race condition. eg, someone sees that the obj is "free" on the ground THEN picks it up. there is a race condition there |
static java.lang.String |
wnodeKey
|
Fields inherited from class atavism.server.objects.Entity |
---|
log, staticLock, subObjectNamespacesInt, transientPropertyKeys, type |
Fields inherited from class atavism.server.objects.NamedPropertyClass |
---|
lock, name |
Constructor Summary | |
---|---|
AOObject()
|
|
AOObject(OID oid)
|
|
AOObject(java.lang.String name)
|
Method Summary | |
---|---|
OID |
atavismID()
|
void |
atavismID(OID id)
sets the atavismID for this user. |
BasicWorldNode |
baseWorldNode()
returns a newly-created BasicWorldNode, with loc/dir/orient from the object's world node |
DisplayContext |
displayContext()
|
void |
displayContext(DisplayContext dc)
|
static java.util.Collection<AOObject> |
getAllObjects()
returns all entities in this server |
Point |
getCurrentLoc()
|
AOVector |
getDirection()
|
InterpolatedWorldNode.InterpolatedDirLocOrientTime |
getDirLocOrientTime()
Returns all the values from the interpolated world node atomically |
Point |
getLoc()
helper function - returns the location of this object by calling into the world node |
OID |
getMasterOid()
|
static AOObjectCreateHook |
getObjCreateHook()
|
static AOObject |
getObject(OID oid)
|
Quaternion |
getOrientation()
|
ObjState |
getState(java.lang.String s)
|
boolean |
isItem()
|
boolean |
isLight()
|
boolean |
isMob()
|
boolean |
isStructure()
|
boolean |
isUser()
|
MobilePerceiver<WMWorldNode> |
perceiver()
|
void |
perceiver(MobilePerceiver<WMWorldNode> p)
|
PermissionCallback |
permissionCallback()
|
void |
permissionCallback(PermissionCallback cb)
sets the permissioncallback, which gets called whenever something is trying to 'access' this object either by picking it up, dropping it, trading, etc. |
static java.lang.Object |
readObject(java.io.ObjectInput in)
|
static void |
registerObjCreateHook(AOObjectCreateHook hook)
|
AOVector |
scale()
|
void |
scale(AOVector scale)
sets the scale of this object (how much bigger to make it) |
void |
scale(float scale)
|
void |
sendEvent(Event event)
|
ObjState |
setState(java.lang.String state,
ObjState obj)
sets a state for the object. all states set here are transmitted to the client. examples would be when the player is dead. |
java.lang.String |
toString()
Returns the string describing this entity, useful for logging. |
WorldNode |
worldNode()
returns the object's world node |
void |
worldNode(WorldNode worldNode)
sets which world node is associated with this object. |
static void |
writeObject(java.io.ObjectOutput out,
java.lang.Object obj)
helper method which can handle writing a null object to the output stream. it first writes whether the obj is null, followed by the obj if it isnt null.. otherwise doesnt write the obj |
static void |
writeString(java.io.ObjectOutput out,
java.lang.String string)
helper method that writes a null string as an empty string |
Methods inherited from class atavism.server.objects.Entity |
---|
addSubObjectNamespace, equals, equals, getLock, getNamespace, getOid, getPersistenceFlag, getProperty, getSubObjectNamespaces, getSubObjectNamespacesInt, getTransientDataRef, getType, hashCode, hasSubObjectNamespace, isDeleted, registerTransientPropertyKey, removeProperty, removeSubObjectNamespace, setDeleted, setNamespace, setOid, setPersistenceFlag, setProperty, setSubObjectNamespaces, setSubObjectNamespacesInt, setType, toBytes, unregisterTransientPropertyKey |
Methods inherited from class atavism.server.objects.NamedPropertyClass |
---|
getBooleanProperty, getIntProperty, getName, getPropertyMap, getPropertyMapRef, getStringProperty, lock, modifyIntProperty, setName, setPropertyMap, setupTransient, unlock |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String stateMapKey
public static final java.lang.String wnodeKey
public static final java.lang.String perceiverKey
public static final java.lang.String aoidKey
public static final java.lang.String dcKey
public static java.util.concurrent.locks.Lock transferLock
Constructor Detail |
---|
public AOObject()
public AOObject(java.lang.String name)
public AOObject(OID oid)
Method Detail |
---|
public OID getMasterOid()
public boolean isMob()
public boolean isItem()
public boolean isLight()
public boolean isUser()
public boolean isStructure()
public java.lang.String toString()
Entity
toString
in class Entity
public ObjState setState(java.lang.String state, ObjState obj)
public ObjState getState(java.lang.String s)
public void sendEvent(Event event)
public WorldNode worldNode()
public void worldNode(WorldNode worldNode)
public BasicWorldNode baseWorldNode()
public Point getLoc()
public Point getCurrentLoc()
public Quaternion getOrientation()
public AOVector getDirection()
public InterpolatedWorldNode.InterpolatedDirLocOrientTime getDirLocOrientTime()
public MobilePerceiver<WMWorldNode> perceiver()
public void perceiver(MobilePerceiver<WMWorldNode> p)
public OID atavismID()
public void atavismID(OID id)
public void displayContext(DisplayContext dc)
public DisplayContext displayContext()
public void scale(float scale)
public void scale(AOVector scale)
public AOVector scale()
public static void registerObjCreateHook(AOObjectCreateHook hook)
public static AOObjectCreateHook getObjCreateHook()
public void permissionCallback(PermissionCallback cb)
PermissionCallback
public PermissionCallback permissionCallback()
public static void writeObject(java.io.ObjectOutput out, java.lang.Object obj) throws java.io.IOException
java.io.IOException
public static java.lang.Object readObject(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public static void writeString(java.io.ObjectOutput out, java.lang.String string) throws java.io.IOException
java.io.IOException
public static java.util.Collection<AOObject> getAllObjects()
public static AOObject getObject(OID oid)
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |