Esempio n. 1
0
    public int GetValue( STAT_ENTRY entry )
    {
        STAT_COMBINE_METHOD combineMethod = StatsEntryData.instance.GetCombineMethod (entry);

        switch (combineMethod)
        {
        case STAT_COMBINE_METHOD.ADD:
            {
        int val = GetBaseValue( entry );
                foreach ( List<StatsList> listOfLists in m_ModifierLists )
                {
                    foreach ( StatsList statsList in listOfLists )
                    {
                        val += statsList.GetBaseValue( entry );
                    }
                }
                return val;
            }
        case STAT_COMBINE_METHOD.BASE:
        default:
            return GetBaseValue(entry);
        }
    }
Esempio n. 2
0
 public int GetBaseValue( STAT_ENTRY entry )
 {
     return m_Base.ContainsKey( entry ) ? m_Base[entry] : 0;
 }
Esempio n. 3
0
 public Stat( STAT_ENTRY entry, int value )
 {
     m_Entry = entry;
     m_Value = value;
 }
Esempio n. 4
0
 public void SetBaseValue( STAT_ENTRY entry, int value )
 {
     m_Base[entry] = value;
 }
Esempio n. 5
0
 private EntryData GetEntryData( STAT_ENTRY entry )
 {
     return m_Dict.ContainsKey( entry ) ? m_Dict[ entry ] : m_Default;
 }
Esempio n. 6
0
 public STAT_COMBINE_METHOD GetCombineMethod( STAT_ENTRY entry )
 {
     // If the entry isn't in the dictionary, it should use the default method
     EntryData entryData = GetEntryData( entry );
     return entryData.m_Method;
 }