static int get_lngType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); GameMain obj = (GameMain)o; LngType ret = obj.lngType; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index lngType on a nil value")); } }
static int set_lngType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); GameMain obj = (GameMain)o; LngType arg0 = (LngType)ToLua.CheckObject(L, 2, typeof(LngType)); obj.lngType = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index lngType on a nil value")); } }
public void InitWithConfig() { ConfigHandler config = ConfigHandler.Open(CommonUtils.GetABPath("config.txt")); //是否配置多语言 string str = config.ReadValue("lngType", ""); if (!string.IsNullOrEmpty(str)) { _lngType = (LngType)int.Parse(str); } Debug.Log(_lngType); //音效上限 str = config.ReadValue("AudioLimit", ""); if (!string.IsNullOrEmpty(str)) { _audioLimit = int.Parse(str); } //热更地址 str = config.ReadValue("updateHost", ""); if (!string.IsNullOrEmpty(str)) { updateHost = str; } //登录地址 str = config.ReadValue("loginHost", ""); if (!string.IsNullOrEmpty(str)) { loginHost = str; } //登录端口号 str = config.ReadValue("port", ""); if (!string.IsNullOrEmpty(str)) { port = str; } //平台id str = config.ReadValue("platID", ""); if (!string.IsNullOrEmpty(str)) { platID = int.Parse(str); } }