Beispiel #1
0
        //public Card[] cards;
        public static Hero addDataFromPlayerSpawn(Hero hero, string logString)
        {
            var playerAssignedHeroMatch = Regexes.playerAssignedHero.Match(logString);

            hero.player = int.Parse(playerAssignedHeroMatch.Groups["player"].Value);
            hero.heroType = (HeroType)Enum.Parse(typeof(HeroType), Regex.Replace(playerAssignedHeroMatch.Groups["heroId"].Value, "[^0-9]", ""));
            hero.team = (Team)Enum.Parse(typeof(Team), playerAssignedHeroMatch.Groups["team"].Value);
            hero.name = playerAssignedHeroMatch.Groups["name"].Value;

            return hero;
        }
Beispiel #2
0
 internal void RaiseEvent(Hero eventData) { Event(this, eventData); }