BVB Source Codes

CRYENGINE Show ScriptBind_GameToken.h Source code

Return Download CRYENGINE: download ScriptBind_GameToken.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #pragma once
  4. #include <CryScriptSystem/ScriptHelpers.h>
  5. #include <CryGame/IGameTokens.h>
  6. #include "GameTokenSystem.h"
  7.  
  8. /*! <description>This class implements script functions for game tokens.</description> */
  9. class CScriptBind_GameToken :
  10.         public CScriptableBase
  11. {
  12. public:
  13.         CScriptBind_GameToken(CGameTokenSystem* pTokenSystem)
  14.         {
  15.                 m_pTokenSystem = pTokenSystem;
  16.  
  17.                 Init(gEnv->pScriptSystem, GetISystem());
  18.                 SetGlobalName("GameToken");
  19.  
  20. #undef SCRIPT_REG_CLASSNAME
  21. #define SCRIPT_REG_CLASSNAME &CScriptBind_GameToken::
  22.  
  23.                 SCRIPT_REG_FUNC(SetToken);
  24.                 SCRIPT_REG_TEMPLFUNC(GetToken, "sTokenName");
  25.                 SCRIPT_REG_FUNC(DumpAllTokens);
  26.         }
  27.  
  28.         virtual ~CScriptBind_GameToken(void)
  29.         {
  30.         }
  31.  
  32.         void Release();
  33.  
  34.         //! <code>GameToken.SetToken( TokenName, TokenValue )</code>
  35.         //! <description>Set the value of a game token.</description>
  36.         int SetToken(IFunctionHandler* pH);
  37.  
  38.         //! <code>GameToken.GetToken( TokenName )</code>
  39.         //! <description>Get the value of a game token.</description>
  40.         int GetToken(IFunctionHandler* pH, const char* sTokenName);
  41.  
  42.         //! <code>GameToken.DumpAllTokens()</code>
  43.         //! <description>Dump all game tokens with their values to the log.</description>
  44.         int          DumpAllTokens(IFunctionHandler* pH);
  45.  
  46.         virtual void GetMemoryUsage(ICrySizer* pSizer) const;
  47.  
  48. private:
  49.         CGameTokenSystem* m_pTokenSystem;
  50. };
  51.  
downloadScriptBind_GameToken.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top