public void Reload()
        {
            try
            {
                _ButtonAnim_RestState = ShapeAnimation.animFromLuaInfo(ButtonAnim_RestState);
            }
            catch (Exception)
            {
                Console.WriteLine("Error in 'LuaUIButtonInfo' for 'ShapeAnimation.animFromLuaInfo(ButtonAnim_RestState)' ");
                _ButtonAnim_RestState = new ShapeAnimation();
            }

            try
            {
                _ButtonAnim_HoverState = ShapeAnimation.animFromLuaInfo(ButtonAnim_HoverState);
            }
            catch (Exception)
            {
                Console.WriteLine("Error in 'LuaUIButtonInfo' for 'ShapeAnimation.animFromLuaInfo(ButtonAnim_HoverState)' ");
                _ButtonAnim_HoverState = new ShapeAnimation();
            }

            try
            {
                _ButtonAnim_ClickState = ShapeAnimation.animFromLuaInfo(ButtonAnim_ClickState);
            }
            catch (Exception)
            {
                Console.WriteLine("Error in 'LuaUIButtonInfo' for 'ShapeAnimation.animFromLuaInfo(ButtonAnim_RestState)' ");
                _ButtonAnim_ClickState = new ShapeAnimation();
            }
        }
        public static void Test()
        {
            NLua.Lua state = new NLua.Lua();

            NLua.Lua state2 = new NLua.Lua();

            someData sd = new someData();

            sd.ID = 25;
            sd.sList.AddRange(new String[] { "this", " is", " a", " test", " list" });
            luaData ld = new luaData(sd);


            //var test = state.DoString("return 10 + 3*(5 + 2)")[0];
            //var type = test.GetType();

            //int value = 6;
            //state["test"] = value;
            //var result = state.DoString("return test*3+(test-3)")[0];

            //state.DoString(@"
            // function ScriptFunc (val1, val2)
            //     val1=val1+2
            //     val2=val2+3
            //     return val1, val2
            //  end");

            //var scriptFunc = state["ScriptFunc"] as NLua.LuaFunction;
            //var res = scriptFunc.Call(3, 5);

            testClass tc = new testClass("Some test string here");

            tc.list.Add(25);
            state["provision"] = "Random piece of information";



            testClass tc2 = new testClass("Indirect summon");

            tc2.data = ld;
            tc2.ProvideInfoToLua(state);
            //state["testObj"] = tc;

            state.LoadCLRPackage();
            // state.DoString(@" import ('The betrayer', 'TBAGW.Utilities')
            //   import ('System.Web')
            //    import ('System')");

            // var testStringFromObject = state.DoString("return TestObject.testList[0]")[0];
            // var elementType = testStringFromObject.GetType();
            // testClass testObjFromLUA = state.DoString("return TestObject")[0] as testClass;
            //bool bWhat = testObjFromLUA.GetType() == tc.GetType();

            state.DoString("print(\"Hello World\")");

            System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog();
            ofd.Filter           = "LUA files (*.lua)|*.lua";
            ofd.InitialDirectory = Game1.rootContent;
            if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                state = new NLua.Lua();
                state.LoadCLRPackage();
                state.DoFile(ofd.FileName);
                var time = System.IO.File.GetLastWriteTime(ofd.FileName);
            }
            //var statsTest = ((state["generateSomeStats"] as NLua.LuaFunction).Call()[0] as LuaStatEdit).ExtractStatChart();

            //BaseSprite bs = new BaseSprite();
            //bs.position = new Vector2(136, 2556);
            //if (Scenes.Editor.MapBuilder.loadedMap != null)
            //{
            //    bs.UpdatePosition();
            //}
            // List<List<Object>> luaStuff = new List<List<object>>();
            //var ttt = (state["save"] as NLua.LuaFunction).Call()[0].GetType();
            (state["save"] as NLua.LuaFunction).Call();
            var st = LuaSaveData.getGlobalData("My Collection", "luaStuff");

            (state["loadProcess"] as NLua.LuaFunction).Call();
            //var dabdab = ((state["getShapeData"] as NLua.LuaFunction).Call(bs));
            //  NLua.LuaFunction savedFunction = state["e1.Test"] as NLua.LuaFunction;
            uic = ((state["createUI"] as NLua.LuaFunction).Call()[0] as LuaUICollection).ConvertFromLua(state);
            goto skip;
            var luaRect = ShapeAnimation.animFromLuaInfo(((state["generateAnimation"] as NLua.LuaFunction).Call()[0] as LuaShapeAnimationInfo));
            var resldo  = (state["returnLuaSpecificData"] as NLua.LuaFunction).Call()[0];

            NLua.LuaTable lt = (state["returnLuaSpecificData"] as NLua.LuaFunction).Call()[0] as NLua.LuaTable;
            (state["GenerateSomeStuff"] as NLua.LuaFunction).Call();
            ListDataProvider.setLuaData(state);
            (state["publicStaticCall"] as NLua.LuaFunction).Call();
            (state["internalStaticCall"] as NLua.LuaFunction).Call();
            state["testObj"] = tc;
            var ele2                     = (state["attempt"] as NLua.LuaFunction).Call()[0];
            var returnedData             = (state["returnData"] as NLua.LuaFunction).Call()[0];
            var oldProvision             = state["provision"];
            var value2                   = state["testObj.i"];
            var function                 = state["MyFunc"] as NLua.LuaFunction;
            var funcRes                  = function.Call(state["testObj.i"])[0];
            var tableResult              = (state["returnTable"] as NLua.LuaFunction).Call()[0];
            var bCompare1                = tableResult.GetType() == typeof(NLua.LuaTable);
            var tableToList              = LUAUtilities.LUATableToListUtility(typeof(testClass), tableResult as NLua.LuaTable).Cast <testClass>().ToList();
            var tableToListGenericObject = LUAUtilities.LUATableToListUtility(typeof(testClass), tableResult as NLua.LuaTable);
            var listType                 = tableToList.GetType();
            var listTypeGO               = tableToListGenericObject.GetType();



            state = new NLua.Lua();
            state.LoadCLRPackage();
            state.DoFile(ofd.FileName);
            List <testClass> tcl = new List <testClass>();

            tcl.Add(new testClass(""));
            tcl.Last().i = 25;
            tcl.Add(new testClass(""));
            tcl.Last().i = 0;
            tcl.Add(new testClass(""));
            tcl.Last().i = 10;
            foreach (var item in tcl)
            {
                (state["setStuff"] as NLua.LuaFunction).Call(item);
            }

            tcl = LUAUtilities.LUATableToListUtility(typeof(testClass), (state["doStuff"] as NLua.LuaFunction).Call()[0] as NLua.LuaTable).Cast <testClass>().ToList();
            skip : { }
            bDoTest = false;
        }