Show / Hide Table of Contents

Class FoeSpawner

Spawn one or more enemies near player. Will attempt to start placing spawns after game objects are set and spawn count greater than 0. This is a generic spawn helper not tied to any specific system. NOTES:

  • Spawns foes immediately. Be careful spawning multiple foes as they are likely to become stuck on each other.
  • The spawner will self-destroy once all foes spawned. Do not attach to anything you want to remain in scene.
  • There is a prefab carrying this component in Prefabs/Scene for easy spawner setups.
  • Will attempt to find best parent at time if none specified (e.g. dungeon, interior).
  • Might need to reduce MinDistance if expecting to spawn in tigt confines like small interiors.
Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
FoeSpawner
Namespace: DaggerfallWorkshop.Game.Utility
Assembly: Assembly-CSharp.dll
Syntax
public class FoeSpawner : MonoBehaviour

Fields

| Improve this Doc View Source

AlliedToPlayer

Declaration
public bool AlliedToPlayer
Field Value
Type Description
Boolean
| Improve this Doc View Source

FoeType

Declaration
public MobileTypes FoeType
Field Value
Type Description
MobileTypes
| Improve this Doc View Source

lastFoeType

Declaration
public MobileTypes lastFoeType
Field Value
Type Description
MobileTypes
| Improve this Doc View Source

LineOfSightCheck

Declaration
public bool LineOfSightCheck
Field Value
Type Description
Boolean
| Improve this Doc View Source

MaxDistance

Declaration
public float MaxDistance
Field Value
Type Description
Single
| Improve this Doc View Source

MinDistance

Declaration
public float MinDistance
Field Value
Type Description
Single
| Improve this Doc View Source

Parent

Declaration
public Transform Parent
Field Value
Type Description
Transform
| Improve this Doc View Source

SpawnCount

Declaration
public int SpawnCount
Field Value
Type Description
Int32

Methods

| Improve this Doc View Source

SetFoeGameObjects(GameObject[], Transform)

Assign an array of pending foe GameObjects to spawn. The spawner will then try to place these foes around player until none remain. Use GameObjectHelper.CreateFoeGameObjects() static method to create foe GameObjects first.

Declaration
public void SetFoeGameObjects(GameObject[] gameObjects, Transform parent = null)
Parameters
Type Name Description
GameObject[] gameObjects
Transform parent

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX