Ejemplo n.º 1
0
    static int ParseDictionary(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.LocalizationComponent), typeof(string)))
            {
                UnityGameFramework.Runtime.LocalizationComponent obj = (UnityGameFramework.Runtime.LocalizationComponent)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                bool   o    = obj.ParseDictionary(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.LocalizationComponent), typeof(string), typeof(object)))
            {
                UnityGameFramework.Runtime.LocalizationComponent obj = (UnityGameFramework.Runtime.LocalizationComponent)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                bool   o    = obj.ParseDictionary(arg0, arg1);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityGameFramework.Runtime.LocalizationComponent.ParseDictionary"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 2
0
 static int RemoveRawString(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityGameFramework.Runtime.LocalizationComponent obj = (UnityGameFramework.Runtime.LocalizationComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.LocalizationComponent));
         string arg0 = ToLua.CheckString(L, 2);
         bool   o    = obj.RemoveRawString(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 3
0
 static int GetString(IntPtr L)
 {
     try
     {
         int count = LuaDLL.lua_gettop(L);
         UnityGameFramework.Runtime.LocalizationComponent obj = (UnityGameFramework.Runtime.LocalizationComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.LocalizationComponent));
         string   arg0 = ToLua.CheckString(L, 2);
         object[] arg1 = ToLua.ToParamsObject(L, 3, count - 2);
         string   o    = obj.GetString(arg0, arg1);
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 4
0
    static int set_Language(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityGameFramework.Runtime.LocalizationComponent obj = (UnityGameFramework.Runtime.LocalizationComponent)o;
            GameFramework.Localization.Language arg0             = (GameFramework.Localization.Language)ToLua.CheckObject(L, 2, typeof(GameFramework.Localization.Language));
            obj.Language = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Language on a nil value" : e.Message));
        }
    }
Ejemplo n.º 5
0
    static int get_DictionaryCount(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityGameFramework.Runtime.LocalizationComponent obj = (UnityGameFramework.Runtime.LocalizationComponent)o;
            int ret = obj.DictionaryCount;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index DictionaryCount on a nil value" : e.Message));
        }
    }
Ejemplo n.º 6
0
    static int get_SystemLanguage(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityGameFramework.Runtime.LocalizationComponent obj = (UnityGameFramework.Runtime.LocalizationComponent)o;
            GameFramework.Localization.Language ret = obj.SystemLanguage;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index SystemLanguage on a nil value" : e.Message));
        }
    }