Changeset 923 for trunk/client/Game2/GamePeer.h – HoverRace
Show
Ignore:
Timestamp:
03/16/10 00:50:07 (6 months ago)
Author:
zoogie
Message:

Added "Config" class in Lua (C++ peer: ConfigPeer).

Example (in an init script):

local cfg = game:get_config()
cfg:unlink() -- Prevents accidental writing to disk
local w, h = cfg:get_video_res()
print("Video res from config: ", w, h)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/client/Game2/GamePeer.h

    r922 r923  
    2727 
    2828namespace HoverRace { 
     29    namespace Client { 
     30        class ConfigPeer; 
     31    } 
    2932    namespace Script { 
    3033        class Core; 
     
    5356 
    5457    public: 
     58        ConfigPeer *LGetConfig(); 
     59 
    5560        void LOnInit(const luabind::object &fn); 
    5661        void LGetOnInit();