Skip to content

Door.cs

Matthew Coulter edited this page Aug 17, 2022 · 1 revision

Door

class/ Inherits from:MonoBehaviour

Description

This class should be attached to the door at the end of a level which leads the player to the next levelIt loads the new scene based on targetSceneName after a duration of waitTime seconds

Public Properties

Property Description Type
onDoorEnter; What else happens when the user enters the door UnityEvent
targetSceneName; What is the name of the scene they are taken to when they enter the door string
waitTime; How long between entering the door and the scene starting to load (in seconds) float

Public Methods

Method Description Returns Parameters Type
EnterDoor Called from the interact method which trigger the UnityEvent and scene load void