Liberi
An exergame built for kids with CP!
CharacterTrait.cs
1 using UnityEngine;
2 using System;
3 
7 [Serializable]
8 public class CharacterTrait
9 {
10  public float FinalPercentage
11  {
12  get { return BasePercentage + PercentageChange; }
13  }
14 
15  public float PercentageChange
16  {
17  get { return PointPercentage * _points; }
18  }
19 
20  public int Points
21  {
22  get { return _points; }
23  set { _points = Mathf.Clamp(value, 0, MaxPoints); }
24  }
25 
26  public string ID;
27  public float BasePercentage;
28  public float PointPercentage;
29  public int MaxPoints;
30 
31  int _points = 0;
32 
33  [NonSerialized]
34  public Character Character;
35 }
(Deprecated) Descibes a trait for a character.
Avatar character management component. In charge of personas, skills and buffs.
Definition: Character.cs:12