Show / Hide Table of Contents

Class GameManager

GameManager singleton class.

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
GameManager
Namespace: DaggerfallWorkshop.Game
Assembly: Assembly-CSharp.dll
Syntax
public class GameManager : MonoBehaviour

Fields

| Improve this Doc View Source

classicUpdateInterval

Update every 1/16 of a second. An approximation of classic's update loop, which varies with framerate.

Declaration
public const float classicUpdateInterval = 0.0625F
Field Value
Type Description
Single
| Improve this Doc View Source

Verbose

Declaration
public bool Verbose
Field Value
Type Description
Boolean

Properties

| Improve this Doc View Source

AcrobatMotor

Declaration
public AcrobatMotor AcrobatMotor { get; set; }
Property Value
Type Description
AcrobatMotor
| Improve this Doc View Source

ClassicUpdate

Declaration
public static bool ClassicUpdate { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

ClimbingMotor

Declaration
public ClimbingMotor ClimbingMotor { get; set; }
Property Value
Type Description
ClimbingMotor
| Improve this Doc View Source

DisableAI

Declaration
public bool DisableAI { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

DungeonParent

Declaration
public GameObject DungeonParent { get; set; }
Property Value
Type Description
GameObject
| Improve this Doc View Source

EntityEffectBroker

Declaration
public EntityEffectBroker EntityEffectBroker { get; set; }
Property Value
Type Description
EntityEffectBroker
| Improve this Doc View Source

ExteriorAutomap

Declaration
public ExteriorAutomap ExteriorAutomap { get; set; }
Property Value
Type Description
ExteriorAutomap
| Improve this Doc View Source

ExteriorParent

Declaration
public GameObject ExteriorParent { get; set; }
Property Value
Type Description
GameObject
| Improve this Doc View Source

FloatingOrigin

Declaration
public FloatingOrigin FloatingOrigin { get; set; }
Property Value
Type Description
FloatingOrigin
| Improve this Doc View Source

FrictionMotor

Declaration
public FrictionMotor FrictionMotor { get; set; }
Property Value
Type Description
FrictionMotor
| Improve this Doc View Source

GuildManager

Declaration
public GuildManager GuildManager { get; set; }
Property Value
Type Description
GuildManager
| Improve this Doc View Source

HasInstance

Checks if singleton instance is available without causing side effects.

Declaration
public static bool HasInstance { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Instance

Gets or instantiate singleton.

Declaration
public static GameManager Instance { get; }
Property Value
Type Description
GameManager
| Improve this Doc View Source

InteriorAutomap

Declaration
public Automap InteriorAutomap { get; set; }
Property Value
Type Description
Automap
| Improve this Doc View Source

InteriorParent

Declaration
public GameObject InteriorParent { get; set; }
Property Value
Type Description
GameObject
| Improve this Doc View Source

IsGamePaused

Declaration
public static bool IsGamePaused { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsPlayerInside

Declaration
public bool IsPlayerInside { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsPlayerInsideBuilding

Declaration
public bool IsPlayerInsideBuilding { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsPlayerInsideCastle

Declaration
public bool IsPlayerInsideCastle { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsPlayerInsideDungeon

Declaration
public bool IsPlayerInsideDungeon { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsPlayerOnHUD

Declaration
public bool IsPlayerOnHUD { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsReady

Declaration
public bool IsReady { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

ItemHelper

Declaration
public ItemHelper ItemHelper { get; set; }
Property Value
Type Description
ItemHelper
| Improve this Doc View Source

MainCamera

Declaration
public Camera MainCamera { get; set; }
Property Value
Type Description
Camera
| Improve this Doc View Source

MainCameraObject

Declaration
public GameObject MainCameraObject { get; set; }
Property Value
Type Description
GameObject
| Improve this Doc View Source

PlayerActivate

Declaration
public PlayerActivate PlayerActivate { get; set; }
Property Value
Type Description
PlayerActivate
| Improve this Doc View Source

PlayerController

Declaration
public CharacterController PlayerController { get; set; }
Property Value
Type Description
CharacterController
| Improve this Doc View Source

PlayerDeath

Declaration
public PlayerDeath PlayerDeath { get; set; }
Property Value
Type Description
PlayerDeath
| Improve this Doc View Source

PlayerEffectManager

Declaration
public EntityEffectManager PlayerEffectManager { get; set; }
Property Value
Type Description
EntityEffectManager
| Improve this Doc View Source

PlayerEnterExit

Declaration
public PlayerEnterExit PlayerEnterExit { get; set; }
Property Value
Type Description
PlayerEnterExit
| Improve this Doc View Source

PlayerEntity

Declaration
public PlayerEntity PlayerEntity { get; set; }
Property Value
Type Description
PlayerEntity
| Improve this Doc View Source

PlayerEntityBehaviour

Declaration
public DaggerfallEntityBehaviour PlayerEntityBehaviour { get; set; }
Property Value
Type Description
DaggerfallEntityBehaviour
| Improve this Doc View Source

PlayerGPS

Declaration
public PlayerGPS PlayerGPS { get; set; }
Property Value
Type Description
PlayerGPS
| Improve this Doc View Source

PlayerHealth

Declaration
public PlayerHealth PlayerHealth { get; set; }
Property Value
Type Description
PlayerHealth
| Improve this Doc View Source

PlayerMotor

Declaration
public PlayerMotor PlayerMotor { get; set; }
Property Value
Type Description
PlayerMotor
| Improve this Doc View Source

PlayerMouseLook

Declaration
public PlayerMouseLook PlayerMouseLook { get; set; }
Property Value
Type Description
PlayerMouseLook
| Improve this Doc View Source

PlayerObject

Declaration
public GameObject PlayerObject { get; set; }
Property Value
Type Description
GameObject
| Improve this Doc View Source

PlayerSpellCasting

Declaration
public FPSSpellCasting PlayerSpellCasting { get; set; }
Property Value
Type Description
FPSSpellCasting
| Improve this Doc View Source

PostProcessVolume

Declaration
public PostProcessVolume PostProcessVolume { get; set; }
Property Value
Type Description
UnityEngine.Rendering.PostProcessing.PostProcessVolume
| Improve this Doc View Source

QuestListsManager

Declaration
public QuestListsManager QuestListsManager { get; set; }
Property Value
Type Description
QuestListsManager
| Improve this Doc View Source

QuestMachine

Declaration
public QuestMachine QuestMachine { get; set; }
Property Value
Type Description
QuestMachine
| Improve this Doc View Source

RetroPresenter

Declaration
public RetroPresentation RetroPresenter { get; set; }
Property Value
Type Description
RetroPresentation
| Improve this Doc View Source

RetroRenderer

Declaration
public RetroRenderer RetroRenderer { get; set; }
Property Value
Type Description
RetroRenderer
| Improve this Doc View Source

RightHandWeapon

Declaration
public FPSWeapon RightHandWeapon { get; set; }
Property Value
Type Description
FPSWeapon
| Improve this Doc View Source

SaveLoadManager

Declaration
public SaveLoadManager SaveLoadManager { get; set; }
Property Value
Type Description
SaveLoadManager
| Improve this Doc View Source

SkyRig

Declaration
public DaggerfallSky SkyRig { get; set; }
Property Value
Type Description
DaggerfallSky
| Improve this Doc View Source

SpeedChanger

Declaration
public PlayerSpeedChanger SpeedChanger { get; set; }
Property Value
Type Description
PlayerSpeedChanger
| Improve this Doc View Source

StartGameBehaviour

Declaration
public StartGameBehaviour StartGameBehaviour { get; set; }
Property Value
Type Description
StartGameBehaviour
| Improve this Doc View Source

StateManager

Declaration
public StateManager StateManager { get; set; }
Property Value
Type Description
StateManager
| Improve this Doc View Source

StreamingTarget

Declaration
public GameObject StreamingTarget { get; set; }
Property Value
Type Description
GameObject
| Improve this Doc View Source

StreamingWorld

Declaration
public StreamingWorld StreamingWorld { get; set; }
Property Value
Type Description
StreamingWorld
| Improve this Doc View Source

SunlightManager

Declaration
public SunlightManager SunlightManager { get; set; }
Property Value
Type Description
SunlightManager
| Improve this Doc View Source

TalkManager

Declaration
public TalkManager TalkManager { get; set; }
Property Value
Type Description
TalkManager
| Improve this Doc View Source

TransportManager

Declaration
public TransportManager TransportManager { get; set; }
Property Value
Type Description
TransportManager
| Improve this Doc View Source

VitalsChangeDetector

Declaration
public VitalsChangeDetector VitalsChangeDetector { get; set; }
Property Value
Type Description
VitalsChangeDetector
| Improve this Doc View Source

WeaponManager

Declaration
public WeaponManager WeaponManager { get; set; }
Property Value
Type Description
WeaponManager
| Improve this Doc View Source

WeatherManager

Declaration
public WeatherManager WeatherManager { get; set; }
Property Value
Type Description
WeatherManager

Methods

| Improve this Doc View Source

AreEnemiesNearby(Boolean, Boolean)

Determines if enemies are nearby. Uses include whether player is able to rest or not. Based on distance to nearest monster, and if monster can actually sense player.

Declaration
public bool AreEnemiesNearby(bool resting = false, bool includingPacified = false)
Parameters
Type Name Description
Boolean resting

Is player initiating or continuing rest?

Boolean includingPacified

Include pacified enemies in this test?

Returns
Type Description
Boolean

True if enemies are nearby.

| Improve this Doc View Source

ClearEnemies()

Clears the area of enemies.

Declaration
public void ClearEnemies()
| Improve this Doc View Source

FindSingleton(out GameManager)

Finds singleton in scene. Instance should be used instead to retrieve cached instance.

Declaration
public static bool FindSingleton(out GameManager singletonOut)
Parameters
Type Name Description
GameManager singletonOut

Retrieved instance.

Returns
Type Description
Boolean

True if instance found.

| Improve this Doc View Source

GetComponentFromObject<T>(GameObject, String)

Get a component from an object.

Declaration
public static T GetComponentFromObject<T>(GameObject obj, string tag = null)
    where T : Component
Parameters
Type Name Description
GameObject obj

Object to check for component

String tag

optional; if object is null, will attempt to find object with tag

Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

GetGameObjectWithName(String)

Find a gameobject by name

Declaration
public static GameObject GetGameObjectWithName(string name)
Parameters
Type Name Description
String name
Returns
Type Description
GameObject
| Improve this Doc View Source

GetGameObjectWithTag(String)

Find a gameobject by tag

Declaration
public static GameObject GetGameObjectWithTag(string tag)
Parameters
Type Name Description
String tag
Returns
Type Description
GameObject
| Improve this Doc View Source

GetMonoBehaviour<T>(Boolean)

Get monobehaviour object

Declaration
public static T GetMonoBehaviour<T>(bool errorIfNotFound = true)
    where T : MonoBehaviour
Parameters
Type Name Description
Boolean errorIfNotFound
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

GetPreventedRestMessage()

Iterates through conditions if rest is should be prevented

Declaration
public string GetPreventedRestMessage()
Returns
Type Description
String

Non-null message string if prevented, null otherwise

| Improve this Doc View Source

GetProperties()

Checks all of the GameManager's properties at start up.

Declaration
public void GetProperties()
| Improve this Doc View Source

HowManyEnemiesOfType(MobileTypes, Boolean, Boolean)

Gets how many enemies of a given type exist.

Declaration
public int HowManyEnemiesOfType(MobileTypes type, bool stopLookingIfFound = false, bool includingPacified = false)
Parameters
Type Name Description
MobileTypes type

Enemy type to search for.

Boolean stopLookingIfFound

Return as soon as an enemy of given type is found.

Boolean includingPacified
Returns
Type Description
Int32

Number of this enemy type.

| Improve this Doc View Source

IsPlayingGame()

Returns true when gameplay is active.

Declaration
public bool IsPlayingGame()
Returns
Type Description
Boolean
| Improve this Doc View Source

MakeEnemiesHostile()

Make all enemies in an area go hostile.

Declaration
public void MakeEnemiesHostile()
| Improve this Doc View Source

PauseGame(Boolean, Boolean)

Pauses or unpauses running game. Time scale is set to zero and, optionally, HUD is disabled when game is paused.

Declaration
public void PauseGame(bool pause, bool hideHUD = false)
Parameters
Type Name Description
Boolean pause

True to pause or false to unpause.

Boolean hideHUD

HUD is disabled on screen if true. Ignored when unpausing.

| Improve this Doc View Source

RaiseOnEncounterEvent()

Declaration
public virtual void RaiseOnEncounterEvent()
| Improve this Doc View Source

RaiseOnEnemySpawnEvent(GameObject)

Declaration
public virtual void RaiseOnEnemySpawnEvent(GameObject enemy)
Parameters
Type Name Description
GameObject enemy
| Improve this Doc View Source

RegisterPreventRestCondition(Func<Boolean>, String)

Registers a boolean method that prevents the player from starting or continuing to rest

Declaration
public void RegisterPreventRestCondition(Func<bool> handler, string message)
Parameters
Type Name Description
Func<Boolean> handler

The delegate returning a boolean whether the player can rest.

String message

The message to be displayed.

| Improve this Doc View Source

TryUpateAmbientOcclusionIntensity()

Declaration
public void TryUpateAmbientOcclusionIntensity()
| Improve this Doc View Source

UnregisterPreventRestCondition(Func<Boolean>)

Unregisters a boolean method from being used to prevent the player from resting

Declaration
public void UnregisterPreventRestCondition(Func<bool> handler)
Parameters
Type Name Description
Func<Boolean> handler

The delegate returning a boolean whether the player can rest.

| Improve this Doc View Source

UpdateShadowDistance()

Applies shadow distance setting for local area.

Declaration
public static void UpdateShadowDistance()
| Improve this Doc View Source

UpdateShadowResolution()

Applies shadow resolution setting.

Declaration
public static void UpdateShadowResolution()

Events

| Improve this Doc View Source

OnEncounter

Raised when foes are being spawned near the player in the world. Use OnEnemySpawn if you need access to any individual enemy in the scene.

Declaration
public static event GameManager.OnEncounterEventHandler OnEncounter
Event Type
Type Description
GameManager.OnEncounterEventHandler
| Improve this Doc View Source

OnEnemySpawn

Raised when a foe gameobject is instantiated. The gameobject is passed to event handlers. Use OnEncounter to detect when enemies are spawned near player.

Declaration
public static event GameManager.OnEnemySpawnHandler OnEnemySpawn
Event Type
Type Description
GameManager.OnEnemySpawnHandler

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