Example #1
0
        public void SetHeroHealth(Heroes hd, int health)
        {
            int index = GetDataIndex(this.Heroes_Health, hd);

            if (index == -1)
            {
                Slot ds = new Slot(hd.GetGlobalID(), health);
                this.Heroes_Health.Add(ds);
            }
            else
            {
                this.Heroes_Health[index].Count = health;
            }
        }
Example #2
0
        public void SetHeroState(Heroes hd, int state)
        {
            int index = GetDataIndex(this.Heroes_States, hd);

            if (index == -1)
            {
                Slot ds = new Slot(hd.GetGlobalID(), state);
                this.Heroes_States.Add(ds);
            }
            else
            {
                this.Heroes_States[index].Count = state;
            }
        }