public void ActivateObject() { //door.Toggle(); if (!isExit && door != null) { door.Toggle(); } else if (door != null) { component.invoke(); } if (component != null && !isPlayed) { isPlayed = true; component.invoke(); } }
public void PressButton() { //door.Toggle(); if (!isExit) { door.Toggle(); } else { component.invoke(); } //Debug.Log("Ik word aangeroepen"); if (component != null && !isPlayed) { isPlayed = true; component.invoke(); } }