Example #1
0
    /// <summary>
    /// Sets up all the entry components based on given activity.
    /// </summary>
    /// <param name="templateArg"></param>
    public void SetupActivityEntry(HavenActivityData templateArg)
    {
        // set texct of activity name
        activityNameText.text = templateArg.activityName;

        // set text of activity's trait points
        trait1PointCountText.text = templateArg.trait1ActivityPoints.ToString();
        trait2PointCountText.text = templateArg.trait2ActivityPoints.ToString();
        trait3PointCountText.text = templateArg.trait3ActivityPoints.ToString();
        trait4PointCountText.text = templateArg.trait4ActivityPoints.ToString();
    }
    private void Setup(HavenActivityData templateArg)
    {
        activityId = templateArg.activityId;

        activityName        = templateArg.activityName;
        activityDescription = templateArg.activityDescription;

        trait1ActivityPoints = templateArg.trait1ActivityPoints;
        trait2ActivityPoints = templateArg.trait2ActivityPoints;
        trait3ActivityPoints = templateArg.trait3ActivityPoints;
        trait4ActivityPoints = templateArg.trait4ActivityPoints;
    }
Example #3
0
    /// <summary>
    /// Adds activity points based on the given activity.
    /// </summary>
    /// <param name="activityArg"></param>
    public void AddActivityPoints(HavenActivityData activityArg)
    {
        // if stat data list does NOT have the correct length
        if (statTypesToStatData.Count != 4)
        {
            // print warning to console
            Debug.LogWarning("Problem in AddActivityPoints(), statTypesToStatData does NOT have the necessary length!");

            // DONT continue code
            return;
        }

        // add activity points to the stat types
        statTypesToStatData[0].AddActivityPoints(activityArg.trait1ActivityPoints);
        statTypesToStatData[1].AddActivityPoints(activityArg.trait2ActivityPoints);
        statTypesToStatData[2].AddActivityPoints(activityArg.trait3ActivityPoints);
        statTypesToStatData[3].AddActivityPoints(activityArg.trait4ActivityPoints);
    }
Example #4
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}");
        }
    }
 public HavenActivityData(HavenActivityData templateArg)
 {
     Setup(templateArg);
 }