예제 #1
0
    static int GetFsm(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.FsmComponent), typeof(System.Type)))
            {
                UnityGameFramework.Runtime.FsmComponent obj = (UnityGameFramework.Runtime.FsmComponent)ToLua.ToObject(L, 1);
                System.Type arg0            = (System.Type)ToLua.ToObject(L, 2);
                GameFramework.Fsm.FsmBase o = obj.GetFsm(arg0);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.FsmComponent), typeof(System.Type), typeof(string)))
            {
                UnityGameFramework.Runtime.FsmComponent obj = (UnityGameFramework.Runtime.FsmComponent)ToLua.ToObject(L, 1);
                System.Type arg0            = (System.Type)ToLua.ToObject(L, 2);
                string      arg1            = ToLua.ToString(L, 3);
                GameFramework.Fsm.FsmBase o = obj.GetFsm(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityGameFramework.Runtime.FsmComponent.GetFsm"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
예제 #2
0
 static int GetAllFsms(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityGameFramework.Runtime.FsmComponent obj = (UnityGameFramework.Runtime.FsmComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.FsmComponent));
         GameFramework.Fsm.FsmBase[]             o   = obj.GetAllFsms();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
예제 #3
0
    static int get_Count(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityGameFramework.Runtime.FsmComponent obj = (UnityGameFramework.Runtime.FsmComponent)o;
            int ret = obj.Count;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Count on a nil value" : e.Message));
        }
    }