Beispiel #1
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();
            }
        }
Beispiel #2
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);
                    }
                }
            }
        }
 private void Awake()
 {
     screen = GetComponentInParent <CharacterScreen>();
 }