Example #1
0
        private static void populatePartyMemberDataDictionary(ContentManager contentManager)
        {
            List <Dictionary <string, object> > partyMemberDataList = loadItemData(contentManager.RootDirectory + "/Items/PartyMembers.txt");

            foreach (var data in partyMemberDataList)
            {
                PartyMemberData partyMemberData = newObjectFromItemData <PartyMemberData>(data);
                partyMemberDataDictionary.Add(partyMemberData.Name, partyMemberData);
                Logger.Log("Loaded party member '" + partyMemberData.Name + "'");
            }
        }
 public PartyMember(PartyMemberData partyMemberData)
 {
     if (partyMemberData == null)
         throw new Exception("PartyMemberData cannot be null");
     Data = partyMemberData;
     statModifiers = new List<StatModifier>();
     StatusEffects = new List<StatusEffect>();
     BattleEntity = null;
     BattleEntityIdlePosition = Vector2.Zero;
     battleEntityIdleAnimationNameOverride = null;
     generateName();
     resetStats();
 }
Example #3
0
 public PartyMember(PartyMemberData partyMemberData)
 {
     if (partyMemberData == null)
     {
         throw new Exception("PartyMemberData cannot be null");
     }
     Data                     = partyMemberData;
     statModifiers            = new List <StatModifier>();
     StatusEffects            = new List <StatusEffect>();
     BattleEntity             = null;
     BattleEntityIdlePosition = Vector2.Zero;
     battleEntityIdleAnimationNameOverride = null;
     generateName();
     resetStats();
 }
Example #4
0
        public static PartyMember GetNewPartyMember(string name)
        {
            if (name == null)
            {
                return(null);
            }

            PartyMemberData partyMemberData = GetPartyMemberData(name);

            if (partyMemberData == null)
            {
                return(null);
            }
            else
            {
                return(new PartyMember(partyMemberData));
            }
        }