private void OnTriggerEnter(Collider other) { if (other.tag.Equals("Player")) { //couleur CheckPointOn(); //son audioSource.Play(); //set SpawnPoint death.SetSpawnPoint(transform.position); } }
void Start() { death = GameObject.FindObjectOfType <Death>(); audioSource = GetComponent <AudioSource>(); death.SetSpawnPoint(new Vector3(0, 0, 0)); }