public class ObjectFactory
extends java.lang.Object
makeObject(atavism.server.objects.SpawnData,atavism.server.engine.OID,atavism.server.math.Point)
.Modifier and Type | Field and Description |
---|---|
protected int |
templateID |
protected java.lang.String |
templateName |
Constructor and Description |
---|
ObjectFactory()
No-arg constructor used by WEObjFactory.
|
ObjectFactory(int templateID)
Create objects using the named template.
|
Modifier and Type | Method and Description |
---|---|
static ObjectFactory |
getFactory(java.lang.String factoryName)
Get registered object factory.
|
int |
getTemplateID()
Get template for creating objects.
|
java.lang.String |
getTemplateName()
Get template for creating objects.
|
ObjectStub |
makeObject(OID instanceOid,
Point loc)
Deprecated.
|
ObjectStub |
makeObject(OID instanceOid,
Template override)
Deprecated.
|
ObjectStub |
makeObject(SpawnData spawnData,
OID instanceOid,
Point loc)
Create object at the given location.
|
ObjectStub |
makeObject(SpawnData spawnData,
OID instanceOid,
Template override)
Create object at the given location.
|
static void |
register(java.lang.String factoryName,
ObjectFactory factory)
Register an object factory.
|
void |
setTemplateID(int templateID)
Set template for creating objects.
|
void |
setTemplateName(java.lang.String templateName)
Set template for creating objects.
|
protected int templateID
protected java.lang.String templateName
public ObjectFactory()
public ObjectFactory(int templateID)
public ObjectStub makeObject(OID instanceOid, Point loc)
public ObjectStub makeObject(OID instanceOid, Template override)
public ObjectStub makeObject(SpawnData spawnData, OID instanceOid, Point loc)
MobManagerPlugin.createObject()
.
Sub-classes should override this method to customize spawned objects.
public ObjectStub makeObject(SpawnData spawnData, OID instanceOid, Template override)
MobManagerPlugin.createObject()
.public int getTemplateID()
public void setTemplateID(int templateID)
public java.lang.String getTemplateName()
public void setTemplateName(java.lang.String templateName)
public static void register(java.lang.String factoryName, ObjectFactory factory)
public static ObjectFactory getFactory(java.lang.String factoryName)