![]() |
ManiaMap.Unity
Procedural generation of metroidvania style maps for Unity.
|
Represents a collectable spot. More...
Public Member Functions | |
bool | Acquire () |
If the collectable spot exists and has not already been acquired, adds it to the current layout state's acquired collectables and marks it as acquired. Returns true if this action is performed. More... | |
override void | AutoAssign (RoomComponent room) |
Auto assigns elements to the collectable spot. More... | |
bool | CanAcquire () |
Returns true if the collectable can be acquired. More... | |
bool | CollectableExists () |
True if the collectable spot exists. More... | |
int | CollectableId () |
The collectable ID. If the collectable spot does not exist in the layout, returns -1. More... | |
CollectableSpot | GetMMCollectableSpot () |
Returns new generation data for the collectable spot. More... | |
bool | IsAcquired () |
True if the collectable spot is already acquired. More... | |
Properties | |
bool | EditId [getset] |
If true, the ID can be edited in the inspector. More... | |
CollectableGroup | Group [getset] |
The collectable group. More... | |
int | Id [getset] |
The unique location ID, relative to the cell. More... | |
float | Weight [getset] |
The manual draw weight of the collectable spot. More... | |
![]() | |
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 Member Functions | |
void | OnValidate () |
Private Attributes | |
bool | _editId |
CollectableGroup | _group |
int | _id = -1 |
float | _weight = 1 |
Additional Inherited Members | |
![]() | |
virtual void | Awake () |
virtual void | Initialize () |
Initializes the object. More... | |
virtual void | OnDestroy () |
![]() | |
bool | _autoAssignCell = true |
Vector2Int | _cellIndex |
RoomComponent | _room |
Represents a collectable spot.
Definition at line 10 of file CollectableSpotComponent.cs.
bool Acquire | ( | ) |
If the collectable spot exists and has not already been acquired, adds it to the current layout state's acquired collectables and marks it as acquired. Returns true if this action is performed.
Definition at line 85 of file CollectableSpotComponent.cs.
|
virtual |
Auto assigns elements to the collectable spot.
Reimplemented from CellChild.
Definition at line 96 of file CollectableSpotComponent.cs.
bool CanAcquire | ( | ) |
Returns true if the collectable can be acquired.
Definition at line 75 of file CollectableSpotComponent.cs.
bool CollectableExists | ( | ) |
True if the collectable spot exists.
Definition at line 59 of file CollectableSpotComponent.cs.
int CollectableId | ( | ) |
The collectable ID. If the collectable spot does not exist in the layout, returns -1.
Definition at line 48 of file CollectableSpotComponent.cs.
CollectableSpot GetMMCollectableSpot | ( | ) |
Returns new generation data for the collectable spot.
Definition at line 105 of file CollectableSpotComponent.cs.
bool IsAcquired | ( | ) |
True if the collectable spot is already acquired.
Definition at line 67 of file CollectableSpotComponent.cs.
|
private |
Definition at line 40 of file CollectableSpotComponent.cs.
|
private |
Definition at line 13 of file CollectableSpotComponent.cs.
|
private |
Definition at line 27 of file CollectableSpotComponent.cs.
|
private |
Definition at line 20 of file CollectableSpotComponent.cs.
|
private |
Definition at line 34 of file CollectableSpotComponent.cs.
|
getset |
If true, the ID can be edited in the inspector.
Definition at line 17 of file CollectableSpotComponent.cs.
|
getset |
The collectable group.
Definition at line 31 of file CollectableSpotComponent.cs.
|
getset |
The unique location ID, relative to the cell.
Definition at line 24 of file CollectableSpotComponent.cs.
|
getset |
The manual draw weight of the collectable spot.
Definition at line 38 of file CollectableSpotComponent.cs.