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

public class ScoreCount : MonoBehaviour {

    public static ScoreCount instance;

    public int countScore;

    [SerializeField]
    public Text scoreText;

	void Start () {
        MakeInstance();
	}

    void MakeInstance() {
        if (instance == null) {
            instance = this;
        }
    }
	
	void Update () {
        
	}

    public void CountScore(int count) {
        this.countScore += count;
        scoreText.text = "" + this.countScore;
        GameManager.instance.GameManagerScore(this.countScore);
        GameManager.instance.IfPlayerDied(this.countScore);
    }
}
