Ejemplo n.º 1
0
        public void OnDrop(GameObject go, GameObject draggedObject)
        {
            if (CursorManager.GetInstance().GetDraggingDataType() == DrawDataType.SKILL)
            {
                DraggignSkill _skill = CursorManager.GetInstance().getDraggingData() as DraggignSkill;
                if (null == _skill)
                {
                    return;
                }

                int          oldItemId   = itemId;
                SHORTCUTITEM oldItemType = itemType;

                ButtonBarView.GetInstance().SetShortCut(index, SHORTCUTITEM.SKILL, (int)_skill.skillIndex, true);

                if (_skill.shorCutIndex >= 0)
                {
                    if (oldItemType == SHORTCUTITEM.SKILL)
                    {
                        ButtonBarView.GetInstance().SetShortCut(_skill.shorCutIndex, SHORTCUTITEM.SKILL, (int)oldItemId, true);
                    }
                    else
                    {
                        ButtonBarView.GetInstance().SetShortCut(_skill.shorCutIndex, SHORTCUTITEM.NONE, (int)oldItemId, true);
                        cdValue         = 0;
                        mark.fillAmount = 1f;
                    }
                }
            }
            CursorManager.GetInstance().ClearDragCursor();
        }
Ejemplo n.º 2
0
        public void OnDrag(GameObject go, Vector2 delta)
        {
            DraggignSkill _skill = new DraggignSkill();

            _skill.skillIndex   = itemId;
            _skill.shorCutIndex = index;
            CursorManager.GetInstance().SetDragingCur(icon.atlas, icon.spriteName, DrawDataType.SKILL, _skill);
        }