Class ZoneManager
Inheritance
object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
Mirror.NetworkBehaviour
ZoneManager
Assembly: Dew.Core.dll
Syntax
public class ZoneManager : NetworkedManagerBase<ZoneManager>, ILogicUpdate
Fields
bannedRoomModifiersForCurrentLoop
Declaration
[SaveVar(SaveVarFlags.Default)]
[NonSerialized]
public List<string> bannedRoomModifiersForCurrentLoop
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><string> |
|
bannedSidetracksForCurrentLoop
Declaration
[SaveVar(SaveVarFlags.Default)]
[NonSerialized]
public List<string> bannedSidetracksForCurrentLoop
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><string> |
|
ClientEvent_OnClearedCombatRoomsChanged
Declaration
public SafeAction ClientEvent_OnClearedCombatRoomsChanged
Field Value
ClientEvent_OnCurrentHuntLevelChanged
Declaration
public SafeAction ClientEvent_OnCurrentHuntLevelChanged
Field Value
ClientEvent_OnCurrentRoomIndexChanged
Declaration
public SafeAction ClientEvent_OnCurrentRoomIndexChanged
Field Value
ClientEvent_OnIsInTransitionChanged
Called everywhere when room transition status has changed.
Declaration
public SafeAction<bool> ClientEvent_OnIsInTransitionChanged
Field Value
ClientEvent_OnLoopStarted
Called everywhere when first zone starts or a new loop has started.
Declaration
public SafeAction ClientEvent_OnLoopStarted
Field Value
ClientEvent_OnNodesChanged
Called once per frame when nodes data changes in any way. Available everywhere.
Declaration
public SafeAction ClientEvent_OnNodesChanged
Field Value
ClientEvent_OnRoomLoaded
Called everywhere when a new room is loaded.
Declaration
public SafeAction<EventInfoLoadRoom> ClientEvent_OnRoomLoaded
Field Value
ClientEvent_OnRoomLoadStarted
Called everywhere when the game has started loading a room and the screen has gone dark.
Declaration
public SafeAction<EventInfoLoadRoom> ClientEvent_OnRoomLoadStarted
Field Value
ClientEvent_OnVoteCanceled
Declaration
public SafeAction<DewPlayer> ClientEvent_OnVoteCanceled
Field Value
ClientEvent_OnVoteCompleted
Declaration
public SafeAction ClientEvent_OnVoteCompleted
Field Value
ClientEvent_OnVoteStarted
Declaration
public SafeAction<DewPlayer> ClientEvent_OnVoteStarted
Field Value
ClientEvent_OnZoneLoaded
Called everywhere when a new zone is loaded.
Declaration
public SafeAction<EventInfoLoadZone> ClientEvent_OnZoneLoaded
Field Value
ClientEvent_OnZoneLoadStarted
Called everywhere when the game has started loading a new zone and the screen has gone dark.
Declaration
public SafeAction<EventInfoLoadZone> ClientEvent_OnZoneLoadStarted
Field Value
didLocallyShowHunterWarning
Declaration
[NonSerialized]
public bool didLocallyShowHunterWarning
Field Value
forceVoteForDebug
Declaration
[NonSerialized]
public bool? forceVoteForDebug
Field Value
hunterSpreadMultiplier
Declaration
[NonSerialized]
public float hunterSpreadMultiplier
Field Value
HunterStartSkippedTurns
Declaration
public static int HunterStartSkippedTurns
Field Value
hunterStatuses
Declaration
[SaveVar(SaveVarFlags.Default)]
public readonly SyncList<HunterStatus> hunterStatuses
Field Value
modifierServerData
Declaration
[SaveVar(SaveVarFlags.Default)]
public Dictionary<int, ModifierServerData> modifierServerData
Field Value
| Type |
Description |
| System.Collections.Generic.Dictionary<TKey, TValue><int, ModifierServerData> |
|
nextZoneOverride
Available on server.
Set this, and the next zone load will be overwritten to this one, and nextZoneOverride will be cleared.
Instead of appending a zone, this overwrites the zone to be loaded, so a zone still gets removed from the pool, and the tier goes up if necessary.
Declaration
[SaveVar(SaveVarFlags.Default)]
[NonSerialized]
public AssetRef<Zone> nextZoneOverride
Field Value
nodeDistanceMatrix
Declaration
[SaveVar(SaveVarFlags.Default)]
public readonly SyncList<int> nodeDistanceMatrix
Field Value
| Type |
Description |
| Mirror.SyncList<T><int> |
|
NodePlacementTries
Declaration
public static int NodePlacementTries
Field Value
nodes
Declaration
[SaveVar(SaveVarFlags.Default)]
public readonly SyncList<WorldNodeData> nodes
Field Value
onWorldGenerated
Called on server when the world is generated by GenerateWorld functions. Not called when loading from save.
Declaration
public SafeAction onWorldGenerated
Field Value
remainingZonesOfCurrentTier
Declaration
[SaveVar(SaveVarFlags.Default)]
[NonSerialized]
public List<AssetRef<Zone>> remainingZonesOfCurrentTier
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><AssetRef<Zone>> |
|
ScoreFuzziness
Declaration
public static float ScoreFuzziness
Field Value
ScorePerIsolatedImportantNode
Declaration
public static float ScorePerIsolatedImportantNode
Field Value
ScorePerIsolatedNode
Declaration
public static float ScorePerIsolatedNode
Field Value
visitedNodesSaveData
Declaration
[SaveVar(SaveVarFlags.Default)]
[NonSerialized]
public List<DewPersistence.RoomData> visitedNodesSaveData
Field Value
voteType
Declaration
Field Value
WorldGenerationIterations
Declaration
public static int WorldGenerationIterations
Field Value
WorldHeight
Declaration
public static float WorldHeight
Field Value
WorldWidth
Declaration
public static float WorldWidth
Field Value
Properties
clearedCombatRooms
Number of rooms cleared that are not shops nor special rooms.
Declaration
[SaveVar(SaveVarFlags.Default)]
public int clearedCombatRooms { get; set; }
Property Value
currentHuntLevel
Declaration
[SaveVar(SaveVarFlags.Default)]
public int currentHuntLevel { get; set; }
Property Value
currentNode
Declaration
public WorldNodeData currentNode { get; set; }
Property Value
currentNodeHunterStatus
Declaration
public HunterStatus currentNodeHunterStatus { get; }
Property Value
currentNodeIndex
Declaration
[SaveVar(SaveVarFlags.Default)]
public int currentNodeIndex { get; set; }
Property Value
currentRoom
Declaration
public Room currentRoom { get; set; }
Property Value
currentRoomIndex
Index of current room in current game session.
Declaration
[SaveVar(SaveVarFlags.Default)]
public int currentRoomIndex { get; set; }
Property Value
currentTier
Declaration
[SaveVar(SaveVarFlags.Default)]
public int currentTier { get; set; }
Property Value
currentTurnIndex
Declaration
[SaveVar(SaveVarFlags.Default)]
public int currentTurnIndex { get; }
Property Value
currentZone
Declaration
[SaveVar(SaveVarFlags.Default)]
public Zone currentZone { get; set; }
Property Value
currentZoneClearedNodes
Number of cleared nodes in current zone.
Starts at 0 on a new zone, and goes up whenever players move away from a previously unvisited node.
Declaration
[SaveVar(SaveVarFlags.Default)]
public int currentZoneClearedNodes { get; set; }
Property Value
currentZoneIndex
Index of current zone in current game session.
Declaration
[SaveVar(SaveVarFlags.Default)]
public int currentZoneIndex { get; set; }
Property Value
hunterSkippedTurns
Declaration
[SaveVar(SaveVarFlags.Default)]
public int hunterSkippedTurns { get; set; }
Property Value
hunterStartNodeIndex
Declaration
[SaveVar(SaveVarFlags.Default)]
public int hunterStartNodeIndex { get; set; }
Property Value
isCurrentNodeHunted
Declaration
public bool isCurrentNodeHunted { get; }
Property Value
isHuntAdvanceDisabled
Declaration
public bool isHuntAdvanceDisabled { get; set; }
Property Value
isInAnyTransition
Declaration
public bool isInAnyTransition { get; }
Property Value
isInLocalTransition
Declaration
public bool isInLocalTransition { get; }
Property Value
isInRoomTransition
Declaration
public bool isInRoomTransition { get; }
Property Value
isSidetracking
Declaration
public bool isSidetracking { get; }
Property Value
isVoting
Declaration
public bool isVoting { get; }
Property Value
lastLoadNodeSettings
Available on server. Immediately set upon calling ZoneManager.LoadNode().
Declaration
public LoadNodeSettings lastLoadNodeSettings { get; }
Property Value
loopIndex
Declaration
[SaveVar(SaveVarFlags.Default)]
public int loopIndex { get; set; }
Property Value
sidetrackReturnNodeIndex
Node to return to after side tracking. Set to -1 if not sidetracking. Available everywhere.
Declaration
[SaveVar(SaveVarFlags.Default)]
public int sidetrackReturnNodeIndex { get; set; }
Property Value
voteData
Declaration
public int voteData { get; }
Property Value
voteRemainingSeconds
Declaration
public int voteRemainingSeconds { get; }
Property Value
worldSeed
Declaration
public uint worldSeed { get; set; }
Property Value
Methods
AddModifier(int, ModifierData, Action<RoomModifierBase>)
Add modifier to a node. Note if you're trying to add another main modifier, previous one will be removed.
Declaration
public int AddModifier(int nodeIndex, ModifierData mod, Action<RoomModifierBase> beforePrepare = null)
Parameters
Returns
AddModifier<T>(int, Action<T>)
Add modifier to a node. Note if you're trying to add another main modifier, previous one will be removed.
Declaration
public int AddModifier<T>(int nodeIndex, Action<T> beforePrepare = null) where T : RoomModifierBase
Parameters
| Type |
Name |
Description |
| int |
nodeIndex |
|
| System.Action<T><T> |
beforePrepare |
|
Returns
Type Parameters
AddModifier<T>(int, string, Action<T>)
Add modifier to a node. Note if you're trying to add another main modifier, previous one will be removed.
Declaration
public int AddModifier<T>(int nodeIndex, string clientData, Action<T> beforePrepare = null) where T : RoomModifierBase
Parameters
| Type |
Name |
Description |
| int |
nodeIndex |
|
| string |
clientData |
|
| System.Action<T><T> |
beforePrepare |
|
Returns
Type Parameters
AddSidetrackNode(string)
Declaration
public void AddSidetrackNode(string roomName)
Parameters
| Type |
Name |
Description |
| string |
roomName |
|
AddTravelToNodeInterrupt(Func<EventInfoTravelToNodeInterrupt, bool>)
Add travel-to-node interruptor.
Return true to interrupt travel for something cinematic and cool.
Note this cannot interrupt sidetracks, zone travels or fake travels.
Declaration
public void AddTravelToNodeInterrupt(Func<EventInfoTravelToNodeInterrupt, bool> func)
Parameters
AdvanceHunterTurn(bool)
Declaration
public void AdvanceHunterTurn(bool forceMove = false)
Parameters
| Type |
Name |
Description |
| bool |
forceMove |
|
CallOnReadyAfterTransition(Action)
Called after a reasonable amount of time has passed after transition ends.
Immediately called if not on a transition.
Declaration
public void CallOnReadyAfterTransition(Action action)
Parameters
| Type |
Name |
Description |
| System.Action |
action |
|
CmdCancelVote(NetworkConnectionToClient)
Declaration
public void CmdCancelVote(NetworkConnectionToClient sender = null)
Parameters
| Type |
Name |
Description |
| Mirror.NetworkConnectionToClient |
sender |
|
CmdTravelToNextZone(NetworkConnectionToClient)
Declaration
public void CmdTravelToNextZone(NetworkConnectionToClient sender = null)
Parameters
| Type |
Name |
Description |
| Mirror.NetworkConnectionToClient |
sender |
|
CmdTravelToNode(int, NetworkConnectionToClient)
Declaration
public void CmdTravelToNode(int index, NetworkConnectionToClient sender = null)
Parameters
| Type |
Name |
Description |
| int |
index |
|
| Mirror.NetworkConnectionToClient |
sender |
|
DoDeadEndTravel()
Do initial travel node animation and soft lock the game.
Declaration
public void DoDeadEndTravel()
GenerateWorldAuto()
Declaration
public void GenerateWorldAuto()
GenerateWorldWithSeed(uint)
Declaration
public void GenerateWorldWithSeed(uint seed)
Parameters
| Type |
Name |
Description |
| uint |
seed |
|
GetCannotTravelReason()
Declaration
public string GetCannotTravelReason()
Returns
GetCannotTravelReasonByDroppedGem(Gem)
Declaration
public string GetCannotTravelReasonByDroppedGem(Gem g)
Parameters
| Type |
Name |
Description |
| Gem |
g |
|
Returns
GetCannotTravelReasonByDroppedSkill(SkillTrigger)
Declaration
public string GetCannotTravelReasonByDroppedSkill(SkillTrigger st)
Parameters
Returns
GetHunterProgress()
Get hunter progress in this world. Returns value between 0 ~ 1
Declaration
public float GetHunterProgress()
Returns
GetNodeDistance(int, int)
Declaration
public int GetNodeDistance(int a, int b)
Parameters
| Type |
Name |
Description |
| int |
a |
|
| int |
b |
|
Returns
GetVoteSidetrackRift()
Declaration
public Rift_Sidetrack GetVoteSidetrackRift()
Returns
GetWorldRandom(int)
Get a random instance for this world.
Declaration
public DewRandom GetWorldRandom(int offset)
Parameters
| Type |
Name |
Description |
| int |
offset |
|
Returns
IsNodeConnected(int, int)
Declaration
public bool IsNodeConnected(int a, int b)
Parameters
| Type |
Name |
Description |
| int |
a |
|
| int |
b |
|
Returns
LoadModifierLightPrefabsOfCurrentZone()
Declaration
public List<RoomModifierBase> LoadModifierLightPrefabsOfCurrentZone()
Returns
LoadNextZoneByContentSettings()
Declaration
public void LoadNextZoneByContentSettings()
LoadNode(LoadNodeSettings)
Declaration
public void LoadNode(LoadNodeSettings s)
Parameters
LoadSidetrackRoom(string)
Declaration
public void LoadSidetrackRoom(string roomName)
Parameters
| Type |
Name |
Description |
| string |
roomName |
|
OnStart()
Declaration
public override void OnStart()
Overrides
RemoveModifier(int, int)
Declaration
public void RemoveModifier(int nodeIndex, int modifierId)
Parameters
| Type |
Name |
Description |
| int |
nodeIndex |
|
| int |
modifierId |
|
RemoveModifier(int)
Declaration
public void RemoveModifier(int modifierId)
Parameters
| Type |
Name |
Description |
| int |
modifierId |
|
RemoveModifier<T>(int)
Declaration
public bool RemoveModifier<T>(int nodeIndex)
Parameters
| Type |
Name |
Description |
| int |
nodeIndex |
|
Returns
Type Parameters
RemoveTravelToNodeInterrupt(Func<EventInfoTravelToNodeInterrupt, bool>)
Declaration
public void RemoveTravelToNodeInterrupt(Func<EventInfoTravelToNodeInterrupt, bool> func)
Parameters
ReturnFromSidetracking()
Declaration
public void ReturnFromSidetracking()
RevealNodesAndAnnounce(DewPlayer, int)
Declaration
public void RevealNodesAndAnnounce(DewPlayer revealer, int nodeCount)
Parameters
| Type |
Name |
Description |
| DewPlayer |
revealer |
|
| int |
nodeCount |
|
RevealWorld(bool)
Declaration
public void RevealWorld(bool fully = false)
Parameters
| Type |
Name |
Description |
| bool |
fully |
|
SetCurrentNodeIndexAndRevealAdjacent(int)
Declaration
public void SetCurrentNodeIndexAndRevealAdjacent(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
SetRoom(int, string)
Declaration
public void SetRoom(int nodeIndex, string room)
Parameters
| Type |
Name |
Description |
| int |
nodeIndex |
|
| string |
room |
|
SetRoomOverride(int, string)
Declaration
public void SetRoomOverride(int nodeIndex, string roomOverride)
Parameters
| Type |
Name |
Description |
| int |
nodeIndex |
|
| string |
roomOverride |
|
SetRoomRotIndex(int, int)
Declaration
public void SetRoomRotIndex(int nodeIndex, int roomRotIndex)
Parameters
| Type |
Name |
Description |
| int |
nodeIndex |
|
| int |
roomRotIndex |
|
ShouldVoteOnTravel()
Declaration
public bool ShouldVoteOnTravel()
Returns
StartVoteNextNode(DewPlayer, int)
Declaration
public void StartVoteNextNode(DewPlayer player, int nextNodeIndex)
Parameters
| Type |
Name |
Description |
| DewPlayer |
player |
|
| int |
nextNodeIndex |
|
StartVoteNextZone(DewPlayer)
Declaration
public void StartVoteNextZone(DewPlayer player)
Parameters
StartVoteSidetrack(DewPlayer, Rift_Sidetrack)
Declaration
public void StartVoteSidetrack(DewPlayer player, Rift_Sidetrack rift)
Parameters
SyncNodeChanges(int)
Force node changes to be synced across clients.
Declaration
public void SyncNodeChanges(int nodeIndex)
Parameters
| Type |
Name |
Description |
| int |
nodeIndex |
|
TravelToNode(int, bool, bool, bool)
Declaration
public void TravelToNode(int to, bool advanceTurn = true, bool isSidetrackTransition = false, bool ignoreInterrupts = false)
Parameters
| Type |
Name |
Description |
| int |
to |
|
| bool |
advanceTurn |
|
| bool |
isSidetrackTransition |
|
| bool |
ignoreInterrupts |
|
TravelToZone(Zone, bool)
Declaration
public void TravelToZone(Zone prefab, bool noAdvance = false)
Parameters
| Type |
Name |
Description |
| Zone |
prefab |
|
| bool |
noAdvance |
|
TravelWithValidationAndConfirmation(Action, bool)
Check for active vote, artifact window, leftover rewards and hero souls.
Declaration
public void TravelWithValidationAndConfirmation(Action action, bool ignoreSidetrack = false)
Parameters
| Type |
Name |
Description |
| System.Action |
action |
|
| bool |
ignoreSidetrack |
|
TryGetNodeIndexForNextGoal(GetNodeIndexSettings, out int)
Get a good node location for next goal (revive player, quest, etc)
Unvisited node in desired distance, preferably closer to boss node.
Declaration
public bool TryGetNodeIndexForNextGoal(GetNodeIndexSettings s, out int nodeIndex)
Parameters
Returns
UpdateModifiersByHunterStatus(int)
Declaration
public void UpdateModifiersByHunterStatus(int currentTravelDestinationNode = -1)
Parameters
| Type |
Name |
Description |
| int |
currentTravelDestinationNode |
|
Implements
Extension Methods