poweredoptic_base.c 461 B

123456789101112131415161718192021222324252627
  1. class PoweredOptic_Base extends ItemOptics
  2. {
  3. protected PlayerBase m_Player;
  4. protected bool m_IsActionActive; // sanity check for comparing to EM synched value
  5. void SetPlayer( PlayerBase player )
  6. {
  7. m_Player = player;
  8. }
  9. PlayerBase GetPlayer()
  10. {
  11. return m_Player;
  12. }
  13. void StartWorkServer()
  14. {
  15. m_IsActionActive = true;
  16. GetCompEM().SwitchOn();
  17. }
  18. void StopWorkServer()
  19. {
  20. GetCompEM().SwitchOff();
  21. m_IsActionActive = false;
  22. }
  23. }