Exemplo n.º 1
0
        public static int DetachChildren(IntPtr L)
        {
            int result = 1;
            int count  = LuaDLL.lua_gettop(L);

            if (count != 1)
            {
                LuaStatic.traceback(L, "count not enough");
                LuaDLL.lua_error(L);
                return(result);
            }
            UnityEngine.Transform obj = LuaStatic.GetObj(L, 1) as UnityEngine.Transform;
            obj.DetachChildren();
            return(result);
        }
Exemplo n.º 2
0
        int UnityEngineTransform_m_DetachChildren(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


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


            {
                gen_to_be_invoked.DetachChildren(  );



                return(0);
            }
        }
Exemplo n.º 3
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();
            }
        }