ManiaMap.Unity
Procedural generation of metroidvania style maps for Unity.
CellArea3D Class Reference

A 3D trigger to detect if an object on a monitored physics layer mask enters or exits a RoomComponent cell. More...

Inheritance diagram for CellArea3D:
CellArea

Static Public Member Functions

static CellArea3D InstantiateCellArea3D (int row, int column, RoomComponent room, int cellLayer, LayerMask triggeringLayers)
 Instantiates a new cell area within the specified room. More...
 
- Static Public Member Functions inherited from CellArea
static CellArea InstantiateCellArea (int row, int column, RoomComponent room, int cellLayer, LayerMask triggeringLayers)
 Instantiates a new cell area within the specified room. More...
 

Properties

BoxCollider Collider [getprivate set]
 The attached box collider. More...
 
- Properties inherited from CellArea
int Column [getprotected set]
 
RoomComponent Room [getprotected set]
 The containing room. More...
 
int Row [getprotected set]
 The row index corresponding to the area. More...
 

Private Member Functions

void Awake ()
 
void OnTriggerEnter (Collider collision)
 Sets the RoomState cell visibility to true and calls the OnCellAreaEntered event on the containing RoomComponent. More...
 
void OnTriggerExit (Collider collision)
 Calls the OnCellAreaExited event on the containing RoomComponent. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CellArea
void Initialize (int row, int column, RoomComponent room)
 Initializes the base properties for the area. More...
 

Detailed Description

A 3D trigger to detect if an object on a monitored physics layer mask enters or exits a RoomComponent cell.

Definition at line 9 of file CellArea3D.cs.

Member Function Documentation

◆ Awake()

void Awake ( )
private

Definition at line 16 of file CellArea3D.cs.

◆ InstantiateCellArea3D()

static CellArea3D InstantiateCellArea3D ( int  row,
int  column,
RoomComponent  room,
int  cellLayer,
LayerMask  triggeringLayers 
)
static

Instantiates a new cell area within the specified room.

Parameters
rowThe row index of the area.
columnThe column index of the area.
roomThe containing room.
cellLayerThe physics layer assigned to the new cell.
triggeringLayersThe physics layer mask that the cell will detect for trigger events.

Definition at line 29 of file CellArea3D.cs.

◆ OnTriggerEnter()

void OnTriggerEnter ( Collider  collision)
private

Sets the RoomState cell visibility to true and calls the OnCellAreaEntered event on the containing RoomComponent.

Parameters
collisionThe collider triggering the event.

Definition at line 53 of file CellArea3D.cs.

◆ OnTriggerExit()

void OnTriggerExit ( Collider  collision)
private

Calls the OnCellAreaExited event on the containing RoomComponent.

Parameters
collisionThe collider triggering the event.

Definition at line 63 of file CellArea3D.cs.

Property Documentation

◆ Collider

BoxCollider Collider
getprivate set

The attached box collider.

Definition at line 14 of file CellArea3D.cs.


The documentation for this class was generated from the following file: