ManiaMap.Godot
Procedural generation of metroidvania style maps for Godot .NET.
CellArea2D Class Reference

Provides area and body entering and exiting detection for a cell. More...

Inheritance diagram for CellArea2D:

Public Member Functions

override void _Ready ()
 

Static Public Member Functions

static CellArea2D CreateInstance (int row, int column, RoomNode2D room, uint collisionMask)
 Creates a new instance with child collision shape and adds it as a child of the specified room. More...
 

Properties

int Column [getprivate set]
 The cell column in the room. More...
 
RoomNode2D Room [getprivate set]
 The containing room. More...
 
int Row [getprivate set]
 The cell row in the room. More...
 

Private Member Functions

void EmitOnCellEntered (Node collision)
 
void EmitOnCellExited (Node collision)
 
void OnAreaEntered (Area2D area)
 
void OnAreaExited (Area2D area)
 
void OnBodyEntered (Node body)
 
void OnBodyExited (Node body)
 

Detailed Description

Provides area and body entering and exiting detection for a cell.

Register to a RoomNode2D's OnCellAreaEntered and OnCellAreaExited signals to monitor these events. When the area detects an entering object, the RoomState cell visibility is automatically updated.

Definition at line 11 of file CellArea2D.cs.

Member Function Documentation

◆ _Ready()

override void _Ready ( )

Definition at line 54 of file CellArea2D.cs.

◆ CreateInstance()

static CellArea2D CreateInstance ( int  row,
int  column,
RoomNode2D  room,
uint  collisionMask 
)
static

Creates a new instance with child collision shape and adds it as a child of the specified room.

Parameters
rowThe cell row.
columnThe cell column.
roomThe containing room.
collisionMaskThe monitored collision mask. Typically, this should match the collision layer of the player character.

Definition at line 35 of file CellArea2D.cs.

◆ EmitOnCellEntered()

void EmitOnCellEntered ( Node  collision)
private

Definition at line 83 of file CellArea2D.cs.

◆ EmitOnCellExited()

void EmitOnCellExited ( Node  collision)
private

Definition at line 89 of file CellArea2D.cs.

◆ OnAreaEntered()

void OnAreaEntered ( Area2D  area)
private

Definition at line 68 of file CellArea2D.cs.

◆ OnAreaExited()

void OnAreaExited ( Area2D  area)
private

Definition at line 78 of file CellArea2D.cs.

◆ OnBodyEntered()

void OnBodyEntered ( Node  body)
private

Definition at line 63 of file CellArea2D.cs.

◆ OnBodyExited()

void OnBodyExited ( Node  body)
private

Definition at line 73 of file CellArea2D.cs.

Property Documentation

◆ Column

int Column
getprivate set

The cell column in the room.

Definition at line 21 of file CellArea2D.cs.

◆ Room

RoomNode2D Room
getprivate set

The containing room.

Definition at line 26 of file CellArea2D.cs.

◆ Row

int Row
getprivate set

The cell row in the room.

Definition at line 16 of file CellArea2D.cs.


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