Beispiel #1
0
 public void SaveSettings(GameObject panelSettings)
 {
     SaveSome.SetParametr(PrefsSave.VolumeSing, _volumeSingBar.value);
     SaveSome.SetParametr(PrefsSave.VolumeEffects, _volumeEffects.value);
     ChangeVolume();
     print(SaveSome.GetParameter(PrefsSave.VolumeEffects, 0));
     IsActiveMenuElements(panelSettings, false, true);
 }
Beispiel #2
0
 private void OnEnable()
 {
     _spawnerCoins.CounterCoins = 0;
     _chargeBar.size            = 0;
     _counterZapsCharge         = (byte)SaveSome.GetParameter(PrefsSave.RedCubes, 0);
     ChangeVolume();
     CountZaps();
 }
Beispiel #3
0
 private void OnTriggerStay(Collider other)
 {
     if (other.gameObject.GetComponent <FigureOptions>())
     {
         if (other.gameObject.GetComponent <IRigibody>().IsUseGravity())
         {
             _as.volume = SaveSome.GetParameter(PrefsSave.VolumeEffects, 0);
             _as.Play();
             _reloaderGame.ReloadAndExit();
         }
     }
 }
Beispiel #4
0
    private void GetAllInformationAboutMenu()
    {
        _progressLVLBar.size   = SaveSome.GetParameter(PrefsSave.LVLPlayerBar, 0);
        _currentLVLPlayer.text = SaveSome.GetParameter(PrefsSave.LVLPlayer, 0).ToString();
        _counterCoins.text     = SaveSome.GetParameter(PrefsSave.Money, 0).ToString();
        _counterRedCubes.text  = SaveSome.GetParameter(PrefsSave.RedCubes, 0).ToString();

        _coinsTakeInfo.text    = SaveSome.GetParameter(PrefsSave.AllCoinsTookInfo, 0).ToString();
        _figureFallInfo.text   = SaveSome.GetParameter(PrefsSave.AllFellFiguresInfo, 0).ToString();
        _cubesDeletedInfo.text = SaveSome.GetParameter(PrefsSave.AllCubesDeleteInfo, 0).ToString();
        _speedFigureInfo.text  = Mathf.Abs(SaveSome.GetParameter(PrefsSave.SpeedFigure, -3.5f)).ToString();

        _volumeSingBar.value = SaveSome.GetParameter(PrefsSave.VolumeSing, 1);
        _volumeEffects.value = SaveSome.GetParameter(PrefsSave.VolumeEffects, 1);
    }
Beispiel #5
0
    private void UpdateLVLPlayer()
    {
        Buffer.BuffSome(PrefsSave.AllCubesDeleteInfo, 10);
        _progressBarLVLPlayer = SaveSome.GetParameter(PrefsSave.LVLPlayerBar, _progressBarLVLPlayer);

        if (_progressBarLVLPlayer >= _maxProgressLVLPlayer)
        {
            Buffer.BuffSome(PrefsSave.LVLPlayer);
            Buffer.BuffSome(PrefsSave.SpeedFigure, _speedPlus);
            _progressBarLVLPlayer = 0;
            // _animatorNext.StartAnimation(SaveSome.GetParameter(PrefsSave.LVLPlayer, 0));
        }

        _progressBarLVLPlayer += _scorePlusLVLPlayer;
        SaveSome.SetParametr(PrefsSave.LVLPlayerBar, _progressBarLVLPlayer);
    }
Beispiel #6
0
    private void OnTriggerStay(Collider other)
    {
        if (other.gameObject.GetComponent <FigureOptions>())
        {
            Vector3 figurePosition = other.gameObject.transform.position;
            other.gameObject.transform.position = new Vector3
                                                  (
                figurePosition.x + _side,
                figurePosition.y,
                figurePosition.z
                                                  );

            _as.volume = SaveSome.GetParameter(PrefsSave.VolumeEffects, 0);
            _as.Play();
            StartCoroutine(StartAnimationUp());
        }
    }
Beispiel #7
0
    private void Start()
    {
        _tr = GetComponent <Transform>();
        _rb = GetComponent <Rigidbody>();
        _bx = GetComponent <BoxCollider>();
        _as = GetComponent <AudioSource>();

        _cubesGameplay     = new GameObject[_vectorCubes.Length];
        _counterChildCubes = (byte)_vectorCubes.Length;
        _as.volume         = SaveSome.GetParameter(PrefsSave.VolumeEffects, 0);
        _cubeCurrent       = GetRandomCube();

        GetSpeed();
        DoNormalSpeed();
        SpawnCubes();
        CreatZoneFigure();
        RandomRotate();
    }
Beispiel #8
0
 private void ChangeVolume()
 {
     _as.volume        = SaveSome.GetParameter(PrefsSave.VolumeEffects, 0);
     _themeMenu.volume = SaveSome.GetParameter(PrefsSave.VolumeSing, 0);
 }
Beispiel #9
0
 private void GetSpeed()
 {
     _speed = SaveSome.GetParameter(PrefsSave.SpeedFigure, _speed);
 }
Beispiel #10
0
 private void ChangeVolume()
 {
     _as        = GetComponent <AudioSource>();
     _as.volume = SaveSome.GetParameter(PrefsSave.VolumeEffects, 0);
 }