コード例 #1
0
 public void PlayerDie()
 {
     gpc.LastChance();
     rb.isKinematic = true;
     GetComponent <BoxCollider>().isTrigger = true;
     deathSfx.Play();
 }
コード例 #2
0
    private void OnTriggerEnter(Collider col)
    {
        GameObject gameObject = col.gameObject;

        if (gameObject.name.StartsWith("Player"))
        {
            player.PlayerDie();
            gpc.LastChance();
        }
    }