Example #1
0
 // Updates interactability based on character selected
 public void CharacterSelected(RPGsys.Character selectedCharacter)
 {
     if (character == selectedCharacter)
     {
         button.interactable = false;
         background.color    = selectedBGColor;
     }
     else
     {
         button.interactable = true;
         background.color    = defaultBGColor;
     }
 }
        //yeah this whole sectoion is bad but works, refactor later (changes in basically all base stat/buff class)
        //either use a potion or equip an item
        public bool Use(Item item, RPGsys.Character character)
        {
            if (item != null && character != null && playerInventory.IndexOf(item) >= 0)
            {
                Debug.Log("defence of bard Before adding: " + character.Def);
                //if the item can be eaten, uses it and then discards from list, if equipable moves it to character list

                if (character.UseItem(item))
                {
                    Discard(item);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                Debug.Log("Item not found");
                return(false);
            }
        }
Example #3
0
 public void ApplyEffect(RPGsys.Character character)
 {
     Effect.Apply(character, this);
 }
Example #4
0
 public abstract bool IsUsable(RPGsys.Character character);
Example #5
0
 public abstract bool Use(RPGsys.Character character);
Example #6
0
 public void SetCharacter(RPGsys.Character character)
 {
     this.character  = character;
     portrait.sprite = character.ButtonPortrait;
 }