2019-08-29 05:22:33 +00:00
|
|
|
//onAdd is called when the component is created and then added to it's owner entity.
|
|
|
|
|
//You would also add any script-defined component fields via addComponentField().
|
|
|
|
|
function ExampleComponent::onAdd(%this)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2019-10-16 18:22:56 +00:00
|
|
|
//onRemove is called when the component is removed and deleted from it's owner entity.
|
2019-08-29 05:22:33 +00:00
|
|
|
function ExampleComponent::onRemove(%this)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//onClientConnect is called any time a new client connects to the server.
|
|
|
|
|
function ExampleComponent::onClientConnect(%this, %client)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//onClientDisconnect is called any time a client disconnects from the server.
|
2019-10-16 18:22:56 +00:00
|
|
|
function ExampleComponent::onClientDisconnect(%this, %client)
|
2019-08-29 05:22:33 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//update is called when the component does an update tick.
|
|
|
|
|
function ExampleComponent::Update(%this)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|