private void Awake() { _plants = FindObjectOfType <PlanetMetaController>(); _plants.SetScore(DataModel.LastBattleScore); _ui = GetComponent <GameFinishUi>(); _ui.SetScore(DataModel.LastBattleScore); var b = Instantiate(BlackOut); var bo = b.GetComponent <BlackOut>(); bo.SetColor(Color.black, false); }
private void Awake() { DataModel.Initialize(); _plants = FindObjectOfType <PlanetMetaController>(); _plants.SetScore(DataModel.LastBattleScore, true); var b = Instantiate(BlackOut); var bo = b.GetComponent <BlackOut>(); bo.SetColor(Color.black, false); _infoRoot = GameObject.Find("InfoRoot"); _infoRootCanvas = _infoRoot.GetComponent <CanvasGroup>(); _infoRoot.SetActive(false); _muteButton = GameObject.Find("Mute").GetComponent <Image>(); UpdateMute(); }
public void DoReset() { PlayerPrefs.DeleteAll(); DataModel.Initialize(); _plants.SetScore(DataModel.LastBattleScore, true); }