Level Generator 2D

Level Members

The Level type exposes the following members.

Methods


  Name Description
Public method AddNeighbors(Int32, Int32, Int32, Int32, array<String>[]()[][], Boolean)
Adds random neighbors to all open Rooms within range, where an open Room is a Room with a Door that does not have a connecting Room. Neighbors must be loaded from the Resources folder. To set wallBlocks to false without prioritizing file paths, set prioritizedFilePaths to null and wallBlocks to true. When passing larger sections, wallBlocks can lead towards more linear paths.
Public method AddNeighbors(Room, array<String>[]()[][])
Adds random neighbors surrounding the room. Neighbors must be loaded from the Resources folder.
Public method AddRoom
Fills the grid with a room at its specified place and adds the room to the list of open rooms
Public method AddRooms
Fills the grid with rooms at their specified places and adds the rooms to the list of open rooms
Public method BroadcastMessage(String, Object, SendMessageOptions) (Inherited from Component.)
Public method BroadcastMessage(String, Object) (Inherited from Component.)
Public method BroadcastMessage(String) (Inherited from Component.)
Public method BroadcastMessage(String, SendMessageOptions) (Inherited from Component.)
Public method CancelInvoke()()()() (Inherited from MonoBehaviour.)
Public method CancelInvoke(String) (Inherited from MonoBehaviour.)
Public method CloseRoom
Adds neighbors at all of the Room's doors, such that each neighbor will not have any open doors
Public method CloseRooms
Adds neighbors at all of the Rooms' doors, such that each neighbor will not have any open doors
Public method CompareTag (Inherited from Component.)
Public method DestroyRoom
Removes a Room from the level and destroys it
Public method DestroyRooms
Removes Rooms from the level and destroy them
Public method Equals (Inherited from Object.)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public method Static member GetCameraPoint
Gets the global point of the Main Camera based on the level's grid size
Public method GetComponent(Type) (Inherited from Component.)
Public method GetComponent(String) (Inherited from Component.)
Public method GetComponent``1()()()() (Inherited from Component.)
Public method GetComponentInChildren(Type, Boolean) (Inherited from Component.)
Public method GetComponentInChildren(Type) (Inherited from Component.)
Public method GetComponentInChildren``1()()()() (Inherited from Component.)
Public method GetComponentInChildren``1(Boolean) (Inherited from Component.)
Public method GetComponentInParent(Type) (Inherited from Component.)
Public method GetComponentInParent``1()()()() (Inherited from Component.)
Public method GetComponents(Type) (Inherited from Component.)
Public method GetComponents(Type, List<(Of <<'(Component>)>>)) (Inherited from Component.)
Public method GetComponents``1(List<(Of <<'(UMP>)>>)) (Inherited from Component.)
Public method GetComponents``1()()()() (Inherited from Component.)
Public method GetComponentsInChildren(Type) (Inherited from Component.)
Public method GetComponentsInChildren(Type, Boolean) (Inherited from Component.)
Public method GetComponentsInChildren``1(Boolean) (Inherited from Component.)
Public method GetComponentsInChildren``1(Boolean, List<(Of <<'(UMP>)>>)) (Inherited from Component.)
Public method GetComponentsInChildren``1()()()() (Inherited from Component.)
Public method GetComponentsInChildren``1(List<(Of <<'(UMP>)>>)) (Inherited from Component.)
Public method GetComponentsInParent(Type) (Inherited from Component.)
Public method GetComponentsInParent(Type, Boolean) (Inherited from Component.)
Public method GetComponentsInParent``1(Boolean) (Inherited from Component.)
Public method GetComponentsInParent``1(Boolean, List<(Of <<'(UMP>)>>)) (Inherited from Component.)
Public method GetComponentsInParent``1()()()() (Inherited from Component.)
Public method GetDoorSize
Gets the door size for the Rooms
Public method GetHashCode (Inherited from Object.)
Public method GetInstanceID (Inherited from Object.)
Public method GetOpenRooms()()()()
Gets a copy of the list of the Level's open rooms, where an open room is a room with a door, but no attached neighbor to that door
Public method GetOpenRooms(Int32, Int32, Int32, Int32)
Gets a copy of the list of the Level's open rooms within the left, bottom, right, and top bounds
Public method GetRoom
Gets the room at the global point, or returns null if there is none.
Public method GetRooms()()()()
Gets a copy of all of the Level's Rooms
Public method GetRooms(Int32, Int32, Int32, Int32)
Gets a copy of the list of the Level's rooms within the left, bottom, right, and top bounds
Public method GetRoomsVisibleByCamera
Gets all of the Rooms which are currently visible by the camera
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method GetWallTexture
Gets the wall texture for the Rooms
Public method GetWallThickness
Gets the thickness to be used for walls
Public method GetWallWidth
Gets the wall thickness for the Rooms
Public method Invoke (Inherited from MonoBehaviour.)
Public method InvokeRepeating (Inherited from MonoBehaviour.)
Public method IsInvoking(String) (Inherited from MonoBehaviour.)
Public method IsInvoking()()()() (Inherited from MonoBehaviour.)
Public method IsPersistantRooms
Gets whether or not the rooms will be persistant, opposed to being destroyed when out of range
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method SendMessage(String, Object, SendMessageOptions) (Inherited from Component.)
Public method SendMessage(String, Object) (Inherited from Component.)
Public method SendMessage(String) (Inherited from Component.)
Public method SendMessage(String, SendMessageOptions) (Inherited from Component.)
Public method SendMessageUpwards(String, Object, SendMessageOptions) (Inherited from Component.)
Public method SendMessageUpwards(String, Object) (Inherited from Component.)
Public method SendMessageUpwards(String) (Inherited from Component.)
Public method SendMessageUpwards(String, SendMessageOptions) (Inherited from Component.)
Public method SetDoorSize
Changes the door size for the Rooms
Public method SetPersistantRooms
Sets whether or not the rooms will be persistant, opposed to being destroyed when out of range
Public method SetWallTexture
Sets the wall texture for the rooms
Public method SetWallThickness
Sets the thickness to be used for walls
Public method StartCoroutine(IEnumerator) (Inherited from MonoBehaviour.)
Public method StartCoroutine(String, Object) (Inherited from MonoBehaviour.)
Public method StartCoroutine(String) (Inherited from MonoBehaviour.)
Public method StartCoroutine_Auto (Inherited from MonoBehaviour.)
Public method StopAllCoroutines (Inherited from MonoBehaviour.)
Public method StopCoroutine(String) (Inherited from MonoBehaviour.)
Public method StopCoroutine(IEnumerator) (Inherited from MonoBehaviour.)
Public method StopCoroutine(Coroutine) (Inherited from MonoBehaviour.)
Public method ToString (Inherited from Object.)

Fields


  Name Description
Public field Static member GridSize
Size of a single grid segment in Unity units

Properties


  Name Description
Public property animation (Inherited from Component.)
Public property audio (Inherited from Component.)
Public property camera (Inherited from Component.)
Public property collider (Inherited from Component.)
Public property collider2D (Inherited from Component.)
Public property constantForce (Inherited from Component.)
Public property enabled (Inherited from Behaviour.)
Public property gameObject (Inherited from Component.)
Public property guiElement (Inherited from Component.)
Public property guiText (Inherited from Component.)
Public property guiTexture (Inherited from Component.)
Public property hideFlags (Inherited from Object.)
Public property hingeJoint (Inherited from Component.)
Public property isActiveAndEnabled (Inherited from Behaviour.)
Public property light (Inherited from Component.)
Public property name (Inherited from Object.)
Public property networkView (Inherited from Component.)
Public property particleEmitter (Inherited from Component.)
Public property particleSystem (Inherited from Component.)
Public property renderer (Inherited from Component.)
Public property rigidbody (Inherited from Component.)
Public property rigidbody2D (Inherited from Component.)
Public property tag (Inherited from Component.)
Public property transform (Inherited from Component.)
Public property useGUILayout (Inherited from MonoBehaviour.)