Ejemplo n.º 1
0
        public void OnDrop(PointerEventData eventData)
        {
            DragItem item = eventData.pointerDrag.GetComponent <DragItem>();

            if (item.Moveable != null && item.Moveable is Ability)
            {
                SetAbility(item.Moveable as Ability, item);

                Ability a     = Array.Find(gameManager.MasterAbilityList, x => x.Icon.name == item.Moveable.Icon.name);
                int     index = Array.FindIndex(UIManager.Instance.ActionButtons, x => x.Button.name == Button.name);
                gameManager.savegameManager.AbilityDict.Add(index + 1, a.name);
            }
        }
Ejemplo n.º 2
0
 public void SetAbility(Ability ability, DragItem item)
 {
     Ability     = ability;
     icon.sprite = item.Moveable.Icon;
     icon.color  = Color.white;
 }