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

A unique room flag. More...

Inheritance diagram for RoomFlag:
CellChild

Public Member Functions

override void AutoAssign (RoomComponent room)
 Performs auto assignment on the object. More...
 
bool FlagIsSet ()
 True if the flag is set. More...
 
bool RemoveFlag ()
 Removes the flag. Returns true if the flag was removed. More...
 
bool SetFlag ()
 Sets the flag. Returns true if the flag was not already set. More...
 
bool ToggleFlag ()
 Toggles the flag. Returns true if the flag is now set. Otherwise, returns false. More...
 

Properties

bool EditId [getset]
 If true, the ID can be edited in the inspector. More...
 
int Id [getset]
 The unique flag ID. More...
 
- Properties inherited from CellChild
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

bool _editId
 
int _id = -1
 

Additional Inherited Members

- Protected Member Functions inherited from CellChild
virtual void Awake ()
 
virtual void Initialize ()
 Initializes the object. More...
 
virtual void OnDestroy ()
 
- Protected Attributes inherited from CellChild
bool _autoAssignCell = true
 
Vector2Int _cellIndex
 
RoomComponent _room
 

Detailed Description

A unique room flag.

Definition at line 8 of file RoomFlag.cs.

Member Function Documentation

◆ AutoAssign()

override void AutoAssign ( RoomComponent  room)
virtual

Performs auto assignment on the object.

Parameters
roomThe containing room.

Reimplemented from CellChild.

Definition at line 23 of file RoomFlag.cs.

◆ FlagIsSet()

bool FlagIsSet ( )

True if the flag is set.

Definition at line 32 of file RoomFlag.cs.

◆ RemoveFlag()

bool RemoveFlag ( )

Removes the flag. Returns true if the flag was removed.

Definition at line 48 of file RoomFlag.cs.

◆ SetFlag()

bool SetFlag ( )

Sets the flag. Returns true if the flag was not already set.

Definition at line 40 of file RoomFlag.cs.

◆ ToggleFlag()

bool ToggleFlag ( )

Toggles the flag. Returns true if the flag is now set. Otherwise, returns false.

Definition at line 56 of file RoomFlag.cs.

Member Data Documentation

◆ _editId

bool _editId
private

Definition at line 11 of file RoomFlag.cs.

◆ _id

int _id = -1
private

Definition at line 17 of file RoomFlag.cs.

Property Documentation

◆ EditId

bool EditId
getset

If true, the ID can be edited in the inspector.

Definition at line 15 of file RoomFlag.cs.

◆ Id

int Id
getset

The unique flag ID.

Definition at line 21 of file RoomFlag.cs.


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