Class Automap
this class provides the automap core functionality like geometry creation and discovery mechanism
Namespace: DaggerfallWorkshop.Game
Assembly: Assembly-CSharp.dll
Syntax
public class Automap : MonoBehaviour
Properties
| Improve this Doc View SourceCameraAutomap
DaggerfallAutomapWindow script will use this to get automap camera
Declaration
public Camera CameraAutomap { get; }
Property Value
Type | Description |
---|---|
Camera |
DebugTeleportMode
used to set or get the debug teleport mode
Declaration
public bool DebugTeleportMode { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
instance
Declaration
public static Automap instance { get; }
Property Value
Type | Description |
---|---|
Automap |
IsCreatingDungeonAutomapBaseGameObjects
Declaration
public static bool IsCreatingDungeonAutomapBaseGameObjects { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsOpenAutomap
DaggerfallAutomapWindow script will use this to propagate if the automap window is open or not
Declaration
public bool IsOpenAutomap { set; }
Property Value
Type | Description |
---|---|
Boolean |
ITweenCameraAnimationIsRunning
returns true if a iTween camera animation is running (i.e. teleporter portal has been clicked and animation runs to jump to / focus portal at other end of teleporter connection)
Declaration
public bool ITweenCameraAnimationIsRunning { get; }
Property Value
Type | Description |
---|---|
Boolean |
LayerAutomap
DaggerfallAutomapWindow script will use this to get automap layer
Declaration
public int LayerAutomap { get; }
Property Value
Type | Description |
---|---|
Int32 |
ResetAutomapSettingsSignalForExternalScript
DaggerfallAutomapWindow script will use this to check if it should reset automap settings (and if it does it will erase flag)
Declaration
public bool ResetAutomapSettingsSignalForExternalScript { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
RotationPivotAxisPosition
DaggerfallAutomapWindow script will use this to propagate its rotation pivot axis position (dependent on selected view)
Declaration
public Vector3 RotationPivotAxisPosition { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
RotationPivotAxisRotation
DaggerfallAutomapWindow script will use this to propagate its rotation pivot axis rotation (rotating the pixot axis will rotate the indicator arrows as they are child objects of the pivot axis)
Declaration
public Quaternion RotationPivotAxisRotation { get; set; }
Property Value
Type | Description |
---|---|
Quaternion |
SlicingBiasY
DaggerfallAutomapWindow script will use this to propagate its slicingBiasY (y-offset from the player y position)
Declaration
public float SlicingBiasY { get; set; }
Property Value
Type | Description |
---|---|
Single |
TextureMicroMap
returns the Texture2D containing the texture with the micro map (small texture with 2x2 pixels representing a dungeon block - note: rendering will render this texture at double size)
Declaration
public Texture2D TextureMicroMap { get; }
Property Value
Type | Description |
---|---|
Texture2D |
Methods
| Improve this Doc View SourceExploredPercentage()
The percentage of dungeon explored.
Declaration
public int ExploredPercentage()
Returns
Type | Description |
---|---|
Int32 |
ForceUpdate()
DaggerfallAutomapWindow script will use this to signal this script to update when anything changed that requires Automap to update - TODO: check if this can done with an event (if events work with gui windows)
Declaration
public void ForceUpdate()
GetMouseHoverOverText(Vector2)
gets the mouse hover over text that will be displayed in the status bar/info bar at the bottom of the automap window
Declaration
public string GetMouseHoverOverText(Vector2 screenPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPosition | the mouse position to be used for raycast |
Returns
Type | Description |
---|---|
String | the string containing the hover over text |
GetState()
GetState() method for save system integration
Declaration
public Dictionary<string, Automap.AutomapDungeonState> GetState()
Returns
Type | Description |
---|---|
Dictionary<String, Automap.AutomapDungeonState> |
HideAll()
hides complete dungeon on automap
Declaration
public void HideAll()
SetNumberOfDungeonMemorized(Int32)
sets the number of dungeons that are memorized
Declaration
public void SetNumberOfDungeonMemorized(int n)
Parameters
Type | Name | Description |
---|---|---|
Int32 | n |
SetState(Dictionary<String, Automap.AutomapDungeonState>)
SetState() method for save system integration
Declaration
public void SetState(Dictionary<string, Automap.AutomapDungeonState> savedDictAutomapDungeonsDiscoveryState)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<String, Automap.AutomapDungeonState> | savedDictAutomapDungeonsDiscoveryState |
SwitchFocusToNextObject()
DaggerfallAutomapWindow script will use this to signal this script to switch focus to next object of interest and return the GameObject which has focus
Declaration
public GameObject SwitchFocusToNextObject()
Returns
Type | Description |
---|---|
GameObject | the GameObject which has the focus |
SwitchToAutomapRenderModeCutout()
DaggerfallAutomapWindow script will use this to signal this script to switch to automap rendering mode "cutout"
Declaration
public void SwitchToAutomapRenderModeCutout()
SwitchToAutomapRenderModeTransparent()
DaggerfallAutomapWindow script will use this to signal this script to switch to automap rendering mode "transparent"
Declaration
public void SwitchToAutomapRenderModeTransparent()
SwitchToAutomapRenderModeWireframe()
DaggerfallAutomapWindow script will use this to signal this script to switch to automap rendering mode "wireframe"
Declaration
public void SwitchToAutomapRenderModeWireframe()
SwitchToNextAutomapRenderMode()
DaggerfallAutomapWindow script will use this to signal this script to switch to the next available automap rendering mode
Declaration
public void SwitchToNextAutomapRenderMode()
TryCenterAutomapCameraOnDungeonSegmentAtScreenPosition(Vector2)
method which tries if a raycast will hit automap geometry and if so will center camera on the click position
Declaration
public void TryCenterAutomapCameraOnDungeonSegmentAtScreenPosition(Vector2 screenPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPosition | the mouse position to be used for raycast |
TryForTeleporterPortalsAtScreenPosition(Vector2)
Declaration
public bool TryForTeleporterPortalsAtScreenPosition(Vector2 screenPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPosition |
Returns
Type | Description |
---|---|
Boolean |
TrySetRotationPivotAxisToDungeonSegmentAtScreenPosition(Vector2)
method which tries if a raycast will hit automap geometry and if so will center rotation pivot axis on the click position
Declaration
public void TrySetRotationPivotAxisToDungeonSegmentAtScreenPosition(Vector2 screenPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPosition | the mouse position to be used for raycast |
TryTeleportPlayerToDungeonSegmentAtScreenPosition(Vector2)
DaggerfallAutomapWindow script will use this to signal this script to try to teleport player to dungeon segment shown at a provided screen position
Declaration
public void TryTeleportPlayerToDungeonSegmentAtScreenPosition(Vector2 screenPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPosition | the screen position of interest - if a dungeon segment is shown at this position player will be teleported there |
TryToAddOrEditUserNoteMarkerOnDungeonSegmentAtScreenPosition(Vector2, Boolean)
method which tries to add or edit an existing user marker on a given click position raycast test: if automap geometry is hit -> add new marker, if marker is hit -> edit marker, otherwise: do nothing
Declaration
public void TryToAddOrEditUserNoteMarkerOnDungeonSegmentAtScreenPosition(Vector2 screenPosition, bool editUserNoteOnCreation)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPosition | the mouse position to be used for raycast |
Boolean | editUserNoteOnCreation |
TryToRemoveUserNoteMarkerOnDungeonSegmentAtScreenPosition(Vector2)
method which tries to delete an existing user marker on a given click position
Declaration
public bool TryToRemoveUserNoteMarkerOnDungeonSegmentAtScreenPosition(Vector2 screenPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPosition | the mouse position to be used for raycast |
Returns
Type | Description |
---|---|
Boolean | true if a marker was hit and thus deleted |
UpdateAutomapStateOnWindowPop()
DaggerfallAutomapWindow script will use this to signal this script to update when automap window was popped - TODO: check if this can done with an event (if events work with gui windows)
Declaration
public void UpdateAutomapStateOnWindowPop()
UpdateAutomapStateOnWindowPush()
DaggerfallAutomapWindow script will use this to signal this script to update when automap window was pushed - TODO: check if this can done with an event (if events work with gui windows)
Declaration
public void UpdateAutomapStateOnWindowPush()
UpdateMouseHoverOverGameObjects(Vector2)
will make the mouse hover over gameobjects appear in the automap window
Declaration
public bool UpdateMouseHoverOverGameObjects(Vector2 screenPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPosition | the mouse position to be used for raycast |
Returns
Type | Description |
---|---|
Boolean | a flag that will indicate that the automap render panel will need to be updated |
Events
| Improve this Doc View SourceOnInjectMeshAndMaterialProperties
Declaration
public static event Automap.OnInjectMeshAndMaterialPropertiesEventHandler OnInjectMeshAndMaterialProperties
Event Type
Type | Description |
---|---|
Automap.OnInjectMeshAndMaterialPropertiesEventHandler |