public static int StopCoroutine(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsObject(L, 2))
        {
            UnityEngine.MonoBehaviour      arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            System.Collections.IEnumerator arg1 = (System.Collections.IEnumerator)LuaCallback.ToObject(L, 2);
            arg0.StopCoroutine(arg1);

            return(0);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsObject(L, 2))
        {
            UnityEngine.MonoBehaviour arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            UnityEngine.Coroutine     arg1 = (UnityEngine.Coroutine)LuaCallback.ToObject(L, 2);
            arg0.StopCoroutine(arg1);

            return(0);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2))
        {
            UnityEngine.MonoBehaviour arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            System.String             arg1 = (System.String)LuaCallback.ToString(L, 2);
            arg0.StopCoroutine(arg1);

            return(0);
        }
        return(0);
    }
    public static int StartCoroutine(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2))
        {
            UnityEngine.MonoBehaviour arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            System.String             arg1 = (System.String)LuaCallback.ToString(L, 2);
            UnityEngine.Coroutine     res  = arg0.StartCoroutine(arg1);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2) && LuaAPI.IsObject(L, 3))
        {
            UnityEngine.MonoBehaviour arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            System.String             arg1 = (System.String)LuaCallback.ToString(L, 2);
            System.Object             arg2 = (System.Object)LuaCallback.ToObject(L, 3);
            UnityEngine.Coroutine     res  = arg0.StartCoroutine(arg1, arg2);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsObject(L, 2))
        {
            UnityEngine.MonoBehaviour      arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            System.Collections.IEnumerator arg1 = (System.Collections.IEnumerator)LuaCallback.ToObject(L, 2);
            UnityEngine.Coroutine          res  = arg0.StartCoroutine(arg1);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        return(0);
    }
Exemple #3
0
 public static int set_name(IntPtr L)
 {
     if (LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, -1))
     {
         UnityEngine.Object o    = LuaAPI.ToObj <UnityEngine.Object>(L, 1);
         string             arg0 = LuaAPI.ToStr(L, -1);
         o.name = arg0;
     }
     return(0);
 }
Exemple #4
0
 public static int set_tag(IntPtr L)
 {
     if (LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, -1))
     {
         UnityEngine.GameObject go = LuaAPI.ToObj <GameObject>(L, 1);
         string arg0 = LuaAPI.ToStr(L, -1);
         go.tag = arg0;
     }
     return(0);
 }
Exemple #5
0
 public static int set_tag(System.IntPtr L)
 {
     if (true && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 3))
     {
         UnityEngine.Component arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
         System.String         arg1 = (System.String)LuaCallback.ToString(L, 3);
         arg0.tag = arg1;
         return(0);
     }
     return(0);
 }
Exemple #6
0
 public static int OpenUrl(IntPtr L)
 {
     if (CheckArgsCount(L, 1))
     {
         if (LuaAPI.IsString(L, 1))
         {
             string arg0 = LuaAPI.ToStr(L, 1);
             UnityEngine.Application.OpenURL(arg0);
         }
     }
     return(0);
 }
Exemple #7
0
 public static int Find(IntPtr L)
 {
     if (CheckArgsCount(L, 1))
     {
         if (LuaAPI.IsString(L, 1))
         {
             string arg0 = LuaAPI.ToStr(L, 1);
             UnityEngine.GameObject o = UnityEngine.GameObject.Find(arg0);
             LuaAPI.PushObj(L, o);
         }
     }
     return(1);
 }
Exemple #8
0
    public static int CompareTag(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2))
        {
            UnityEngine.Component arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.String         arg1 = (System.String)LuaCallback.ToString(L, 2);
            System.Boolean        res  = arg0.CompareTag(arg1);
            LuaCallback.PushBool(L, res);
            return(1);
        }
        return(0);
    }
