Example #1
0
        public static void RegisterAndInitializeState(IHero hero)
        {
            if (HeroStateDictionary.ContainsKey(hero))
                return;

            //When we add a new hero, we initialize a new empty state for it.
            var NewHeroState = new HeroState(hero);

            HeroList.Add(hero);
            HeroStateDictionary.Add(hero, NewHeroState);
        }
Example #2
0
 //TODO: whatever other facts Heroes are allowed to percieve about other heroes.
 public Hero(HeroState hero)
 {
     this.HeroId = hero.HeroId;
     this.Health = hero.Health;
     this.Strength = hero.Strength;
 }
Example #3
0
 internal static void Remove(HeroState hero)
 {
     GameMapState.m_HeroList.Remove(hero);
 }
Example #4
0
 public static void Add(HeroState hero)
 {
     GameMapState.m_HeroList.Add(hero);
 }