Example #1
0
    void Awake()
    {
        BallPool.pos = ballHolder.transform.position;
        singleton    = this;
        progress     = saveProgress.Load();
        if (progress.new_Progress)
        {
            aim.CanShoot = true;
            objSetter.AddRow();
        }
        else
        {
            objSetter.LoadObjects(progress.objects);
            objSetter._numberRows = progress.row_Count;
            score.SetScore(progress.currentScore);
            ballsCounter.count = progress.CountBalls;
            ballsCounter.SetText();
            ballHolder.CoutBalls = progress.CountBalls;
            aim.CanShoot         = true;
            aim.Angle            = progress.Angle;
            if (progress.isShooting)
            {
                aim.CanShoot = false;

                ballHolder.PushBalls(progress.Angle);
            }
        }
    }
 // Start is called before the first frame update
 protected virtual void Awake()
 {
     print("Loaded SaveProgress");
     SaveProgress.Load();
 }