Atavism Version 2018.1AGIS API

atavism.agis.objects
Class VolumetricRegion

java.lang.Object
  extended by atavism.agis.objects.VolumetricRegion
All Implemented Interfaces:
MessageCallback, java.io.Serializable, java.lang.Runnable

public class VolumetricRegion
extends java.lang.Object
implements java.io.Serializable, MessageCallback, java.lang.Runnable

A ResourceNode is an object players can gather items from. The ResourceNode randomly generates its items upon spawn from the items it has been given and allows the player to gather them if they meet the requirements.

Author:
Andrew Harrison
See Also:
Serialized Form

Nested Class Summary
 class VolumetricRegion.ResourceNodeEntity
          Sub-class needed for the interpolated world node so a perceiver can be created.
 
Field Summary
 
Fields inherited from interface atavism.msgsys.MessageCallback
NO_FLAGS, RESPONSE_EXPECTED
 
Constructor Summary
VolumetricRegion()
           
VolumetricRegion(int id, AOVector loc, OID instanceOID)
           
 
Method Summary
 void activate()
          Subscribes the instance to receive certain relevant messages that are sent to the world object created by this instance.
 void addPlayer(OID playerOid)
          Add a player to the update list for this ResourceNode.
 void addShape(java.lang.String shapeType, AOVector loc, AOVector loc2, Quaternion orient, float size1, float size2, float size3)
           
 java.lang.String getActionData1()
           
 java.lang.String getActionData2()
           
 java.lang.String getActionData3()
           
 int getActionID()
           
 boolean getActive()
           
 int getID()
           
 OID getInstanceOID()
           
 AOVector getLoc()
           
 java.lang.String getName()
           
 OID getObjectOID()
           
 java.util.HashMap<java.lang.String,java.io.Serializable> getProps()
           
 float getReactionRadius()
           
 java.lang.String getRegionType()
           
 float getSize1()
           
 void handleMessage(Message msg, int flags)
          Deals with the messages the instance has picked up.
 void processUpdateMsg(WorldManagerClient.UpdateWorldNodeMessage msg)
           
 void removePlayer(OID playerOid)
          Removes a player from the ResourceNode.
 void run()
           
 void setActionData1(java.lang.String actionData1)
           
 void setActionData2(java.lang.String actionData2)
           
 void setActionData3(java.lang.String actionData3)
           
 void setActionID(int actionID)
           
 void setActive(boolean active)
           
 void setID(int id)
           
 void setInstanceOID(OID instanceOID)
           
 void setLoc(AOVector loc)
           
 void setName(java.lang.String name)
           
 void setObjectOID(OID objectOID)
           
 void setProps(java.util.HashMap<java.lang.String,java.io.Serializable> props)
           
 void setRegionType(java.lang.String regionType)
           
 void setSize1(float size1)
           
 void spawn()
          Spawn a world object for the claim.
 void spawn(OID instanceOID)
          An external call to spawn a world object for the claim.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VolumetricRegion

public VolumetricRegion()

VolumetricRegion

public VolumetricRegion(int id,
                        AOVector loc,
                        OID instanceOID)
Method Detail

addShape

public void addShape(java.lang.String shapeType,
                     AOVector loc,
                     AOVector loc2,
                     Quaternion orient,
                     float size1,
                     float size2,
                     float size3)

activate

public void activate()
Subscribes the instance to receive certain relevant messages that are sent to the world object created by this instance.


handleMessage

public void handleMessage(Message msg,
                          int flags)
Deals with the messages the instance has picked up.

Specified by:
handleMessage in interface MessageCallback
Parameters:
msg - Message sent from other agent.
flags - Bitwise OR of MessageCallback.NO_FLAGS, MessageCallback.RESPONSE_EXPECTED.

processUpdateMsg

public void processUpdateMsg(WorldManagerClient.UpdateWorldNodeMessage msg)

spawn

public void spawn(OID instanceOID)
An external call to spawn a world object for the claim.

Parameters:
instanceOID -

spawn

public void spawn()
Spawn a world object for the claim.


addPlayer

public void addPlayer(OID playerOid)
Add a player to the update list for this ResourceNode. The player will receive data about the node and any updates that occur.

Parameters:
playerOID -

removePlayer

public void removePlayer(OID playerOid)
Removes a player from the ResourceNode. They will no longer receive updates.

Parameters:
playerOID -
removeLastID -

run

public void run()
Specified by:
run in interface java.lang.Runnable

getReactionRadius

public float getReactionRadius()

getID

public int getID()

setID

public void setID(int id)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getLoc

public AOVector getLoc()

setLoc

public void setLoc(AOVector loc)

getProps

public java.util.HashMap<java.lang.String,java.io.Serializable> getProps()

setProps

public void setProps(java.util.HashMap<java.lang.String,java.io.Serializable> props)

getInstanceOID

public OID getInstanceOID()

setInstanceOID

public void setInstanceOID(OID instanceOID)

getObjectOID

public OID getObjectOID()

setObjectOID

public void setObjectOID(OID objectOID)

getSize1

public float getSize1()

setSize1

public void setSize1(float size1)

getRegionType

public java.lang.String getRegionType()

setRegionType

public void setRegionType(java.lang.String regionType)

getActionID

public int getActionID()

setActionID

public void setActionID(int actionID)

getActionData1

public java.lang.String getActionData1()

setActionData1

public void setActionData1(java.lang.String actionData1)

getActionData2

public java.lang.String getActionData2()

setActionData2

public void setActionData2(java.lang.String actionData2)

getActionData3

public java.lang.String getActionData3()

setActionData3

public void setActionData3(java.lang.String actionData3)

getActive

public boolean getActive()

setActive

public void setActive(boolean active)


Copyright © 2018 Dragonsan Studios Sp. z o.o.