Exemplo n.º 1
0
    public void NewUnit(string unitName, string raceName, string cardinalName, DictPerkBoolDict perkDict, int level)
    {
        PartyEntry entry = Dequeue();

        if (entry.UnitInfo != null)
        {
            entry.UnitInfo = new string[] { unitName, raceName, cardinalName, level.ToString() };
            foreach (var key in perkDict.ToList())
            {
                entry.PerkDict.Add(key.Key, key.Value);
            }
            partyEntries.Add(entry);
        }
        else
        {
            Enqueue(entry);
        }
    }
Exemplo n.º 2
0
    private void ResetPerkTree()
    {
        int unitPerks = 0;

        for (int i = 0; i < perkVertices.Length; ++i)
        {
            perkVertices[i].perkName    = null;
            perkVertices[i].description = null;
            perkVertices[i].IsLearned   = false;
        }
        foreach (var key in unitPerkDict.ToList())
        {
            if (unitPerkDict[key.Key] == true)
            {
                unitPerks++;
            }
            unitPerkDict[key.Key] = false;
        }
        partyBuilder.DemoPerkCount -= unitPerks;
    }