public void SetSelectedSprite(SuperHeroParts selectedSprite) { selectedPart = selectedSprite; if (selectedSprite != null) { spriteIndex = 0; selected_Sprite.enabled = true; selected_Sprite.sprite = selectedSprite.creatorSprite; } }
public SelectedSuperHero(SuperHeroSettings superHeroSetting) { this.head = superHeroSetting.heads[Random.Range(0, superHeroSetting.heads.Count)]; this.body = superHeroSetting.bodies[Random.Range(0, superHeroSetting.bodies.Count)]; this.leg = superHeroSetting.legs[Random.Range(0, superHeroSetting.legs.Count)]; }