NativeBehaviour
Inherited: None
Description
All programmable game logic must be derived from NativeBehaviour class.
Example:
class ExampleBehaviour : public NativeBehaviour {
A_REGISTER(ExampleBehaviour, NativeBehaviour, General)
A_NOMETHODS()
A_NOPROPERTIES()
public:
void start() {
Log(Log::DBG) << "Start";
}
void update() {
Log(Log::DBG) << "Update";
}
};
Public Methods
void |
start () |
void |
update () |
Static Methods
None
Methods Description
void NativeBehaviour::start ()
Start is called on the same frame when a script is enabled just before the update method will be called the first time.
void NativeBehaviour::update ()
Update is called every frame, if the NativeBehaviour is enabled.