API
Fog of War
The fog, what reveals it, and the minimap and radar that show it.
PassForgeFogMinimap
Shows a Fog of War's map on a UI Raw Image as a minimap: places never seen stay dark, explored ones dim and the ones seen now bright, over a picture of the area or a plain ground color, with a dot for each revealer and the player's PassForgeRoute as a line. It can follow the player and show only the area around it, cut round or square. North is up unless Orientation turns it.
public sealed class PassForgeFogMinimap : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Fog of War Minimap.
PassForgeFogMinimap.fog
The Fog of War shown; empty shows the one enabled last.
public PassForgeFogOfWar fog { get; set; }
PassForgeFogMinimap.map
A picture of the area seen from above, covering the Fog of War's Size with north up.
public Texture map { get; set; }
PassForgeFogMinimap.captureLeavesOut
Layers left out of the picture Capture Map From Above takes in the editor.
public LayerMask captureLeavesOut { get; set; }
PassForgeFogMinimap.follow
The object kept in the middle, or null to show the whole area.
public Transform follow { get; set; }
PassForgeFogMinimap.viewSize
Meters shown across the minimap while it follows an object.
public float viewSize { get; set; }
PassForgeFogMinimap.orientation
Which way is up while the minimap follows an object: north, the way the followed object faces, or the way a camera looks. Without Follow north is always up. A turning map needs a square Raw Image.
public MinimapOrientation orientation { get; set; }
PassForgeFogMinimap.turnCamera
The camera Camera Up turns with. Null uses the camera tagged MainCamera.
public Camera turnCamera { get; set; }
PassForgeFogMinimap.round
Cut the minimap round rather than square.
public bool round { get; set; }
PassForgeFogMinimap.borderColor
Color of the border, as picked. Zero alpha draws none.
public Color borderColor { get; set; }
PassForgeFogMinimap.showRevealers
Mark the enabled Fog Revealers of the teams the fog shows with dots, the first eight enabled.
public bool showRevealers { get; set; }
PassForgeFogMinimap.keepIndicatorsClear
Keep Off-screen Indicators from sliding under the minimap.
public bool keepIndicatorsClear { get; set; }
PassForgeFogMinimap.showRoute
Draw the way the current PassForgeRoute shows the player, as a line in the route's color, when the route has Show On Maps on.
public bool showRoute { get; set; }
PassForgeFogMinimap.routeWidth
Width of the route's line, as a share of the minimap's width, from 0.003 to 0.05.
public float routeWidth { get; set; }
PassForgeFogMinimap.Refresh()
Updates the minimap now instead of at the end of the frame.
public void Refresh()
PassForgeFogOfWar
Keeps a fog of war map over an area of the world: what Fog Revealers see now is clear, places they have seen stay dimly remembered, and the rest is hidden under a shroud, mist or clouds. Put it at the center of the play area. The Fog of War screen effect draws it without a Volume; a scene Volume whose Fog of War overrides a setting takes that setting over. For a world past about a kilometer, set coverage to Open World: the world is kept in chunks, with full detail around centerOn.
public sealed class PassForgeFogOfWar : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Fog of War.
PassForgeFogOfWar.current
The fog of war the screen effect draws: the one enabled last.
public static PassForgeFogOfWar current { get; }
PassForgeFogOfWar.coverage
How much of the world this fog covers: One Area, kept whole at one Resolution, or Open World, kept in chunks for the whole size with full detail around centerOn. Changing it while the game runs keeps what is explored, in place.
public FogOfWarCoverage coverage { get; set; }
PassForgeFogOfWar.cellSize
Meters each cell of an Open World map covers, from 0.1 to 64. Changing it while the game runs keeps what is explored, at the new size.
public float cellSize { get; set; }
PassForgeFogOfWar.detailCells
Cells across the Open World Detail Area, the part drawn in full detail around centerOn: 128, 256 or 512. Other values snap to the nearest. Changing it while the game runs keeps what is explored.
public int detailCells { get; set; }
PassForgeFogOfWar.centerOn
The object the Open World Detail Area stays around, such as the player. Null follows where the camera tagged MainCamera looks.
public Transform centerOn { get; set; }
PassForgeFogOfWar.size
Width and depth of the covered area, in meters: the whole world in Open World.
public Vector2 size { get; set; }
PassForgeFogOfWar.plane
Which plane of the world the map lies on: the ground for 3D games, or X and Y for 2D games.
public FogOfWarPlane plane { get; set; }
PassForgeFogOfWar.manualUpdate
Update the map only when Refresh is called, such as once a turn. In Edit Mode it still updates by itself.
public bool manualUpdate { get; set; }
PassForgeFogOfWar.explored
What places that have been seen do once revealers move on.
public FogOfWarMemory explored { get; set; }
PassForgeFogOfWar.rememberExplored
Places that have been seen stay visible, faded or open, after revealers move on.
public bool rememberExplored { get; set; }
PassForgeFogOfWar.revealInEditMode
Shows the whole area in edit mode, so the scene stays easy to work on.
public bool revealInEditMode { get; set; }
PassForgeFogOfWar.verticalRange
How far above and below themselves Fog Revealers see, in meters. Zero sees every height.
public float verticalRange { get; set; }
PassForgeFogOfWar.visibleTeams
The teams whose Fog Revealers open this fog, one bit for each PassForgeFogRevealer.team: bit 0 for team 0, bit 1 for team 1 and so on. Every team (~0) by default; 1 << localTeam shows one side's sight. The change shows at the next map update, or at once with Refresh. What was explored before the change stays explored, since the map does not keep which team explored it: set this once the local team is known, then call ResetExplored to forget what the other teams explored.
public int visibleTeams { get; set; }
PassForgeFogOfWar.hideWhileUnseen
Layers whose objects show only while a Fog Revealer sees them.
public LayerMask hideWhileUnseen { get; set; }
PassForgeFogOfWar.hideUntilExplored
Layers whose objects stay hidden until their place is explored.
public LayerMask hideUntilExplored { get; set; }
PassForgeFogOfWar.style
What hides the places not seen yet.
public FogOfWarStyle style { get; set; }
PassForgeFogOfWar.fogColor
Color of the shroud, mist or clouds.
public Color fogColor { get; set; }
PassForgeFogOfWar.density
How fully the places not seen yet are hidden, from 0 to 1.
public float density { get; set; }
PassForgeFogOfWar.exploredDim
Darkening of explored places out of sight, from 0 to 1.
public float exploredDim { get; set; }
PassForgeFogOfWar.exploredDesaturate
Color loss of explored places out of sight, from 0 to 1.
public float exploredDesaturate { get; set; }
PassForgeFogOfWar.edgeNoise
Wobble along the edge of what is seen, from 0 to 1.
public float edgeNoise { get; set; }
PassForgeFogOfWar.cloudSize
Size of the mist's and the clouds' patches, in meters.
public float cloudSize { get; set; }
PassForgeFogOfWar.wind
Direction and speed the mist and the clouds drift, in meters per second.
public Vector2 wind { get; set; }
PassForgeFogOfWar.gridSize
Size of the blueprint's grid cells, in meters.
public float gridSize { get; set; }
PassForgeFogOfWar.blur
How blurred the places not seen yet are with the Frosted Blur style, from 0 to 1.
public float blur { get; set; }
PassForgeFogOfWar.height
How high the fog rises above this object, in meters. Zero has no top and covers everything.
public float height { get; set; }
PassForgeFogOfWar.heightSoftness
How softly the top of the fog fades out, in meters.
public float heightSoftness { get; set; }
PassForgeFogOfWar.fillTheAir
Fill the air with the fog, not only the ground. Needs a height.
public bool fillTheAir { get; set; }
PassForgeFogOfWar.onShown
Called with an object Hiding shows, such as an enemy coming into sight.
public UnityEngine.Events.UnityEvent<GameObject> onShown { get; }
PassForgeFogOfWar.onHidden
Called with an object Hiding hides, such as an enemy leaving sight.
public UnityEngine.Events.UnityEvent<GameObject> onHidden { get; }
PassForgeFogOfWar.keepBetweenSessions
Keeps what is explored from one session to the next with nothing to script, in a file on the player's device.
public bool keepBetweenSessions { get; set; }
PassForgeFogOfWar.ShowsTeam(int)
True when Fog Revealers on this team, from 0 to 31, open this fog.
public bool ShowsTeam(int team)
PassForgeFogOfWar.DefaultColor(FogOfWarStyle)
The fog color each style starts with.
public static Color DefaultColor(FogOfWarStyle style)
PassForgeFogOfWar.IsVisible(Vector3)
True when a revealer can see the point right now.
public bool IsVisible(Vector3 worldPosition)
PassForgeFogOfWar.IsExplored(Vector3)
True when the point has ever been seen.
public bool IsExplored(Vector3 worldPosition)
PassForgeFogOfWar.ResetExplored()
Forgets every explored place: in Open World, every chunk.
public void ResetExplored()
PassForgeFogOfWar.ForgetKeptMap()
Forgets the map Keep Between Sessions keeps, and every explored place with it, such as for a new game.
public void ForgetKeptMap()
PassForgeFogOfWar.SaveExplored()
The explored places as bytes, to keep in a save game; LoadExplored puts them back. Keep them as they are, or as text with System.Convert.ToBase64String. An Open World fog saves only its chunks with places explored, compactly, so the bytes follow what was explored, not the size of the world.
public byte[] SaveExplored()
PassForgeFogOfWar.LoadExplored(byte[])
Puts back explored places kept with SaveExplored, such as when a save game loads. A map saved at another Resolution is scaled to this one, and a map saved in the other Coverage or at another Cell Size is carried over to the same places in the world. A One Area map holds no Size: in One Area it loads over this fog's Size, and in Open World over the Size the fog had in One Area when it switched, so a World Size set larger afterwards leaves old saves where they were. Returns false, and changes nothing, for data that is not a saved map. With Explored Places set to Close Again nothing stays explored, so there is nothing to put back.
public bool LoadExplored(byte[] data)
PassForgeFogOfWar.ExploreAll()
Marks the whole area as explored: in Open World, the whole world, at no cost per place.
public void ExploreAll()
PassForgeFogOfWar.ExploreAround(Vector3, float)
Explores every place within radius meters of a point at once, at every height, such as the valley a lookout tower overlooks. Measured on the map's plane: X and Z on the ground, X and Y in 2D. Works in both coverages, and in Open World a chunk the circle covers whole takes no memory of its own. With Explored Places set to Close Again nothing stays explored, so it changes nothing.
public void ExploreAround(Vector3 worldPosition, float radius)
PassForgeFogOfWar.Refresh()
Updates the map now instead of waiting for the next update.
public void Refresh()
PassForgeFogRadar
Turns a Fog of War Minimap into a radar: a screen with distance rings, a sweep and a mark for north, and blips for what is around the object the minimap follows. Enemies on the Fog of War's Hide While Unseen layers, things on its Hide Until Explored layers, Fog Revealers of the teams the fog shows, Off-screen Indicators, Radar Blips and pings all show with nothing more added, and only as much as the fog shows. Put it on the minimap's Raw Image: it uses the minimap's Fog, Follow, View Size, round cut and border, and reaches half the View Size from the middle. It needs no Volume and no Set Up Effects.
public sealed class PassForgeFogRadar : MonoBehaviour, IFogMinimapLayer
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Fog of War Radar.
PassForgeFogRadar.minimap
The Fog of War Minimap this radar draws on, the one on its object.
public PassForgeFogMinimap minimap { get; }
PassForgeFogRadar.screenColor
Color of the radar screen, as picked.
public Color screenColor { get; set; }
PassForgeFogRadar.mapShowThrough
How much of the minimap's map shows through the radar screen, from 0 to 1.
public float mapShowThrough { get; set; }
PassForgeFogRadar.fogShading
How much darker the screen is over places never seen, from 0 to 1.
public float fogShading { get; set; }
PassForgeFogRadar.ringSpacing
Meters between distance rings. Zero picks a round number that gives two to four rings.
public float ringSpacing { get; set; }
PassForgeFogRadar.ringColor
Color of the rings and cross lines, as picked. Alpha sets how strong they are.
public Color ringColor { get; set; }
PassForgeFogRadar.ringWidth
Width of the rings, in pixels, from 0.5 to 4.
public float ringWidth { get; set; }
PassForgeFogRadar.ringLabels
Write each ring's distance on it. Labels write whole meters, so a ringSpacing such as 2.5 has none. Labels too small to read are left out.
public bool ringLabels { get; set; }
PassForgeFogRadar.crossLines
Lines through the middle from north to south and east to west.
public bool crossLines { get; set; }
PassForgeFogRadar.showNorth
Mark north on the rim.
public bool showNorth { get; set; }
PassForgeFogRadar.northMark
How north is marked: an N, or a triangle that reads in any language. An N too small to read is drawn as the triangle.
public RadarNorthMark northMark { get; set; }
PassForgeFogRadar.sweep
A beam that goes round and round, leaving a fading trail.
public bool sweep { get; set; }
PassForgeFogRadar.sweepSeconds
Seconds the sweep takes to go round once, from 0.5 to 20.
public float sweepSeconds { get; set; }
PassForgeFogRadar.sweepColor
Color of the sweep, as picked. Alpha sets how bright it is.
public Color sweepColor { get; set; }
PassForgeFogRadar.sweepTrail
Degrees of fading light the sweep leaves behind it, from 5 to 360.
public float sweepTrail { get; set; }
PassForgeFogRadar.show
Which blips show: only what the fog shows, or everything in range.
public RadarFogRule show { get; set; }
PassForgeFogRadar.display
How blips draw: following their objects, or painted where the sweep catches them.
public RadarBlipDisplay display { get; set; }
PassForgeFogRadar.rememberSeconds
Seconds an enemy's last seen place stays on the radar after it leaves sight. Zero forgets it at once.
public float rememberSeconds { get; set; }
PassForgeFogRadar.blipSize
Size of the blips, as a share of the radar's width, from 0.01 to 0.1.
public float blipSize { get; set; }
PassForgeFogRadar.otherFloorAt
Meters above or below the followed object beyond which things draw as on another floor. Zero draws every height alike.
public float otherFloorAt { get; set; }
PassForgeFogRadar.hostileColor
Color of enemies, as picked.
public Color hostileColor { get; set; }
PassForgeFogRadar.friendlyColor
Color of your side, as picked.
public Color friendlyColor { get; set; }
PassForgeFogRadar.neutralColor
Color of neutral things, as picked.
public Color neutralColor { get; set; }
PassForgeFogRadar.objectiveColor
Color of objectives that have no color of their own, as picked.
public Color objectiveColor { get; set; }
PassForgeFogRadar.showSelf
Draw an arrow in the middle for the followed object.
public bool showSelf { get; set; }
PassForgeFogRadar.selfColor
Color of the arrow in the middle, as picked.
public Color selfColor { get; set; }
PassForgeFogRadar.fromHidingLayers
Show objects on the Fog of War's hiding layers, with nothing added to them.
public bool fromHidingLayers { get; set; }
PassForgeFogRadar.fromRevealers
Show Fog Revealers of the teams the fog shows as friends.
public bool fromRevealers { get; set; }
PassForgeFogRadar.fromIndicators
Show Off-screen Indicators as objectives.
public bool fromIndicators { get; set; }
PassForgeFogRadar.showPings
Show pings from Ping moment steps and PassForgePings.Ping(Vector3, Color, float, float, bool).
public bool showPings { get; set; }
PassForgeFogRadar.unscaledTime
Turn the sweep and fade the blips in real time, so the radar keeps going while the game is paused.
public bool unscaledTime { get; set; }
PassForgeFogRadar.onContact
Called with each enemy as it shows up on the radar, such as for a warning beep.
public UnityEvent<GameObject> onContact { get; }
PassForgeFogRadar.shownBlips
How many blips the radar drew when it was last refreshed, at most 32.
public int shownBlips { get; }
PassForgeFogRadar.blipsInRange
How many things were on the radar when it was last refreshed, before the limit of 32.
public int blipsInRange { get; }
PassForgeFogRadar.range
Meters from the middle of the radar to its rim: half the minimap's View Size while it follows an object.
public float range { get; }
PassForgeFogRadar.ApplyLook(RadarLook)
Gives the radar one of the ready-made looks: its screen, rings, sweep, how blips draw, and the minimap's border. The rules, what shows, the colors of each kind and On Contact stay as they are. In 2D the look leaves ring labels off, since units are rarely meters there.
public void ApplyLook(RadarLook look)
PassForgeFogRadar.Refresh()
Updates the radar and its minimap now instead of at the end of the frame.
public void Refresh()
PassForgeFogRadar.WorldToRadar(Vector3, out Vector2)
Where a point in the world lies on the radar as of its last refresh, from 0 to 1 across its Raw Image, such as to place a tooltip over a blip. True when the point is within the radar's range.
public bool WorldToRadar(Vector3 worldPosition, out Vector2 point)
PassForgeFogRevealer
Clears the fog of war around this object: put it on the player, units, towers and torches. With Line Of Sight on, walls and other colliders on the Blocked By layers stop its sight.
public sealed class PassForgeFogRevealer : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Fog Revealer.
PassForgeFogRevealer.radius
How far this object sees, in meters.
public float radius { get; set; }
PassForgeFogRevealer.softness
Share of the radius over which sight fades out.
public float softness { get; set; }
PassForgeFogRevealer.viewAngle
How wide this object sees, in degrees, around the way it faces. 360 sees all around.
public float viewAngle { get; set; }
PassForgeFogRevealer.lineOfSight
Walls and other colliders on the Blocked By layers stop this object's sight.
public bool lineOfSight { get; set; }
PassForgeFogRevealer.blockedBy
Layers whose colliders stop sight.
public LayerMask blockedBy { get; set; }
PassForgeFogRevealer.eyeHeight
Height of the eyes above this object's position, in meters.
public float eyeHeight { get; set; }
PassForgeFogRevealer.team
The side this object sees for, from 0 to 31. A PassForgeFogOfWar opens only for the teams in its PassForgeFogOfWar.visibleTeams.
public int team { get; set; }
PassForgeRadarBlip
Puts this object on every Fog of War Radar, or gives it a kind, shape or color of its own there. Enemies on the Fog of War's hiding layers, Fog Revealers and Off-screen Indicators show on radars with nothing added; this is for anything else, and for objects that need a look of their own. Hostile and neutral blips show only what the fog shows. Switched off, it keeps this object off radars. Radars need the Unity UI package.
public sealed class PassForgeRadarBlip : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Radar Blip.
PassForgeRadarBlip.activeCount
Number of Radar Blips currently enabled.
public static int activeCount { get; }
PassForgeRadarBlip.kind
What the object is on radars: its color, its shape and whether the fog hides it.
public RadarBlipKind kind { get; set; }
PassForgeRadarBlip.team
The side this object is on, from 0 to 31, for By Team. A Fog Revealer on the object gives its own team instead.
public int team { get; set; }
PassForgeRadarBlip.shape
The shape the blip draws. Auto picks one by its kind.
public RadarBlipShape shape { get; set; }
PassForgeRadarBlip.ownColor
Use color instead of the radar's color for its kind.
public bool ownColor { get; set; }
PassForgeRadarBlip.color
The blip's own color, as picked, used while ownColor is on.
public Color color { get; set; }
PassForgeRadarBlip.scale
Size of this blip next to the others, from 0.5 to 2.
public float scale { get; set; }
PassForgeRadarBlip.showBeyondRange
Keep the blip on the radar's rim, pointing the way to it, while it is out of range.
public bool showBeyondRange { get; set; }
PassForgeRadarBlip.offset
Point the blip marks, in the object's local space.
public Vector3 offset { get; set; }
PassForgeWorldMap
A full-screen map over the game, opened with Open, Toggle or a key: the picture the Fog of War Minimap on the same object draws, with the fog explored and unexplored, the player as an arrow, the revealers, the PassForgeRoute as a line and, with a Fog of War Radar on the object, pings and marked objects. Drag to pan; scroll the mouse wheel or pinch with two fingers to zoom about the pointer; click or tap to lead the route there, drop a ping or call onMapClicked. It lies on X and Z in 3D and on X and Y in 2D, as the minimap does. The Raw Image is kept square and as large as the screen's longer side, so marks stay round; it is switched off while the map is closed, which then costs nothing. Dragging, zooming and clicking need an Event System and a Graphic Raycaster on the canvas.
public sealed class PassForgeWorldMap : MonoBehaviour, IFogMinimapLayer, IPointerDownHandler, IPointerUpHandler, IBeginDragHandler, IDragHandler, IScrollHandler, IPointerClickHandler
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > World Map.
PassForgeWorldMap.player
The player the map opens on and draws as an arrow. Null uses the object tagged Player.
public Transform player { get; set; }
PassForgeWorldMap.useKey
Open and close the map with key.
public bool useKey { get; set; }
PassForgeWorldMap.key
The key that opens and closes the map, from either input system. None reads no key.
public KeyCode key { get; set; }
PassForgeWorldMap.pauseWhileOpen
Stop the game while the map is open: Time Scale goes to 0, and is given back as it was when the map closes or is switched off.
public bool pauseWhileOpen { get; set; }
PassForgeWorldMap.openMetersAcross
Meters the map shows across the screen's longer side when it opens.
public float openMetersAcross { get; set; }
PassForgeWorldMap.minMetersAcross
The closest the map zooms in, in meters across the screen's longer side.
public float minMetersAcross { get; set; }
PassForgeWorldMap.maxMetersAcross
The farthest the map zooms out, in meters across the screen's longer side. With a Fog of War or a Map Area it also stops once the whole area shows.
public float maxMetersAcross { get; set; }
PassForgeWorldMap.wheelZoom
How much one notch of the mouse wheel zooms, from 1.05 to 2.
public float wheelZoom { get; set; }
PassForgeWorldMap.mapArea
Without a Fog of War, where the minimap's Map picture lies on the map's plane, in meters: its left and back edges (left and bottom in 2D), then its width and depth.
public Rect mapArea { get; set; }
PassForgeWorldMap.clickSetsRoute
A click or tap on the map leads the route there.
public bool clickSetsRoute { get; set; }
PassForgeWorldMap.route
The route a click leads. Null uses PassForgeRoute.current.
public PassForgeRoute route { get; set; }
PassForgeWorldMap.clickDropsPing
A click or tap on the map drops a ping there.
public bool clickDropsPing { get; set; }
PassForgeWorldMap.pingColor
Color of the ping a click drops, as picked.
public Color pingColor { get; set; }
PassForgeWorldMap.pingShape
The sign in the middle of the ping a click drops.
public PingShape pingShape { get; set; }
PassForgeWorldMap.pingSeconds
Seconds the ping a click drops shows, at least 0.1.
public float pingSeconds { get; set; }
PassForgeWorldMap.pingRadius
Meters the ring of the ping a click drops spreads to, at least 0.1.
public float pingRadius { get; set; }
PassForgeWorldMap.groundLayers
Layers a click finds the ground on in 3D. Nothing keeps the player's height.
public LayerMask groundLayers { get; set; }
PassForgeWorldMap.playerColor
Color of the player's arrow, as picked. Zero alpha draws none.
public Color playerColor { get; set; }
PassForgeWorldMap.playerSize
Size of the player's arrow, as a share of the map's width, from 0.005 to 0.08.
public float playerSize { get; set; }
PassForgeWorldMap.onOpened
Called when the map opens, in Play Mode.
public UnityEvent onOpened { get; }
PassForgeWorldMap.onClosed
Called when the map closes, in Play Mode.
public UnityEvent onClosed { get; }
PassForgeWorldMap.onMapClicked
Called with the point in the world a click or tap on the map lands on, in Play Mode: on the ground in 3D where groundLayers find it, otherwise at the player's height.
public UnityEvent<Vector3> onMapClicked { get; }
PassForgeWorldMap.isOpen
True while the map is open.
public bool isOpen { get; }
PassForgeWorldMap.minimap
The Fog of War Minimap on this object, which draws the map.
public PassForgeFogMinimap minimap { get; }
PassForgeWorldMap.center
The world point in the middle of the map, at the player's height (its depth in 2D). Setting it pans there, kept inside the area when there is one.
public Vector3 center { get; set; }
PassForgeWorldMap.metersAcross
Meters the map shows across the screen's longer side: its zoom. Setting it zooms about the middle, kept between minMetersAcross and maxMetersAcross.
public float metersAcross { get; set; }
PassForgeWorldMap.Open()
Opens the map centered on the player at openMetersAcross, kept inside the area, and calls On Opened. Switches the object on if it was off. With Pause While Open on, the game stops until it closes.
public void Open()
PassForgeWorldMap.Close()
Closes the map, gives back the time scale if it paused the game, and calls On Closed.
public void Close()
PassForgeWorldMap.Toggle()
Opens the map when it is closed and closes it when it is open.
public void Toggle()
PassForgeWorldMap.CenterOnPlayer()
Pans so the player is in the middle, kept inside the area. Without a player, the middle of the area, or the world's origin.
public void CenterOnPlayer()
PassForgeWorldMap.CenterOn(Vector3)
Pans so a point in the world is in the middle, kept inside the area.
public void CenterOn(Vector3 worldPosition)
PassForgeWorldMap.ZoomAt(Vector2, float)
Zooms by a factor about a point on the screen, which keeps the same place in the world under it: above 1 zooms in, below 1 out. The zoom stays between minMetersAcross and maxMetersAcross.
public void ZoomAt(Vector2 screenPoint, float factor)
PassForgeWorldMap.WorldToMap(Vector3)
Where a point in the world shows on the screen, in pixels from the lower left, as the map looks now, such as to put a label over a place. Points off the map's view land off the screen.
public Vector2 WorldToMap(Vector3 worldPosition)
PassForgeWorldMap.MapToWorld(Vector2)
The point in the world a point on the screen, in pixels from the lower left, shows as the map looks now: on the map's plane at the player's height (its depth in 2D), or the Fog of War's without a player. The inverse of WorldToMap.
public Vector3 MapToWorld(Vector2 screenPoint)
MinimapOrientation
Which way is up on a Fog of War Minimap while it follows an object.
public enum MinimapOrientation
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
NorthUp | North stays at the top. |
FollowUp | The map turns so the way the followed object faces is up, as in shooters. |
CameraUp | The map turns with a camera, for third person games. |
FogOfWarMemory
What places a PassForgeFogOfWar has seen do once no one sees them any more.
public enum FogOfWarMemory
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
CloseAgain | They are hidden again, as if never seen. |
Faded | They stay visible, darker and paler than what is seen now. |
StayOpen | They stay fully open. |
FogOfWarStyle
What hides the places a PassForgeFogOfWar has not seen.
public enum FogOfWarStyle
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Shroud | A flat dark cover, as in classic strategy games. |
Mist | Drifting, half see-through mist that shapes show faintly through. |
Clouds | Thick drifting clouds that hide the ground, seen from above. |
ParchmentMap | An old paper map with the land drawn in ink, which burns away where it is uncovered. |
Blueprint | A blue technical drawing with a grid, the land's outlines showing through. |
SignalStatic | The snow and rolling lines of a lost signal. |
FrostedBlur | Blurred and faded, as behind frosted glass: the layout shows, the detail does not. |
FogOfWarPlane
Which plane of the world a Fog of War map lies on.
public enum FogOfWarPlane
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Ground | The ground, X and Z, for 3D games. |
XY | The screen's plane, X and Y, for 2D games. |
FogOfWarCoverage
How much of the world a PassForgeFogOfWar covers.
public enum FogOfWarCoverage
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
OneArea | One area of a set Size, kept whole at one Resolution. |
OpenWorld | A large world in chunks: full detail around Center On, explored places kept for the whole size. |
RadarFogRule
Which blips a PassForgeFogRadar shows.
public enum RadarFogRule
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
WhatTheFogShows | Enemies only while your side sees them, neutral things once their place is explored, your side and objectives always, so the radar never gives away more than the fog does. |
Everything | Everything in range, as a motion tracker would. |
RadarBlipDisplay
How a PassForgeFogRadar draws its blips.
public enum RadarBlipDisplay
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Live | Blips follow their objects. |
PaintedBySweep | Blips appear where the sweep catches them and fade until it comes round again, as on a real radar. |
RadarLook
A ready-made look for a PassForgeFogRadar, applied with PassForgeFogRadar.ApplyLook.
public enum RadarLook
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Military | Green rings and a green sweep on a dark green screen. |
Sonar | A slow blue sweep that paints blips where it passes. |
Amber | A warm amber screen with a quick sweep. |
TacticalMap | The minimap's own map with faint white rings and no sweep. |
Hologram | See-through cyan with a slow, faint sweep. |
RadarNorthMark
How a PassForgeFogRadar marks north on its rim.
public enum RadarNorthMark
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Letter | An N. |
Triangle | A small triangle pointing north, which reads in any language. |
RadarBlipKind
What a PassForgeRadarBlip is on a Fog of War Radar: its color, its shape and whether the fog hides it.
public enum RadarBlipKind
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Hostile | An enemy: it shows only while your side sees it. |
Friendly | Your side: it always shows. |
Neutral | Something neutral, such as a building or treasure: it shows once its place is explored. |
Objective | An objective: it always shows, and waits on the rim while it is out of range. |
ByTeam | Friendly when the Fog of War shows its team and hostile otherwise, for multiplayer games. |
RadarBlipShape
The shape a blip draws on a Fog of War Radar.
public enum RadarBlipShape
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Auto | By its kind: diamonds for enemies, arrows for friends, squares for neutral things and dots for objectives. |
Dot | A round dot. |
Diamond | A diamond. |
Arrow | An arrow pointing the way the object faces. |
Square | A square. |