Class in ChivalrousGames.DungeonMaster / Inherits from: MonoBehaviour
Description
Allows the player to use the Dungeon map. Each dungeon needs its own MapControllerFields
inputButtonName | string | The input button to press to toggle the full map. |
character | Dungeon Character | The character in the Dungeon. |
dungeon | Dungeon | The dungeon. |
centerMapOnFloorChange | bool | If true, then changing the map floor will center the map automatically; otherwise false. |
centerMode | MapCenterMode | The center map on floor change mode. |
Properties
DisplayedLevel | Level | ReadOnly The currently displayed level or null if no displayed level. |
DisplayedFloor | int | ReadOnly The currently displayed floor or -1 if no displayed floor. |
FullMapOpened | bool | ReadOnly True if full map is opened; otherwise, false. |
Methods
ResetMap
public void ResetMap();
Description
Resets the map to the appropriate Level and floor. Finds the Character in the map and centers on it.ToggleFullMap
public virtual void ToggleFullMap();
Description
Toggles the full map (open/close). NOTE: Make sure the character cannot move around when the full map is opened.ChangeFullMapLevelAndFloor
public void ChangeFullMapLevelAndFloor(Level level, int floor);
Parameters
level | Level | The level to display |
floor | int | The floor to display |
Description
Changes the full map display to specified level and floor.ChangeFullMapUpOneFloor
public void ChangeFullMapUpOneFloor(bool WrapMode = true);
Parameters
wrapMode | bool | Optional If set to true will wrap to show the bottom floor if currently on the top floor. Default value is true. |
Description
Changes the full map up one floor.ChangeFullMapDownOneFloor
public void ChangeFullMapDownOneFloor(bool wrapMode = true);
Parameters
wrapMode | bool | Optional If set to true will wrap to show the top floor if currently on the bottom floor. Default value is true. |
Description
Changes the full map down one floor.GetDisplayedMapFloorCenter
public Vector3 GetDisplayedMapFloorCenter();
Return
Vector3 | The displayed map floor center. This is the center of level map not the center of the Level itself. If there is no displayed Level, will return Vector3.zero. |
Description
Gets the displayed map floor center. This is done be calculating the average position of all Rooms map position of the Level.CenterMapCamera
public void CenterMapCamera();
Description
Centers the map camera on the DisplayedLevel / DisplayedFloor. Map center is obtained with method GetDisplayedMapFloorCenter.CenterMapCameraOnCharacter
public void CenterMapCameraOnCharacter();