コード例 #1
0
 public void ResetValues()
 {
     AgilityModifier.Reset();
     StrengthModifier.Reset();
     ResistanceModifier.Reset();
     VitalityModifier.Reset();
 }
コード例 #2
0
        /// <inheritdoc />
        public CombatAttribute Convert(AttributeDTO value, object state)
        {
            var entity = new VitalityModifier();

            this.Merge(entity, value, state);
            return(entity);
        }
コード例 #3
0
    public void SetValues()
    {
        //Initialize();
        Player player = LevelController.Player;

        totalSkillPoints     = skillPointByLevel;
        SkillPointsText.text = skillPointByLevel.ToString();

        AgilityModifier.SetValue(Mathf.FloorToInt(player.GetAgility()));
        StrengthModifier.SetValue(Mathf.FloorToInt(player.GetStrength()));
        ResistanceModifier.SetValue(Mathf.FloorToInt(player.GetResistance()));
        VitalityModifier.SetValue(Mathf.FloorToInt(player.GetVitality()));
    }
コード例 #4
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="changeValue"></param>
    private void OnStatLevelChange(int changeValue)
    {
        if (changeValue == 0)
        {
            return;
        }

        totalSkillPoints -= changeValue;
        if (totalSkillPoints == 0)
        {
            AgilityModifier.DenyAdd();
            StrengthModifier.DenyAdd();
            ResistanceModifier.DenyAdd();
            VitalityModifier.DenyAdd();

            transform.Find("LevelUp_Menu/InnerSpace/Level Up Button")
            .GetComponent <Button>()
            .interactable = true;
        }
        else if (totalSkillPoints == 1 && changeValue < 0)
        {
            AgilityModifier.AllowAdd();
            StrengthModifier.AllowAdd();
            ResistanceModifier.AllowAdd();
            VitalityModifier.AllowAdd();

            transform.Find("LevelUp_Menu/InnerSpace/Level Up Button")
            .GetComponent <Button>()
            .interactable = false;
        }

        SkillPointsText.text = totalSkillPoints.ToString();

        Debug.Log(
            message: name + " remaining skill points: " + totalSkillPoints);
    }
コード例 #5
0
 // Implement this method in a buddy class to set properties that are specific to 'VitalityModifier' (if any)
 partial void Merge(VitalityModifier entity, AttributeDTO dto, object state);