private void Awake() { sizeCellMass = PlayerPrefController.GetSizeValue(); countCrossCells = PlayerPrefController.GetCrossedValue(); if (sizeCellMass < 3) { sizeCellMass = 3; } if (countCrossCells < 3) { countCrossCells = 3; } logic = MainLogic.instance; cellMass = new Cell[sizeCellMass, sizeCellMass]; isRoundStarted = true; EmptyCells = sizeCellMass * sizeCellMass; }
private void LoadSavedData() { optionCrossed.value = PlayerPrefController.GetCrossedValue() - 3; optionSize.value = PlayerPrefController.GetSizeValue() - 3; }
private void Start() { logic = MainLogic.instance; fieldSize = PlayerPrefController.GetSizeValue() != 0 ? PlayerPrefController.GetSizeValue() : 3; crossedCellsCount = PlayerPrefController.GetCrossedValue() != 0 ? PlayerPrefController.GetCrossedValue() : 3; }