Example #1
0
 static public int get_onSharedCompleteFn(IntPtr l)
 {
     try {
         LHighway self = (LHighway)checkSelf(l);
         pushValue(l, self.onSharedCompleteFn);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Example #2
0
 public static int constructor(IntPtr l)
 {
     try {
         LHighway o;
         o=new LHighway();
         pushValue(l,true);
         pushValue(l,o);
         return 2;
     }
     catch(Exception e) {
         return error(l,e);
     }
 }
Example #3
0
 static public int constructor(IntPtr l)
 {
     try {
         LHighway o;
         o = new LHighway();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Example #4
0
 public static int constructor(IntPtr l)
 {
     try {
         LHighway o;
         o=new LHighway();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
Example #5
0
 static public int set_onProgressFn(IntPtr l)
 {
     try {
         LHighway         self = (LHighway)checkSelf(l);
         SLua.LuaFunction v;
         checkType(l, 2, out v);
         self.onProgressFn = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Example #6
0
 static public int LoadLuaTable(IntPtr l)
 {
     try {
         LHighway      self = (LHighway)checkSelf(l);
         SLua.LuaTable a1;
         checkType(l, 2, out a1);
         self.LoadLuaTable(a1);
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Example #7
0
 static public int set_cache(IntPtr l)
 {
     try {
         LHighway      self = (LHighway)checkSelf(l);
         System.Object v;
         checkType(l, 2, out v);
         self.cache = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Example #8
0
    /// <summary>
    /// Load the specified localization dictionary.
    /// </summary>

    static bool LoadDictionary(string value)
    {
        LHighway loader   = LHighway.instance;
        string   fileName = Common.LANGUAGE_FLODER + "/" + value.ToLower() + "." + Common.LANGUAGE_SUFFIX;
        //fileName = CUtils.GetAssetFullPath(fileName);
        //string exsi = CUtils.GetFileFullPathNoProtocol(fileName);
        string url = "";
        //if (!System.IO.File.Exists(exsi))
        //{
        //    url = CUtils.GetFileFullPath(Common.LANGUAGE_FLODER + "/english." + Common.LANGUAGE_SUFFIX);
        //    mLanguage = "English";
        //}
        //else
        {
            url = CUtils.GetAssetFullPath(fileName);
        }

        CRequest req = new CRequest(url, "", "TextAsset");

        req.OnComplete += delegate(CRequest req1)
        {
            //WWW www =((WWW)req1.data);
            TextAsset main = req1.data as TextAsset; //www.assetBundle.mainAsset as TextAsset;
            byte[]    txt  = main.bytes;
#if UNITY_EDITOR
            Debug.Log(mLanguage + " is loaded " + txt.Length);
#endif
            if (txt != null)
            {
                Load(txt);
            }
            SelectLanguage(mLanguage);
            //req1.assetBundle.Unload(true);
            //www.Dispose();
            //www = null;
            CacheManager.ClearCache(req1.keyHashCode);
            localizationHasBeenSet = true;
        };

        req.OnEnd += delegate(CRequest req1)
        {
            url       = CUtils.GetFileFullPath(Common.LANGUAGE_FLODER + "/english." + Common.LANGUAGE_SUFFIX);
            mLanguage = "English";
            req1.url  = url;
            loader.LoadReq(req1);
        };
        loader.LoadReq(req);
        return(false);
    }
Example #9
0
 void Awake()
 {
     multipleLoader = LHighway.instance;
     _instance = this;
 }
Example #10
0
    static int _CreateLHighway(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            LHighway obj = new LHighway();
            LuaScriptMgr.PushObject(L, obj);
            return 1;
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: LHighway.New");
        }

        return 0;
    }
Example #11
0
 void Awake()
 {
     multipleLoader = LHighway.instance;
     _instance      = this;
 }
Example #12
0
 void Awake()
 {
     multipleLoader = LHighway.instance;
 }
Example #13
0
 void Awake()
 {
     multipleLoader = LHighway.instance;
 }