Exemplo n.º 1
0
            public static DragDropComponent Read(BinaryReader br)
            {
                DragDropComponent ret = new DragDropComponent();

                ret.Data = br.ReadStructures <UInt32>(1).ToArray();
                return(ret);
            }
Exemplo n.º 2
0
            void OnDragEnd()
            {
                if (mIsDrag == false)
                {
                    return;
                }
//                RaycastHit lastHit = new RaycastHit();
                Ray ray = UIManager.GetInstance().UIMain.MainCam.ScreenPointToRay(Input.mousePosition);

                foreach (RaycastHit hit in Physics.RaycastAll(ray, 50.0f, ColliderMask))
                {
                    if (hit.collider.gameObject != null)
                    {
                        DragDropComponent com = hit.collider.gameObject.GetComponent <DragDropComponent>();
                        if (com != null)
                        {
                            if (onCanDrop != null)
                            {
                                if (onCanDrop(Param, com, com.DropGroup) == true)
                                {
                                }
                            }
                        }
                    }
                }
//                if (Physics.RaycastAll(ray,  out lastHit  , 80.0f , ColliderMask))
//                {
//                    if(lastHit.collider.gameObject != null)
//                    {
//                        DragDropComponent com = lastHit.collider.gameObject.GetComponent<DragDropComponent>();
//                        if(com != null)
//                        {
//                            if(onCanDrop != null)
//                            {
//                                if(onCanDrop(Param , com , com.DropGroup) == true)
//                                {
////                                    return;
//                                }
//                            }
//                        }
//                    }
//                }
                ResetUI();
            }