Ejemplo n.º 1
0
 public void OnSetParent(NativeObjectAdapter newParent, int insertionPosition)
 {
     if (newParent != null)
     {
         GameEngine.SetObjectParent(
             m_documentId,
             InstanceId, TypeId,
             newParent.InstanceId, newParent.TypeId, insertionPosition);
     }
     else
     {
         GameEngine.SetObjectParent(
             m_documentId,
             InstanceId, TypeId,
             0, 0, insertionPosition);
     }
 }
Ejemplo n.º 2
0
        public void OnSetParent(XLEBridgeUtils.INativeObjectAdapter newParent, int insertionPosition)
        {
            var p = newParent as NativeObjectAdapter;

            if (p != null)
            {
                GameEngine.SetObjectParent(
                    m_documentId,
                    InstanceId, TypeId,
                    p.InstanceId, p.TypeId, insertionPosition);
            }
            else
            {
                GameEngine.SetObjectParent(
                    m_documentId,
                    InstanceId, TypeId,
                    0, 0, insertionPosition);
            }

            UpdateLocalToWorld();
            UpdateLocalToWorld_Children();
        }