TKK_E32231768/Assets/6Script/quiz/skor.cs

21 lines
441 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class skor : MonoBehaviour
{
public string restartScore;
// Start is called before the first frame update
void Start()
{
PlayerPrefs.SetInt("skor", 0);
}
// Update is called once per frame
void Update()
{
GetComponent<Text>().text = PlayerPrefs.GetInt("skor").ToString();
}
}