gimm-platformer-project/Assets/Scripts/ScoreCounter.cs

22 lines
453 B
C#
Raw Normal View History

2021-09-24 00:34:18 -06:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScoreCounter : MonoBehaviour
{
Text text;
public static int coinAmount;
// Start is called before the first frame update
void Start()
{
text = GetComponent<Text>();
}
// Update is called once per frame
void Update()
{
text.text = coinAmount.ToString();
}
}