Third Person Cover Shooter  1.6
CoverShooter.SpawnPicker Class Reference

Manages a collection of spanw groups. More...

Inheritance diagram for CoverShooter.SpawnPicker:

Public Member Functions

void Spawn (Actor caller)
 Picks an area to spawn enemies at. More...
 
void SpawnSpecific (SpawnGroup group, Actor caller, bool isForced=false)
 Instantiates prefabs on the specific group. More...
 
IEnumerable< GameObject > SpawnAndReturn (SpawnGroup group, Actor caller, bool isForced=false)
 Instantiates and returns prefabs on all spawn points. More...
 

Public Attributes

SpawnGroup [] Areas
 A list of areas, the best will be chosen to spawn enemies. More...
 
int MinCount = 999
 Minimal number of possible spawn points used in a group. More...
 
int MaxCount = 999
 Maximum number of possible spawn points used in a group. More...
 
CharacterMotor Player
 Player whose vision and position are used to determine which area is the best for spawning. More...
 
float MinDistance = 32
 An area won't be considered if it is closer than this distance. More...
 
GameObject [] PrefabOverride
 Prefabs to use when spawning. More...
 
float MinInterval = 6
 Time in seconds before another call to spawn is allowed. More...
 
SpawnPicker Secondary
 Another spawn picker to trigger instead by random chance. More...
 
float SecondaryChance = 0.5f
 Chance that a secondary picker group will be used. More...
 
bool UseNoneSecondary = false
 By default Secondary Chance is evaluated only if Secondary is not none. More...
 

Detailed Description

Manages a collection of spanw groups.

Can override prefabs instantiated inside those. When spawning, selects the most appropriate group based on the player orientation and position.

Member Function Documentation

◆ Spawn()

void CoverShooter.SpawnPicker.Spawn ( Actor  caller)

Picks an area to spawn enemies at.

◆ SpawnAndReturn()

IEnumerable<GameObject> CoverShooter.SpawnPicker.SpawnAndReturn ( SpawnGroup  group,
Actor  caller,
bool  isForced = false 
)

Instantiates and returns prefabs on all spawn points.

◆ SpawnSpecific()

void CoverShooter.SpawnPicker.SpawnSpecific ( SpawnGroup  group,
Actor  caller,
bool  isForced = false 
)

Instantiates prefabs on the specific group.

Member Data Documentation

◆ Areas

SpawnGroup [] CoverShooter.SpawnPicker.Areas

A list of areas, the best will be chosen to spawn enemies.

◆ MaxCount

int CoverShooter.SpawnPicker.MaxCount = 999

Maximum number of possible spawn points used in a group.

◆ MinCount

int CoverShooter.SpawnPicker.MinCount = 999

Minimal number of possible spawn points used in a group.

◆ MinDistance

float CoverShooter.SpawnPicker.MinDistance = 32

An area won't be considered if it is closer than this distance.

◆ MinInterval

float CoverShooter.SpawnPicker.MinInterval = 6

Time in seconds before another call to spawn is allowed.

◆ Player

CharacterMotor CoverShooter.SpawnPicker.Player

Player whose vision and position are used to determine which area is the best for spawning.

◆ PrefabOverride

GameObject [] CoverShooter.SpawnPicker.PrefabOverride

Prefabs to use when spawning.

Overrides the ones specified in SpawnGroups.

◆ Secondary

SpawnPicker CoverShooter.SpawnPicker.Secondary

Another spawn picker to trigger instead by random chance.

◆ SecondaryChance

float CoverShooter.SpawnPicker.SecondaryChance = 0.5f

Chance that a secondary picker group will be used.

Ignored if it not set to any.

◆ UseNoneSecondary

bool CoverShooter.SpawnPicker.UseNoneSecondary = false

By default Secondary Chance is evaluated only if Secondary is not none.

Enabling this property allows evaluating even if Secondary is none.


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