コード例 #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag.Equals("Player"))
        {
            //couleur
            CheckPointOn();

            //son
            audioSource.Play();

            //set SpawnPoint
            death.SetSpawnPoint(transform.position);
        }
    }
コード例 #2
0
 void Start()
 {
     death       = GameObject.FindObjectOfType <Death>();
     audioSource = GetComponent <AudioSource>();
     death.SetSpawnPoint(new Vector3(0, 0, 0));
 }