コード例 #1
0
ファイル: PromotePopup.cs プロジェクト: AftianSpheres/malta
    public void PromoteUnit()
    {
        int manaCost = Adventurer.GetPromoteCostForClass(setClass);

        if (GameDataManager.Instance.SpendManaIfPossible(manaCost))
        {
            adv.PromoteToTier2(setClass);
            shell.Close();
        }
        else
        {
            shell.SurrenderFocus();
            insufficientResourcesPopup.Open();
        }
    }