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

public class Skore : MonoBehaviour
{
    public int Score;
    public Text scoreText;
    void Start()
    {
        Score = 0;
    }
    private void Update()
    {
        scoreText.text = "Score: " + Score;
    }

    private void OnTriggerEnter(Collider other)
    {
        if(other.gameObject.tag == "Enemy")
        {
            Score++;

            Destroy(other.gameObject);
        }
    }
}
