A 2D trigger to detect if an object on a monitored physics layer mask enters or exits a RoomComponent cell.
More...
A 2D trigger to detect if an object on a monitored physics layer mask enters or exits a RoomComponent cell.
Definition at line 9 of file CellArea2D.cs.
◆ Awake()
◆ InstantiateCellArea2D()
static CellArea2D InstantiateCellArea2D |
( |
int |
row, |
|
|
int |
column, |
|
|
RoomComponent |
room, |
|
|
int |
cellLayer, |
|
|
LayerMask |
triggeringLayers |
|
) |
| |
|
static |
Instantiates a new cell area within the specified room.
- Parameters
-
row | The row index of the area. |
column | The column index of the area. |
room | The containing room. |
cellLayer | The physics layer assigned to the new cell. |
triggeringLayers | The physics layer mask that the cell will detect for trigger events. |
Definition at line 29 of file CellArea2D.cs.
◆ OnTriggerEnter2D()
void OnTriggerEnter2D |
( |
Collider2D |
collision | ) |
|
|
private |
Sets the RoomState cell visibility to true and calls the OnCellAreaEntered event on the containing RoomComponent.
- Parameters
-
collision | The collider triggering the event. |
Definition at line 55 of file CellArea2D.cs.
◆ OnTriggerExit2D()
void OnTriggerExit2D |
( |
Collider2D |
collision | ) |
|
|
private |
Calls the OnCellAreaExited event on the containing RoomComponent.
- Parameters
-
collision | The collider triggering the event. |
Definition at line 65 of file CellArea2D.cs.
◆ Collider
The documentation for this class was generated from the following file:
- /github/workspace/Packages/ManiaMap.Unity/Scripts/Runtime/CellArea2D.cs