SendMessage() public method

public SendMessage ( string methodName ) : void
methodName string
return void
コード例 #1
0
 static public int SendMessage(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             self.SendMessage(a1);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(UnityEngine.SendMessageOptions)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             UnityEngine.SendMessageOptions a2;
             checkEnum(l, 3, out a2);
             self.SendMessage(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(System.Object)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             self.SendMessage(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             UnityEngine.SendMessageOptions a3;
             checkEnum(l, 4, out a3);
             self.SendMessage(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #2
0
 static public int SendMessage(IntPtr l)
 {
     try{
         if (matchType(l, 2, typeof(System.String), typeof(System.Object), typeof(UnityEngine.SendMessageOptions)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             UnityEngine.SendMessageOptions a3;
             checkEnum(l, 4, out a3);
             self.SendMessage(a1, a2, a3);
             return(0);
         }
         else if (matchType(l, 2, typeof(System.String), typeof(System.Object)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             self.SendMessage(a1, a2);
             return(0);
         }
         else if (matchType(l, 2, typeof(System.String)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             self.SendMessage(a1);
             return(0);
         }
         else if (matchType(l, 2, typeof(System.String), typeof(UnityEngine.SendMessageOptions)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             UnityEngine.SendMessageOptions a2;
             checkEnum(l, 3, out a2);
             self.SendMessage(a1, a2);
             return(0);
         }
         LuaDLL.luaL_error(l, "No matched override function to call");
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #3
0
    static int SendMessage(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.Component.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.SendMessage(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.SendMessageOptions>(L, 3))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <object>(L, 3))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.CheckObject(L, 4, typeof(UnityEngine.SendMessageOptions));
                obj.SendMessage(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.SendMessage"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #4
0
 static public int SendMessage__String(IntPtr l)
 {
     try {
         UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
         System.String         a1;
         checkType(l, 2, out a1);
         self.SendMessage(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #5
0
 public static int SendMessage2_wrap(long L)
 {
     try
     {
         long nThisPtr             = FCLibHelper.fc_get_inport_obj_ptr(L);
         UnityEngine.Component obj = get_obj(nThisPtr);
         string arg0 = FCLibHelper.fc_get_string_a(L, 0);
         obj.SendMessage(arg0);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(0);
 }
コード例 #6
0
    static int SendMessage(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string)))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                obj.SendMessage(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(UnityEngine.SendMessageOptions)))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object)))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
            {
                UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
                obj.SendMessage(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.SendMessage"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #7
0
 public static int SendMessage1_wrap(long L)
 {
     try
     {
         long nThisPtr             = FCLibHelper.fc_get_inport_obj_ptr(L);
         UnityEngine.Component obj = get_obj(nThisPtr);
         string        arg0        = FCLibHelper.fc_get_string_a(L, 0);
         System.Object arg1        = FCGetObj.GetSystemObj(FCLibHelper.fc_get_param_ptr(L, 1));
         obj.SendMessage(arg0, arg1);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(0);
 }
コード例 #8
0
 static int QPYX_SendMessage_YXQP(IntPtr L_YXQP)
 {
     try
     {
         int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
         if (QPYX_count_YXQP == 2)
         {
             UnityEngine.Component QPYX_obj_YXQP = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L_YXQP, 1);
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             QPYX_obj_YXQP.SendMessage(QPYX_arg0_YXQP);
             return(0);
         }
         else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <UnityEngine.SendMessageOptions>(L_YXQP, 3))
         {
             UnityEngine.Component QPYX_obj_YXQP = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L_YXQP, 1);
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             UnityEngine.SendMessageOptions QPYX_arg1_YXQP = (UnityEngine.SendMessageOptions)ToLua.ToObject(L_YXQP, 3);
             QPYX_obj_YXQP.SendMessage(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
             return(0);
         }
         else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <object>(L_YXQP, 3))
         {
             UnityEngine.Component QPYX_obj_YXQP = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L_YXQP, 1);
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             object QPYX_arg1_YXQP = ToLua.ToVarObject(L_YXQP, 3);
             QPYX_obj_YXQP.SendMessage(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
             return(0);
         }
         else if (QPYX_count_YXQP == 4)
         {
             UnityEngine.Component QPYX_obj_YXQP = (UnityEngine.Component)ToLua.CheckObject <UnityEngine.Component>(L_YXQP, 1);
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             object QPYX_arg1_YXQP = ToLua.ToVarObject(L_YXQP, 3);
             UnityEngine.SendMessageOptions QPYX_arg2_YXQP = (UnityEngine.SendMessageOptions)ToLua.CheckObject(L_YXQP, 4, typeof(UnityEngine.SendMessageOptions));
             QPYX_obj_YXQP.SendMessage(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
             return(0);
         }
         else
         {
             return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.Component.SendMessage"));
         }
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
コード例 #9
0
 static public int SendMessage__String__Object__SendMessageOptions(IntPtr l)
 {
     try {
         UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
         System.String         a1;
         checkType(l, 2, out a1);
         System.Object a2;
         checkType(l, 3, out a2);
         UnityEngine.SendMessageOptions a3;
         checkEnum(l, 4, out a3);
         self.SendMessage(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #10
0
 static public int SendMessage(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             self.SendMessage(a1);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(UnityEngine.SendMessageOptions)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             UnityEngine.SendMessageOptions a2;
             a2 = (UnityEngine.SendMessageOptions)LuaDLL.luaL_checkinteger(l, 3);
             self.SendMessage(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(System.Object)))
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             self.SendMessage(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.Component self = (UnityEngine.Component)checkSelf(l);
             System.String         a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             UnityEngine.SendMessageOptions a3;
             a3 = (UnityEngine.SendMessageOptions)LuaDLL.luaL_checkinteger(l, 4);
             self.SendMessage(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function SendMessage to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
コード例 #11
0
    // ------------------------------------------------------------------ 
    /// Calls the method named methodName on every Component target game object.
    // ------------------------------------------------------------------ 

    public void Trigger (Component _target, exSpriteAnimationClip.EventInfo _event) {
        if (_event.methodName == "")
            return;
        switch (_event.paramType) {
        case exSpriteAnimationClip.EventInfo.ParamType.None:
            _target.SendMessage(_event.methodName, _event.msgOptions);
            break;
        case exSpriteAnimationClip.EventInfo.ParamType.String:
            _target.SendMessage(_event.methodName, _event.stringParam, _event.msgOptions);
            break;
        case exSpriteAnimationClip.EventInfo.ParamType.Float:
            _target.SendMessage(_event.methodName, _event.floatParam, _event.msgOptions);
            break;
        case exSpriteAnimationClip.EventInfo.ParamType.Int:
            _target.SendMessage(_event.methodName, _event.intParam, _event.msgOptions);
            break;
        case exSpriteAnimationClip.EventInfo.ParamType.Bool:
            _target.SendMessage(_event.methodName, _event.boolParam, _event.msgOptions);
            break;
        case exSpriteAnimationClip.EventInfo.ParamType.Object:
            _target.SendMessage(_event.methodName, _event.objectParam, _event.msgOptions);
            break;
        }
    }
コード例 #12
0
ファイル: GUIF.cs プロジェクト: ninjapretzel/zsharp
 public void Call(Component caller)
 {
     caller.SendMessage(function, SendMessageOptions.DontRequireReceiver);
 }
コード例 #13
0
ファイル: ScreenFader.cs プロジェクト: Bungee54/symposium2016
    /// <summary>
    /// Coroutine to fade the scene in from whatever opacity the fader 
    /// was at. Use FadeIn to do this. 
    /// </summary>
    /// <param name="caller"></param>
    /// <returns></returns>
    private IEnumerator FadeInCoroutine(Component caller)
    {
        fading = true;

        while (gt.color.a > 0)
        {
            Color tempColor = gt.color;
            ChangeAlpha(ref tempColor, -fadeSpeed * Time.deltaTime);
            gt.color = tempColor;
            yield return null;
        }

        caller.SendMessage("OnFadeFinish");
        fading = false;
    }