Beispiel #1
0
 protected override void BindCharacter(Character character)
 {
     this.boundStat = character.GetStat(this.sourceStat);
     this.boundStat.PropertyChanged += OnBoundStatPropertyChanged;
 }
Beispiel #2
0
 protected override void UnbindCharacter(Character character)
 {
     this.boundStat.PropertyChanged -= OnBoundStatPropertyChanged;
     this.boundStat = null;
 }
Beispiel #3
0
        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;
        }