public void OnPointerEnter(PointerEventData eventData)
 {
     RPGsys.Character           c          = screen.CurrentChar;
     StatDisplay.StatChangeData statChange = new StatDisplay.StatChangeData();
     statChange.ApplyItemEffects(c.weapon.equippedItem, true);
     statChange.ApplyItemEffects(c.ringL.equippedItem, true);
     statChange.ApplyItemEffects(c.ringR.equippedItem, true);
     screen.DisplayCharacter(statChange);
 }
示例#2
0
        protected override void OnHoverLeave()
        {
            // reset character display if in character screen
            // HACK maybe remove functionality from InventorySlot?
            CharacterScreen screen = GetComponentInParent <CharacterScreen>();

            if (screen != null)
            {
                screen.DisplayCharacter();
            }
        }
示例#3
0
        protected override void OnHoverEnter(Draggable dragged)
        {
            //HACK checking if in character screen
            CharacterScreen screen = GetComponentInParent <CharacterScreen>();

            if (screen != null)
            {
                if (dragged is DraggableItem)
                {
                    DraggableItem di = (DraggableItem)dragged;
                    if (di.itemBox is EquipmentSlotUI)
                    {
                        StatDisplay.StatChangeData statChangeData = new StatDisplay.StatChangeData();
                        statChangeData.ItemToUse = di.itemBox.ContainedItem;
                        statChangeData.ApplyItemEffects(di.itemBox.ContainedItem, true);
                        screen.DisplayCharacter(statChangeData);
                    }
                }
            }
        }