コード例 #1
0
ファイル: SpellTree.cs プロジェクト: scorvi/dwarfcorp
 public bool CanCast(Spell spell)
 {
     return spell.ManaCost <= Mana;
 }
コード例 #2
0
ファイル: MagicTool.cs プロジェクト: chrisapril/dwarfcorp
 void MagicMenu_SpellTriggered(Spell spell)
 {
     CurrentSpell = spell;
 }
コード例 #3
0
ファイル: MagicMenu.cs プロジェクト: scorvi/dwarfcorp
        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;
        }
コード例 #4
0
 public bool CanCast(Spell spell)
 {
     return(spell.ManaCost <= Mana);
 }
コード例 #5
0
ファイル: MagicMenu.cs プロジェクト: scorvi/dwarfcorp
 public void SpellClicked(Spell spell)
 {
     spell.OnButtonTriggered();
     SpellTriggered.Invoke(spell);
     IsVisible = false;
 }