void ChangePlayerHero(ChooseHero hero) { if (!isPlayerCanChoose) { return; } if (currentPlayerHero != null) { currentPlayerHero.SetPlayer(1, false); } hero.SetPlayer(1, true); currentPlayerHero = hero; PlayerHeroImage.sprite = currentPlayerHero.HeroSprite; }
void ChooseAIHero() { foreach (var cur in heroes) { if (cur.HeroName == HeroesNames.Random) { if (currentAIHero != null) { currentAIHero.SetPlayer(2, false); } cur.SetPlayer(2, true); currentAIHero = cur; AIHeroImage.sprite = currentAIHero.HeroSprite; } } }