#include <DungeonData.h>
◆ FDungeonSpawns() [1/2]
| FDungeonSpawns::FDungeonSpawns |
( |
| ) |
|
|
inline |
◆ FDungeonSpawns() [2/2]
284 {
285 Rooms = InitialRooms;
286 }
TArray< FDungeonSpawnRoom > Rooms
Definition DungeonData.h:291
◆ Find()
243 {
244 for(
auto& Room :
Rooms)
245 {
246 if(Room.Type == ActorClass)
247 {
248 return &Room;
249 }
250 }
251 return nullptr;
252 }
◆ FindType()
| EDungeonRoomType FDungeonSpawns::FindType |
( |
const TSubclassOf< AActor > | ActorClass | ) |
const |
|
inline |
254 {
255 for(
auto& Room :
Rooms)
256 {
257 if(Room.Type == ActorClass)
258 {
259 return Room.CalculatedType;
260 }
261 }
262 return EDungeonRoomType::Hallway;
263 }
◆ GetAllRooms()
176 {
178 }
TArray< FDungeonSpawnRoom > GetRoomsWithNumOfExits(const int32 MinExits) const
Definition DungeonData.h:212
◆ GetRooms()
◆ GetRoomsOfType()
| TArray< FDungeonSpawnRoom > FDungeonSpawns::GetRoomsOfType |
( |
const TSubclassOf< AActor > | ActorClass | ) |
|
|
inline |
186 {
187 TArray<FDungeonSpawnRoom> SelectedRooms;
188 for(
auto& Room :
Rooms)
189 {
190 if(Room.Type == ActorClass)
191 {
192 SelectedRooms.Add(Room);
193 }
194 }
195 return SelectedRooms;
196 }
◆ GetRoomsWithExits()
◆ GetRoomsWithNoExits()
◆ GetRoomsWithNumOfExits() [1/2]
| TArray< FDungeonSpawnRoom > FDungeonSpawns::GetRoomsWithNumOfExits |
( |
const int32 | MinExits | ) |
const |
|
inline |
213 {
214 TArray<FDungeonSpawnRoom> SelectedRooms;
215 for(int32 i = 0; i <
Rooms.Num(); ++i)
216 {
217 if(
Rooms[i].IsValid() ==
false){UE_LOG(LogDungeonData,
Warning, TEXT(
"FDungeonSpawns::GetRoomsWithNumOfExits Room %i Not Valid"), i);
continue;}
218
219 if(
Rooms[i].GetExits() >= MinExits)
220 {
221 SelectedRooms.AddUnique(
Rooms[i]);
222 }
223 }
224 return SelectedRooms;
225 }
◆ GetRoomsWithNumOfExits() [2/2]
| TArray< FDungeonSpawnRoom > FDungeonSpawns::GetRoomsWithNumOfExits |
( |
const int32 | MinExits, |
|
|
const int32 | MaxExits ) const |
|
inline |
227 {
228 TArray<FDungeonSpawnRoom> SelectedRooms;
229 for(int32 i = 0; i <
Rooms.Num(); ++i)
230 {
231 if(
Rooms[i].IsValid() ==
false){UE_LOG(LogDungeonData,
Warning, TEXT(
"FDungeonSpawns::GetRoomsWithNumOfExits Room %i Not Valid"), i);
continue;}
232
233 if(
Rooms[i].GetExits() >= MinExits &&
Rooms[i].GetExits() <= MaxExits)
234 {
235
236 SelectedRooms.AddUnique(
Rooms[i]);
237 }
238 }
239 return SelectedRooms;
240 }
◆ IsEmpty()
| bool FDungeonSpawns::IsEmpty |
( |
| ) |
const |
|
inline |
267 {
268 return Rooms.IsEmpty();
269 }
◆ IsValidIndex()
| bool FDungeonSpawns::IsValidIndex |
( |
const int32 | Index | ) |
const |
|
inline |
271 {
272 return Rooms.IsValidIndex(Index);
273 }
◆ Num()
| int32 FDungeonSpawns::Num |
( |
| ) |
const |
|
inline |
◆ Rooms
The documentation for this struct was generated from the following file:
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/ProceduralDungeons/Source/ProceduralDungeons/Public/Data/DungeonData.h