Пример #1
0
        public virtual void Drop(List <object> node, DropPosition mode, bool copy)
        {
            bool runningCompositeTask = Services.TaskService.IsRunningCompositeTask;

            if (!runningCompositeTask)
            {
                Services.TaskService.BeginCompositeTask("Drag drop GameObject");
            }
            foreach (object obj in node)
            {
                if (!copy)
                {
                    IDragSource dragSource = obj as IDragSource;
                    if (dragSource != null)
                    {
                        dragSource.Detach();
                    }
                }
                NodeObject gameObjectData = obj as NodeObject;
                if (gameObjectData != null)
                {
                    this.LoadDropObject(gameObjectData, mode);
                }
            }
            if (runningCompositeTask)
            {
                return;
            }
            Services.TaskService.EndCompositeTask();
        }
Пример #2
0
        public virtual void Drop(List <object> node, DropPosition mode, bool copy)
        {
            bool isRunningCompositeTask = Services.TaskService.IsRunningCompositeTask;

            if (!isRunningCompositeTask)
            {
                Services.TaskService.BeginCompositeTask("Drag drop GameObject");
            }
            foreach (object current in node)
            {
                if (!copy)
                {
                    IDragSource dragSource = current as IDragSource;
                    if (dragSource != null)
                    {
                        dragSource.Detach();
                    }
                }
                NodeObject nodeObject = current as NodeObject;
                if (nodeObject != null)
                {
                    this.LoadDropObject(nodeObject, mode);
                }
            }
            if (!isRunningCompositeTask)
            {
                Services.TaskService.EndCompositeTask();
            }
        }