Exemplo n.º 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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 internal static void Remove(HeroState hero)
 {
     GameMapState.m_HeroList.Remove(hero);
 }
Exemplo n.º 4
0
 public static void Add(HeroState hero)
 {
     GameMapState.m_HeroList.Add(hero);
 }