|
|
@@ -4,6 +4,7 @@ using UnityEngine;
|
|
|
|
|
|
public class BackDoor : MonoBehaviour
|
|
|
{
|
|
|
+ public PlayerController owner;
|
|
|
public GameObject door1;
|
|
|
public GameObject door2;
|
|
|
private Collider col1;
|
|
|
@@ -13,7 +14,7 @@ public class BackDoor : MonoBehaviour
|
|
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
|
{
|
|
|
- if (other.gameObject.layer == 6)
|
|
|
+ if (other.gameObject.layer == 6 && other.GetComponentInParent<PlayerController>() == owner)
|
|
|
{
|
|
|
|
|
|
}
|