using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameManager : MonoBehaviour
{
    [SerializeField]
    private GameObject MaxScoreObj;

    public int Score = 0;
    
    public int MaxScore = 0;

    public bool isGameOver = false;
    // Start is called before the first frame update
    void Start()
    {
        Score = 0;
        isGameOver = false;
        MaxScore = MaxScoreObj.GetComponent<MaxScoreScript>().MaxScore;
    }

    // Update is called once per frame
    void Update()
    {
        if(isGameOver)
        {
            if (MaxScoreObj.GetComponent<MaxScoreScript>().MaxScore < Score)
            {
                MaxScoreObj.GetComponent<MaxScoreScript>().MaxScore = Score;
            }
        }
    }
}
