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

An object tied to the cell index of a RoomComponent. More...

Inheritance diagram for CellChild:
CollectableSpotComponent DoorComponent Feature RoomFlag

Public Member Functions

virtual void AutoAssign (RoomComponent room)
 Performs auto assignment on the object. More...
 

Protected Member Functions

virtual void Awake ()
 
virtual void Initialize ()
 Initializes the object. More...
 
virtual void OnDestroy ()
 

Protected Attributes

bool _autoAssignCell = true
 
Vector2Int _cellIndex
 
RoomComponent _room
 

Properties

bool AutoAssignCell [getset]
 If true, the cell will be automatically assigned to the closest cell when update and save operations are performed. More...
 
Vector2Int CellIndex [getset]
 The containing cell index. More...
 
int Column [getset]
 The column index. More...
 
bool IsInitialized [getprotected set]
 True if the object has been initialized. More...
 
UnityEvent OnInitialize [getset]
 The event invoked after the object is initialized. More...
 
RoomComponent Room [getset]
 The containing room. More...
 
int Row [getset]
 The row index. More...
 

Private Attributes

UnityEvent _onInitialize = new UnityEvent()
 

Detailed Description

An object tied to the cell index of a RoomComponent.

Definition at line 9 of file CellChild.cs.

Member Function Documentation

◆ AutoAssign()

virtual void AutoAssign ( RoomComponent  room)
virtual

Performs auto assignment on the object.

Parameters
roomThe containing room.

Reimplemented in CollectableSpotComponent, DoorComponent, and RoomFlag.

Definition at line 69 of file CellChild.cs.

◆ Awake()

virtual void Awake ( )
protectedvirtual

Definition at line 55 of file CellChild.cs.

◆ Initialize()

virtual void Initialize ( )
protectedvirtual

Initializes the object.

Reimplemented in DoorComponent.

Definition at line 80 of file CellChild.cs.

◆ OnDestroy()

virtual void OnDestroy ( )
protectedvirtual

Definition at line 60 of file CellChild.cs.

Member Data Documentation

◆ _autoAssignCell

bool _autoAssignCell = true
protected

Definition at line 13 of file CellChild.cs.

◆ _cellIndex

Vector2Int _cellIndex
protected

Definition at line 26 of file CellChild.cs.

◆ _onInitialize

UnityEvent _onInitialize = new UnityEvent()
private

Definition at line 39 of file CellChild.cs.

◆ _room

RoomComponent _room
protected

Definition at line 33 of file CellChild.cs.

Property Documentation

◆ AutoAssignCell

bool AutoAssignCell
getset

If true, the cell will be automatically assigned to the closest cell when update and save operations are performed.

Definition at line 18 of file CellChild.cs.

◆ CellIndex

Vector2Int CellIndex
getset

The containing cell index.

Definition at line 30 of file CellChild.cs.

◆ Column

int Column
getset

The column index.

Definition at line 53 of file CellChild.cs.

◆ IsInitialized

bool IsInitialized
getprotected set

True if the object has been initialized.

Definition at line 23 of file CellChild.cs.

◆ OnInitialize

UnityEvent OnInitialize
getset

The event invoked after the object is initialized.

Definition at line 43 of file CellChild.cs.

◆ Room

RoomComponent Room
getset

The containing room.

Definition at line 37 of file CellChild.cs.

◆ Row

int Row
getset

The row index.

Definition at line 48 of file CellChild.cs.


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