protected override void BindCharacter(Character character) { this.boundStat = character.GetStat(this.sourceStat); this.boundStat.PropertyChanged += OnBoundStatPropertyChanged; }
protected override void UnbindCharacter(Character character) { this.boundStat.PropertyChanged -= OnBoundStatPropertyChanged; this.boundStat = null; }
public Stat GetStat(string name) { Stat stat; if (!statDictionary.TryGetValue(name, out stat)) { stat = new Stat { Name = name }; statDictionary.Add(name, stat); this.stats.Add(stat); } return stat; }