UnityProjekt/Assets/Scripts/ScoreSystem.cs

17 lines
320 B
C#
Raw Normal View History

2020-12-06 17:33:36 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScoreSystem : MonoBehaviour
{
public Text scoreText;
private int _score;
public void AddScore(int score)
{
_score += score;
scoreText.text = "Score: " + _score;
}
}