Exemple #9
0
    public static int Find(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2))
        {
            UnityEngine.Transform arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
            System.String         arg1 = (System.String)LuaCallback.ToString(L, 2);
            UnityEngine.Transform res  = arg0.Find(arg1);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        return(0);
    }
    public static int Invoke(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2) && LuaAPI.IsNumber(L, 3))
        {
            UnityEngine.MonoBehaviour arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            System.String             arg1 = (System.String)LuaCallback.ToString(L, 2);
            System.Single             arg2 = (System.Single)LuaCallback.ToNumber(L, 3);
            arg0.Invoke(arg1, arg2);

            return(0);
        }
        return(0);
    }
Exemple #11
0
    public static int Print(IntPtr L)
    {
        int    nargs = LuaAPI.GetTop(L);
        string s     = "LUA: ";

        for (int i = 1; i <= nargs; i++)
        {
            if (LuaAPI.IsString(L, i))
            {
                s += LuaAPI.ToStr(L, i);
                if (i != nargs)
                {
                    s += "\t";
                }
            }
        }
        Debug.Log(s);
        return(0);
    }
Exemple #12
0
    public static int BroadcastMessage(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 4 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2) && LuaAPI.IsObject(L, 3) && LuaAPI.IsNumber(L, 4))
        {
            UnityEngine.Component          arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.String                  arg1 = (System.String)LuaCallback.ToString(L, 2);
            System.Object                  arg2 = (System.Object)LuaCallback.ToObject(L, 3);
            UnityEngine.SendMessageOptions arg3 = (UnityEngine.SendMessageOptions)LuaCallback.ToNumber(L, 4);
            arg0.BroadcastMessage(arg1, arg2, arg3);

            return(0);
        }
        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2) && LuaAPI.IsObject(L, 3))
        {
            UnityEngine.Component arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.String         arg1 = (System.String)LuaCallback.ToString(L, 2);
            System.Object         arg2 = (System.Object)LuaCallback.ToObject(L, 3);
            arg0.BroadcastMessage(arg1, arg2);

            return(0);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2))
        {
            UnityEngine.Component arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.String         arg1 = (System.String)LuaCallback.ToString(L, 2);
            arg0.BroadcastMessage(arg1);

            return(0);
        }
        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2) && LuaAPI.IsNumber(L, 3))
        {
            UnityEngine.Component          arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.String                  arg1 = (System.String)LuaCallback.ToString(L, 2);
            UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)LuaCallback.ToNumber(L, 3);
            arg0.BroadcastMessage(arg1, arg2);

            return(0);
        }
        return(0);
    }
    public static int CancelInvoke(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 1 && LuaAPI.IsObject(L, 1))
        {
            UnityEngine.MonoBehaviour arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            arg0.CancelInvoke();

            return(0);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2))
        {
            UnityEngine.MonoBehaviour arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            System.String             arg1 = (System.String)LuaCallback.ToString(L, 2);
            arg0.CancelInvoke(arg1);

            return(0);
        }
        return(0);
    }
    public static int IsInvoking(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 1 && LuaAPI.IsObject(L, 1))
        {
            UnityEngine.MonoBehaviour arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            System.Boolean            res  = arg0.IsInvoking();
            LuaCallback.PushBool(L, res);
            return(1);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2))
        {
            UnityEngine.MonoBehaviour arg0 = (UnityEngine.MonoBehaviour)LuaCallback.ToObject(L, 1);
            System.String             arg1 = (System.String)LuaCallback.ToString(L, 2);
            System.Boolean            res  = arg0.IsInvoking(arg1);
            LuaCallback.PushBool(L, res);
            return(1);
        }
        return(0);
    }
Exemple #15
0
    public static int GetComponent(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsNumber(L, 2))
        {
            UnityEngine.Component arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.Type           arg1 = (System.Type)LuaCallback.ToType(L, 2);
            UnityEngine.Component res  = arg0.GetComponent(arg1);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsString(L, 2))
        {
            UnityEngine.Component arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.String         arg1 = (System.String)LuaCallback.ToString(L, 2);
            UnityEngine.Component res  = arg0.GetComponent(arg1);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        return(0);
    }