Ejemplo n.º 1
0
 private void Setup(HavenProgressionStatsSet templateArg)
 {
     statTypesToStatData = new List <HavenProgressionStatData>();
     foreach (HavenProgressionStatData iterData in templateArg.statTypesToStatData)
     {
         statTypesToStatData.Add(new HavenProgressionStatData(iterData));
     }
 }
Ejemplo n.º 2
0
    /// <summary>
    /// Returns the progress stats data associated with the given character ID and stat type.
    /// </summary>
    /// <param name="charIdArg"></param>
    /// <param name="statTypeNumArg"></param>
    /// <returns></returns>
    private HavenProgressionStatData GetCharProgressStatData(string charIdArg, int statTypeNumArg)
    {
        // get progress stat set associated with given character ID
        HavenProgressionStatsSet progStatsSet = GetCharProgressStatsSet(charIdArg);

        // if associated progress stat set actually existed
        if (progStatsSet != null)
        {
            // return stat type's progress stat data
            return(progStatsSet.GetProgressStatData(statTypeNumArg));
        }
        // else data NOT found
        else
        {
            // return NULL data
            return(null);
        }
    }
Ejemplo n.º 3
0
    /// <summary>
    /// Adds activity points to the given character's progression stats based on given activity.
    /// </summary>
    /// <param name="charIdArg"></param>
    /// <param name="activityArg"></param>
    public void AddActivityPoints(string charIdArg, HavenActivityData activityArg)
    {
        // get prog stat set associated with given character ID
        HavenProgressionStatsSet statSet = GetCharProgressStatsSet(charIdArg);

        // if stat set was found
        if (statSet != null)
        {
            // adds activity points based on the given activity
            statSet.AddActivityPoints(activityArg);
        }
        // else no such stat set could be found
        else
        {
            // print warning to console
            Debug.LogWarning("Problem in AddActivityPoints(), NO prog stat set associated with " +
                             $"given char ID: {charIdArg}");
        }
    }
 private void Setup(SerializableDataStringAndHavenProgressionStatsSet templateArg)
 {
     value1 = templateArg.value1;
     value2 = new HavenProgressionStatsSet(templateArg.value2);
 }
 private void Setup(string value1Arg, HavenProgressionStatsSet value2Arg)
 {
     value1 = value1Arg;
     value2 = new HavenProgressionStatsSet(value2Arg);
 }
 private void Setup()
 {
     value1 = string.Empty;
     value2 = new HavenProgressionStatsSet();
 }
 public SerializableDataStringAndHavenProgressionStatsSet(string value1Arg,
                                                          HavenProgressionStatsSet value2Arg)
 {
     Setup(value1Arg, value2Arg);
 }
Ejemplo n.º 8
0
 public HavenProgressionStatsSet(HavenProgressionStatsSet templateArg)
 {
     Setup(templateArg);
 }