controlObjectComponent.h 674 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "T3D/components/component.h"
  3. #include "T3D/gameBase/gameConnection.h"
  4. class ControlObjectComponent : public Component
  5. {
  6. typedef Component Parent;
  7. GameConnection* mOwnerConnection;
  8. S32 mOwnerConnectionId;
  9. public:
  10. ControlObjectComponent();
  11. ~ControlObjectComponent();
  12. DECLARE_CONOBJECT(ControlObjectComponent);
  13. virtual bool onAdd();
  14. virtual void onRemove();
  15. static void initPersistFields();
  16. virtual void onComponentAdd();
  17. virtual void onComponentRemove();
  18. void onClientConnect(GameConnection* conn);
  19. void onClientDisconnect(GameConnection* conn);
  20. void setConnectionControlObject(GameConnection* conn);
  21. };