public class DefaultObjectCreationProcess extends SimplePropertyObject implements ISpaceProcess
type
: The type of the object to be created (String, required).
properties
: The initial properties of the object (Map, optional).
condition
: A condition to enable/disable object creation (boolean, optional).
tickrate
: Number of ticks between object creation (double, optional, 0 == off).
timerate
: Number of milliseconds between object creation (double, optional, 0 == off).
$space
and to the clock service using $clock
.ID
Constructor and Description |
---|
DefaultObjectCreationProcess()
Create a new create food process.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(IClockService clock,
IEnvironmentSpace space)
Executes the environment process
|
Object |
getProperty(String name)
Returns a property.
|
void |
shutdown(IEnvironmentSpace space)
This method will be executed by the object before the process is removed
from the execution queue.
|
void |
start(IClockService clock,
IEnvironmentSpace space)
This method will be executed by the object before the process gets added
to the execution queue.
|
addPropertyChangeListener, getProperties, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPropertyNames, hasProperty, setProperty
public DefaultObjectCreationProcess()
public void start(IClockService clock, IEnvironmentSpace space)
start
in interface ISpaceProcess
clock
- The clock.space
- The space this process is running in.public void shutdown(IEnvironmentSpace space)
shutdown
in interface ISpaceProcess
clock
- The clock.space
- The space this process is running in.public void execute(IClockService clock, IEnvironmentSpace space)
execute
in interface ISpaceProcess
clock
- The clock.space
- The space this process is running in.public Object getProperty(String name)
getProperty
in interface IPropertyObject
getProperty
in class SimplePropertyObject
name
- name of the propertyCopyright © 2013. All Rights Reserved.