using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class Restart : MonoBehaviour { public Text DususText; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } private void OnTriggerEnter(Collider other) { if (other.GetComponent(typeof(PlayerController))) { other.transform.position = new Vector3 (-2,20.8f,-4); other.GetComponent().DususSayisi++; DususText.text = "Düşüş Sayısı: " + other.GetComponent().DususSayisi++; } } }