T
- The Property type createdpublic interface PropertyFactory<T extends Property>
Attributes
as its only argument. The constructor does not need to
be public.Modifier and Type | Method and Description |
---|---|
void |
clone(T src,
int srcIndex,
T dst,
int dstIndex)
Copy the value from src at component index, srcIndex to
dst at dstIndex.
|
T |
create()
Return a new Property instance.
|
void |
setDefaultValue(T property,
int index)
Set the default value that the component at the specified index will see
before it's init() method is invoked.
|
T create()
void setDefaultValue(T property, int index)
property
- The property whose value will be updatedindex
- The component index to be updatedvoid clone(T src, int srcIndex, T dst, int dstIndex)
Entity.add(com.lhkbob.entreri.Component)
.
For many cases a plain copy-by-value or copy-by-reference is sufficient, but some
component types might require more complicated cloning rules.src
- The source property that is being clonedsrcIndex
- The index into src of the component being cloneddst
- The destination property created from the templatedstIndex
- The index into dst of the component being createdCopyright © 2013. All Rights Reserved.