Add option not to spawn walkers at begin play
This commit is contained in:
parent
eca43e2aff
commit
68b52dd23d
|
@ -86,7 +86,7 @@ void AWalkerSpawnerBase::BeginPlay()
|
|||
|
||||
GetRandomEngine()->Shuffle(BeginSpawnPoints);
|
||||
|
||||
if (bSpawnWalkers) {
|
||||
if (bSpawnWalkers && bSpawnWalkersAtBeginPlay) {
|
||||
uint32 Count = 0u;
|
||||
for (auto i = 0; i < NumberOfWalkers; ++i) {
|
||||
if (TryToSpawnWalkerAt(*BeginSpawnPoints[i % BeginSpawnPoints.Num()])) {
|
||||
|
|
|
@ -78,10 +78,14 @@ private:
|
|||
|
||||
private:
|
||||
|
||||
/** If false, no walker will be spawned. */
|
||||
/** If false, no walker will be spawned at all. */
|
||||
UPROPERTY(Category = "Walker Spawner", EditAnywhere)
|
||||
bool bSpawnWalkers = true;
|
||||
|
||||
/** If false, no walker will be spawned at begin play. */
|
||||
UPROPERTY(Category = "Walker Spawner", EditAnywhere, meta = (EditCondition = bSpawnWalkers))
|
||||
bool bSpawnWalkersAtBeginPlay = true;
|
||||
|
||||
/** Number of walkers to be present within the volume. */
|
||||
UPROPERTY(Category = "Walker Spawner", EditAnywhere, meta = (EditCondition = bSpawnWalkers, ClampMin = "1"))
|
||||
int32 NumberOfWalkers = 10;
|
||||
|
|
Loading…
Reference in New Issue