示例#1
0
    public static int GetChild(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsNumber(L, 2))
        {
            UnityEngine.Transform arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
            System.Int32          arg1 = (System.Int32)LuaCallback.ToNumber(L, 2);
            UnityEngine.Transform res  = arg0.GetChild(arg1);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        return(0);
    }
        static StackObject *GetChild_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @index = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform) typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.GetChild(@index);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
示例#3
0
        public static int GetChild(IntPtr L)
        {
            int result = 1;
            int count  = LuaDLL.lua_gettop(L);

            if (count != 2)
            {
                LuaStatic.traceback(L, "count not enough");
                LuaDLL.lua_error(L);
                return(result);
            }
            UnityEngine.Transform obj = LuaStatic.GetObj(L, 1) as UnityEngine.Transform;
            Int32 arg1 = (Int32)(double)(LuaStatic.GetObj(L, 2));

            LuaStatic.addGameObject2Lua(L, obj.GetChild(arg1), "Transform");
            return(result);
        }
示例#4
0
        int UnityEngineTransform_m_GetChild(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.Transform gen_to_be_invoked = (UnityEngine.Transform)translator.FastGetCSObj(L, 1);


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

                UnityEngine.Transform gen_ret = gen_to_be_invoked.GetChild(_index);
                translator.Push(L, gen_ret);



                return(1);
            }
        }
示例#5
0
        internal override void OnTrigger()
        {
            base.OnTrigger();
            node = Entity.GetBindPoint(mAttachNode);
            if (node != null)
            {
                int cnt = node.childCount;
                transforms = new UnityEngine.Transform[cnt];
                localPos   = new UnityEngine.Vector3[cnt];
                localRot   = new UnityEngine.Quaternion[cnt];

                for (int i = 0; i < cnt; i++)
                {
                    UnityEngine.Transform t = node.GetChild(i);
                    transforms[i] = t;
                    localPos[i]   = t.localPosition;
                    localRot[i]   = t.localRotation;
                }

                node.DetachChildren();
            }
        }
        static int _m_GetChild(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Transform __cl_gen_to_be_invoked = (UnityEngine.Transform)translator.FastGetCSObj(L, 1);


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

                    UnityEngine.Transform __cl_gen_ret = __cl_gen_to_be_invoked.GetChild(index);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static StackObject *GetChild_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @index = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform) typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.GetChild(@index);

            object obj_result_of_this_method = result_of_this_method;

            if (obj_result_of_this_method is CrossBindingAdaptorType)
            {
                return(ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance));
            }
            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }