public void ResetFlagsCount() { flagsCount = fieldProcs.GetMinesCount(); if (currGameIsEndless) { flagsCount = 0; } FlagsCounterText.GetComponent <Text> ().text = flagsCount.ToString(); }
void Start() { GameObject gameController = GameObject.FindGameObjectWithTag("GameController"); mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); fieldMover = gameController.GetComponent <FieldMover> (); uiProcs = gameController.GetComponent <UIProcs> (); fieldProcs = GameObject.FindGameObjectWithTag("Field").GetComponent <FieldProcs> (); needcells = fieldProcs.GetFieldSize() * fieldProcs.GetFieldSize() * 6 - fieldProcs.GetMinesCount(); }