#include <Component.hpp>
Definition at line 37 of file Component.hpp.
jop::Component::Component |
( |
Object & |
object, |
|
|
const uint32 |
ID |
|
) |
| |
|
protected |
Constructor.
- Parameters
-
object | Reference to the object this component will be bound to |
ID | Identifier. If you don't plan on using this for anything, pass 0 |
Copy constructor.
This copy constructor differs in signature from the standard. Cloned components often need to know their objects during construction, and thus needs to be passed in here. Your own components' copy constructors should be defined the same way. See clone(Object&).
- Parameters
-
other | The other component to be copied |
newObj | The new object |
virtual jop::Component::~Component |
( |
| ) |
|
|
pure virtual |
uint32 jop::Component::getID |
( |
| ) |
const |
Get the identifier.
- Returns
- The identifier
Get the object this component is bound to.
- Returns
- Reference to the object
Get the object this component is bound to.
- Returns
- Reference to the object
bool jop::Component::isActive |
( |
| ) |
const |
Check if this component is active.
This is the same as calling getObject()->isActive().
- Returns
- True if active
void jop::Component::removeSelf |
( |
| ) |
|
Remove this component from its object.
The component will be removed immediately.
Send a message to this component.
- Parameters
-
- Returns
- Message result
void jop::Component::setID |
( |
const uint32 |
ID | ) |
|
Set the identifier.
- Parameters
-
- This method is exposed as command named setID
virtual void jop::Component::update |
( |
const float |
deltaTime | ) |
|
|
virtual |
The documentation for this class was generated from the following file: