Пример #1
0
    // Use this for initialization
    void Start()
    {
        _uislots         = GetComponent <UISlots>();
        _btn_luaEntrance = _uislots.GetObject(0).GetComponent <Button>();
        _input_x         = _uislots.GetObject(1).GetComponent <InputField>();
        _input_y         = _uislots.GetObject(2).GetComponent <InputField>();
        _btn_change      = _uislots.GetObject(3).GetComponent <Button>();
        Text _user_agent = _uislots.GetObject(4).GetComponent <Text>();

        _user_agent.text = string.Concat(System.Net.Dns.GetHostName());
        IPAddress[] ipadress = Dns.GetHostAddresses(Dns.GetHostName());
        for (int i = 0; i < ipadress.Length; i++)
        {
            _user_agent.text += "\n" + ipadress[i].ToString();
        }
        _user_agent.text = string.Empty;

        _btn_change.onClick.AddListener(() => {
            print(_input_x.text);
            print(_input_y.text);
            if (!string.IsNullOrEmpty(_input_x.text) && !string.IsNullOrEmpty(_input_y.text))
            {
                Screen.SetResolution(int.Parse(_input_x.text), int.Parse(_input_y.text), true, 60);
            }
        });
    }
Пример #2
0
        static int _g_get_Objects(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UISlots gen_to_be_invoked = (UISlots)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.Objects);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Пример #3
0
        static int _s_set_Objects(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UISlots gen_to_be_invoked = (UISlots)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.Objects = (UnityEngine.GameObject[])translator.GetObject(L, 2, typeof(UnityEngine.GameObject[]));
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Пример #4
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    UISlots gen_ret = new UISlots();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UISlots constructor!"));
        }
Пример #5
0
        static int _m_GetObject(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UISlots gen_to_be_invoked = (UISlots)translator.FastGetCSObj(L, 1);



                {
                    int _index = LuaAPI.xlua_tointeger(L, 2);

                    UnityEngine.GameObject gen_ret = gen_to_be_invoked.GetObject(_index);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }