Пример #1
0
    /// <summary>
    /// Build the minion type passed in the first parameter.
    /// Returns True if minion has been created
    /// </summary>
    public virtual bool BuildMinion(MinionType t)
    {
        if (!CheckMinionSale(t))
        {
            return(false);
        }
        var cost = _minionManager.GetMinionPrice(t);

        UpdatePoints(-cost);
        _minionManager.SpawnMinion(t, GetInitWalkNode().transform.position
                                   , availableMinions.FirstOrDefault(m => m.minionType == t));
        _minionManager.SetNextMinionFree(GetInitWalkNode());

        return(true);
    }