Esempio n. 1
0
    public void CalculateCameraSize()
    {
        float ratio   = (float)Screen.height / Screen.width;
        float myHight = PlayerPrefController.GetSizeValue() * 3 * (ratio >= 1?ratio:1);
        float ortSize = myHight / 2f;

        Camera.main.orthographicSize = Mathf.RoundToInt(ortSize + 0.5f);
    }
Esempio n. 2
0
 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;
 }
Esempio n. 4
0
 private void Start()
 {
     logic = MainLogic.instance;
     fieldSize = PlayerPrefController.GetSizeValue() != 0 ? PlayerPrefController.GetSizeValue() : 3;
     crossedCellsCount = PlayerPrefController.GetCrossedValue() != 0 ? PlayerPrefController.GetCrossedValue() : 3;
 }