Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB

  1. //===== Copyright � Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef GRAPHICSCRIPTINTERFACE_H
  7. #define GRAPHICSCRIPTINTERFACE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "gameuiscriptsystem.h"
  12. class CGameGraphic;
  13. //-----------------------------------------------------------------------------
  14. // These are functions that can be called from lua that do things to graphic classes.
  15. //-----------------------------------------------------------------------------
  16. class CGraphicScriptInterface
  17. {
  18. public:
  19. CGraphicScriptInterface( IScriptVM *pScriptVM );
  20. void InstallGraphic( CGameGraphic *pGraphic );
  21. HSCRIPT GetScope( ) { return m_Scope; }
  22. private:
  23. // private functions to support scripting
  24. //CGameGraphic *FindGraphic( int nID );
  25. public:
  26. // exposed functions to scripting
  27. void PlayAnim( const char *pAnimName );
  28. private:
  29. void SetScope( HSCRIPT Scope ) { m_Scope = Scope; }
  30. CGameGraphic *m_pGraphic;
  31. HSCRIPT m_Scope;
  32. IScriptVM *m_pScriptVM;
  33. };
  34. #endif // GRAPHICSCRIPTINTERFACE_H