public bool CanCast(Spell spell) { return spell.ManaCost <= Mana; }
void MagicMenu_SpellTriggered(Spell spell) { CurrentSpell = spell; }
private void ItemTabOnClicked(Spell item) { CurrentSpell = item; KnownSpellTab.InfoTitle.Text = item.Name; KnownSpellTab.InfoImage.Image = item.Image; KnownSpellTab.InfoDescription.Text = item.Description + "\n" + " * " + item.Hint; KnownSpellTab.CastButton.IsVisible = true; string additional = ""; KnownSpellTab.InfoDescription.Text += additional; string requirementsText = "Requires " + item.ManaCost + " mana."; KnownSpellTab.InfoRequirements.Text = requirementsText; }
public bool CanCast(Spell spell) { return(spell.ManaCost <= Mana); }
public void SpellClicked(Spell spell) { spell.OnButtonTriggered(); SpellTriggered.Invoke(spell); IsVisible = false; }