示例#1
0
 protected virtual void SetupCursorWorld()
 {
     if (cursorWorld)
     {
         cursorWorld.ApplyIcon(iconSpriteWorld);
         cursorWorld.deleteEnabled = false;
     }
 }
示例#2
0
    private void ApplyDragState()
    {
        if (mIsDragging)
        {
            //dragCursor
            if (_dragCursor)
            {
                _dragCursor.gameObject.SetActive(true);
                _dragCursor.ApplyIcon(dragSpriteIcon);
                _dragCursor.RegisterDropValidCheck(this);
            }

            if (dragActiveGO)
            {
                dragActiveGO.SetActive(true);
            }
            if (dragColorGroup)
            {
                dragColorGroup.ApplyColor(dragActiveColor);
            }
            if (dragInactiveGO)
            {
                dragInactiveGO.SetActive(false);
            }
            if (dragDisplayRoot)
            {
                dragDisplayRoot.gameObject.SetActive(true);
            }
        }
        else
        {
            if (_dragCursor)
            {
                _dragCursor.gameObject.SetActive(false);
                _dragCursor.UnregisterDropValidCheck(this);
            }

            if (dragActiveGO)
            {
                dragActiveGO.SetActive(false);
            }
            if (dragColorGroup)
            {
                dragColorGroup.Revert();
            }
            if (dragInactiveGO)
            {
                dragInactiveGO.SetActive(true);
            }
            if (dragDisplayRoot)
            {
                dragDisplayRoot.gameObject.SetActive(false);
            }
        }
    }