OnPlayerEnter(Agent : agent) : void = if (not DoorIsOpen?): # If the door is closed, open it. set DoorIsOpen = true door_mover.MoveToEnd() # Play a beep sound here! # e.g. open_sound.Play() where open_sound is an # @editable customizable_audio_player_device else: # The door is already open — nothing extra to do. false OnPlayerExit(Agent : agent) : void = if (DoorIsOpen?): # If the door is open, close it. set DoorIsOpen = false door_mover.MoveToBegin() # Play a whoosh sound here! # e.g. close_sound.Play() where close_sound is an # @editable customizable_audio_player_device else: # The door is already closed — nothing extra to do. false