ExampleComponent.cs 751 B

1234567891011121314151617181920212223242526
  1. //onAdd is called when the component is created and then added to it's owner entity.
  2. //You would also add any script-defined component fields via addComponentField().
  3. function ExampleComponent::onAdd(%this)
  4. {
  5. }
  6. //onRemove is called when the component is removed and deleted from it's owner entity.
  7. function ExampleComponent::onRemove(%this)
  8. {
  9. }
  10. //onClientConnect is called any time a new client connects to the server.
  11. function ExampleComponent::onClientConnect(%this, %client)
  12. {
  13. }
  14. //onClientDisconnect is called any time a client disconnects from the server.
  15. function ExampleComponent::onClientDisconnect(%this, %client)
  16. {
  17. }
  18. //update is called when the component does an update tick.
  19. function ExampleComponent::Update(%this)
  20. {
  21. }