Esempio n. 1
0
 public void AddOffensiveAbility(OffensiveAbility oa)
 {
     bool present = false;
     foreach (OffensiveAbility i in offensiveAbilities)
     {
         if (i.GetAbilityTag() == oa.GetAbilityTag())
         {
             present = true;
         }
     }
     if (!present) {
         offensiveAbilities.Add (oa);
         Debug.Log ("Ability" + oa.GetAbilityTag () + " added.");
     } else {
         Debug.Log ("Ability" + oa.GetAbilityTag () + " already present.");
     }
 }
Esempio n. 2
0
 public void RemoveOffensiveAbility(OffensiveAbility oa)
 {
     foreach (OffensiveAbility i in offensiveAbilities)
     {
         if (i.GetAbilityTag() == oa.GetAbilityTag())
         {
             offensiveAbilities.Remove(i);
             break;
         }
     }
 }
Esempio n. 3
0
    public void AddOffensiveAbility(OffensiveAbility oa)
    {
        bool   present = false;
        string log;

        foreach (OffensiveAbility i in offensiveAbilities)
        {
            if (i.GetAbilityTag() == oa.GetAbilityTag())
            {
                present = true;
            }
        }
        if (!present)
        {
            offensiveAbilities.Add(oa);
            log = ("\nAbility " + oa.GetAbilityTag() + " added.\n");
            Debug.Log(log);
            WriteToOutputFile(log);
        }
        else
        {
            Debug.Log("Ability " + oa.GetAbilityTag() + " already present.");
        }
    }
Esempio n. 4
0
 public void RemoveOffensiveAbility(OffensiveAbility oa)
 {
     foreach (OffensiveAbility i in offensiveAbilities) {
         if (i.GetAbilityTag() == oa.GetAbilityTag()) {
             offensiveAbilities.Remove (i);
             break;
         }
     }
 }