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