mirror of
https://github.com/ApfelTeeSaft/gameBase.git
synced 2026-08-27 03:33:25 +00:00
new method
This commit is contained in:
@@ -36,6 +36,14 @@ namespace gameBase{
|
||||
return var;
|
||||
}
|
||||
|
||||
float LuaManager::getFloat(string varName){
|
||||
lua_getglobal(state, varName.c_str());
|
||||
int isNum;
|
||||
float var = (int)lua_tonumberx(state, -1, &isNum);
|
||||
lua_pop(state, 1);
|
||||
return var;
|
||||
}
|
||||
|
||||
string LuaManager::getString(string varName){
|
||||
lua_getglobal(state, varName.c_str());
|
||||
string result = lua_tostring(state, -1);
|
||||
|
||||
Reference in New Issue
Block a user