using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class scoremaneger : MonoBehaviour{

    public static scoremaneger instance;
    public Text text;
    int score;

    // Start is called before the first frame update
    void Start()
    {

        if (instance == null)
        {
            instance = this;
        }

    }
    public void ChangeScore(int starValue){
        score += starValue;
        text.text = "x" + score.ToString();
        if (score == 7){
            SceneManager.LoadScene("win");
        }
    }

}
