void GetEvolution(EvolutionPlace place) { if (place == EvolutionPlace.LEFT) { left_evo = all_evolutions[to_show_index[index]]; } else if (place == EvolutionPlace.CENTER) { center_evo = all_evolutions[to_show_index[index]]; } else if (place == EvolutionPlace.RIGHT) { right_evo = all_evolutions[to_show_index[index]]; } }
void SetEvolution(EvolutionPlace place) { //Show possible evolutions to upgrade only if (to_show_index.Count > 0) { //Get a random evo from the sow list index = Random.Range(0, to_show_index.Count); //Get Left evolution element GetEvolution(place); //Remove from the show list to_show_index.RemoveAt(index); //Set Element at the correct place SetEvoPosition(place); } }
void SetEvoPosition(EvolutionPlace place) { if (place == EvolutionPlace.LEFT) { left_evo.transform.Translate(new Vector3(-220f, 0, 0)); left_evo.SetActive(true); } else if (place == EvolutionPlace.CENTER) { left_evo.transform.Translate(new Vector3(0, 0, 0)); center_evo.SetActive(true); } else if (place == EvolutionPlace.RIGHT) { right_evo.transform.Translate(new Vector3(220.0f, 0, 0)); right_evo.SetActive(true); } }