Exemplo n.º 1
0
    public void UnlockMedal(List <string> output, string name, MedalTypes medalId)
    {
        bool unlocked;

        if (this.medalList == null)
        {
            output.Add("Could not unlock " + name + " medal");
            this.NgioReady();
        }
        else if (!this.medalList.TryGetValue((int)medalId, out unlocked))
        {
            output.Add("Programmer f****d up " + name + " medal");
            return;
        }
        else if (!unlocked)
        {
            output.Add("Unlocked the \"" + name + "\" medal");
            this.medalList[(int)medalId] = true;
            unlock medal_unlock = new unlock();
            medal_unlock.id = (int)medalId;
            medal_unlock.callWith(NgCore);
        }
        else
        {
            output.Add("Already have " + name + " medal");
        }

        output.Add("Medals: " + this.medalList.Count(k => k.Value) + "/" + this.medalList.Count);
    }
Exemplo n.º 2
0
 private void FillMedalTypes()
 {
     MedalTypes.Clear();
     MedalTypes.Add(MedalType.Bronze);
     MedalTypes.Add(MedalType.Silver);
     MedalTypes.Add(MedalType.Gold);
 }