ScheduleSystem.CitizenMovementHandler
Type JSONpublic class in ScheduleSystem
Type metadata
- Assembly
CandideServer - Namespace
ScheduleSystem - Base type
System.Object - Hash
B939D6337647561FCA1B4472C4F70DD7BFE4EAC10B05D2CAC3B72B56E4382A0A
Relationships
Base type
System.Object
Referenced by types
Fields
| Name | Visibility | Signature |
|---|---|---|
Failed# | public | public System.Boolean Failed |
ListPool# | private | private System.Collections.Generic.Stack<System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>> ListPool |
MovementSpeed# | public | public System.Single MovementSpeed |
StopDistance# | public | public System.Single StopDistance |
_citizenModel# | private | private CandideServer.Models.Citizen.CitizenModel _citizenModel |
_controller# | private | private CandideServer.Citizens.Base.AbstractCitizenController _controller |
_currentGoalPosition# | private | private ScheduleSystem.WorldPosition _currentGoalPosition |
_currentNodeIndex# | private | private System.Int32 _currentNodeIndex |
_currentStage# | private | private ScheduleSystem.PathStage _currentStage |
_endDirection# | private | private System.Nullable<System.Single> _endDirection |
_entityModel# | private | private CandideServer.Entities.ServerEntityModel _entityModel |
_hasPath# | private | private System.Boolean _hasPath |
_lastPosition# | private | private Microsoft.Xna.Framework.Vector3 _lastPosition |
_stages# | private | private System.Collections.Generic.List<ScheduleSystem.PathStage> _stages |
_startDirectionToNextNode# | private | private Microsoft.Xna.Framework.Vector2 _startDirectionToNextNode |
_stuckTimer# | private | private System.Single _stuckTimer |
Properties
| Name | Visibility | Signature |
|---|---|---|
Done# | public | public System.Boolean Done |
Entity# | private | private Shared.Entity.EntityWrapper Entity |
Methods
CheckForPathfindTaskResults
#
private System.Void CheckForPathfindTaskResults()
Method metadata
- Visibilityprivate
- Return type
System.Void - StaticFalse
- VirtualFalse
- Hash
1119A4F89C38CB483AD19DD2D95A47A8309B0F71858620714720C98AAF5ECDD9 - Body hash
F72463484F306FB69B211BFF99134D0FC7A37B31C4EADB1A6275E2A8BF40C6D9 - IL size137
Referenced calls
System.Collections.Generic.List<ScheduleSystem.PathStage>::get_Item(System.Int32)System.Nullable<System.Int32>::get_HasValue()System.Nullable<System.Int32>::GetValueOrDefault()System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>::get_Count()CandideServer.PathFinding.PathFindSystem::CheckForPathFindResult(System.Int32, System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>)System.Collections.Generic.List<ScheduleSystem.PathStage>::set_Item(System.Int32, !0)ScheduleSystem.CitizenMovementHandler::ClearGoal()System.Collections.Generic.List<ScheduleSystem.PathStage>::get_Count()
CheckIfCurrentStageIsWaitingForPathfindTask
#
private System.Boolean CheckIfCurrentStageIsWaitingForPathfindTask()
Method metadata
- Visibilityprivate
- Return type
System.Boolean - StaticFalse
- VirtualFalse
- Hash
7948164EE2CF4FFE8D0CD76BC9E26D3220AA87F2024DF16DDE17434BD0F64979 - Body hash
FE9596E7952FBEC5D1BF1955FBA092FC17BEF6FCDB32F11814D567B415F027C0 - IL size140
Referenced calls
System.Nullable<System.Int32>::get_HasValue()System.Nullable<System.Int32>::GetValueOrDefault()System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>::get_Count()CandideServer.PathFinding.PathFindSystem::CheckForPathFindResult(System.Int32, System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>)ScheduleSystem.CitizenMovementHandler::ClearGoal()ScheduleSystem.CitizenMovementHandler::NextNode()
ClearGoal
#
public System.Void ClearGoal()
Method metadata
- Visibilitypublic
- Return type
System.Void - StaticFalse
- VirtualFalse
- Hash
B6FB555ACA18F3CEEFF19CE183D9C3CEB3A434E43202FB609D2D61B255E023A9 - Body hash
40931310D7591B2DBCCC117AAB16B4FD14C33F8D6B2E07DA7AB4F4DBC26CCB09 - IL size240
Referenced calls
CandideCreator.Shared.Helpers.VectorExtension::ToVector2(Microsoft.Xna.Framework.Vector3)ScheduleSystem.WorldPosition::.ctor(System.Guid, Microsoft.Xna.Framework.Vector2, System.Nullable<System.Single>, System.Nullable<System.Guid>)System.Collections.Generic.List<ScheduleSystem.PathStage>::GetEnumerator()List.Enumerator<ScheduleSystem.PathStage>::get_Current()ScheduleSystem.CitizenMovementHandler::ReturnList(System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>)List.Enumerator<ScheduleSystem.PathStage>::MoveNext()System.IDisposable::Dispose()System.Collections.Generic.List<ScheduleSystem.PathStage>::Clear()System.Nullable<System.Guid>::get_HasValue()CandideServer.SyncStrategies.SyncStrategy::Everyone()CandideServer.ServerManagers.EntityServerManager::UpdateEntityState(System.Guid, System.Int32, System.Boolean, CandideServer.SyncStrategies.SyncStrategy)
Called by
CandideServer.Citizens.GenericServerCitizenController::ResetCitizenCandideServer.Entities.ScheduleSystem.Schedule::InitWalkingHomeDueToNoTaskCandideServer.Entities.ScheduleSystem.Schedule::ResetCitizenScheduleSystem.CitizenMovementHandler::CheckForPathfindTaskResultsScheduleSystem.CitizenMovementHandler::CheckIfCurrentStageIsWaitingForPathfindTaskScheduleSystem.CitizenMovementHandler::EndStageScheduleSystem.CitizenMovementHandler::NextStageScheduleSystem.CitizenMovementHandler::SetGoalPosition
EndStage
#
private System.Void EndStage()
Method metadata
- Visibilityprivate
- Return type
System.Void - StaticFalse
- VirtualFalse
- Hash
911A86F99A1466FB32512DF44D7986CFC7416817B0E1714D59EB6A31681A5D5D - Body hash
8173C8C0FDCFC634C13232223B8F962CD338C1973D853BD1A6DFA223EA432519 - IL size137
Referenced calls
ScheduleSystem.CitizenMovementHandler::NextStage()System.Nullable<System.Guid>::get_HasValue()System.Nullable<System.Guid>::get_Value()System.Collections.Generic.Dictionary<System.Guid, CandideServer.SimulationModels.BuildingSimulationModel>::TryGetValue(!0, !1&)ScheduleSystem.CitizenMovementHandler::ClearGoal()CandideServer.ServerManagers.CitizenServerManager::EnterBuilding(CandideServer.Models.Citizen.CitizenModel, CandideServer.SimulationModels.BuildingSimulationModel)CandideServer.ServerManagers.CitizenServerManager::ExitBuilding(CandideServer.Models.Citizen.CitizenModel)
FollowPath
#
private System.Void FollowPath(System.Single dt)
Method metadata
- Visibilityprivate
- Return type
System.Void - StaticFalse
- VirtualFalse
- Hash
B3B6EC5B151130E1C2803F3229681201DF334AE24459E095E9AA8327489E69B3 - Body hash
7B05A5B3F78AAF5117E96F3AF496556B96534C13CC280798162FB88EF7F403F6 - IL size497
Referenced calls
ScheduleSystem.CitizenMovementHandler::CheckIfCurrentStageIsWaitingForPathfindTask()System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>::get_Count()System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>::get_Item(System.Int32)CandideCreator.Shared.Helpers.VectorExtension::ToVector2(Microsoft.Xna.Framework.Vector3)Microsoft.Xna.Framework.Vector2::op_Subtraction(Microsoft.Xna.Framework.Vector2, Microsoft.Xna.Framework.Vector2)Microsoft.Xna.Framework.Vector3::Distance(Microsoft.Xna.Framework.Vector3, Microsoft.Xna.Framework.Vector3)ScheduleSystem.CitizenMovementHandler::SetGoalPosition(ScheduleSystem.WorldPosition, System.Single)Microsoft.Xna.Framework.Vector2::Dot(Microsoft.Xna.Framework.Vector2, Microsoft.Xna.Framework.Vector2)Microsoft.Xna.Framework.Vector2::Normalize(Microsoft.Xna.Framework.Vector2)Microsoft.Xna.Framework.Vector2::op_Multiply(Microsoft.Xna.Framework.Vector2, System.Single)CandideCreator.Shared.Helpers.VectorExtension::ToVector3Xy(Microsoft.Xna.Framework.Vector2)Microsoft.Xna.Framework.Vector3::op_Addition(Microsoft.Xna.Framework.Vector3, Microsoft.Xna.Framework.Vector3)CandideServer.ServerControllers.CitizensSController::MoveCitizen(CandideServer.Models.Citizen.CitizenModel, Microsoft.Xna.Framework.Vector3, System.Guid)System.Nullable<System.Guid>::get_HasValue()CandideServer.ServerManagers.EntityServerManager::UpdateEntityState(System.Guid, System.Int32, System.Boolean, CandideServer.SyncStrategies.SyncStrategy)ScheduleSystem.CitizenMovementHandler::get_Entity()CandideCreator.Shared.Helpers.VectorExtension::ToFloatDirection(Microsoft.Xna.Framework.Vector2)Shared.Entity.EntityWrapper::set_Direction(System.Single)System.Collections.Generic.List<ScheduleSystem.PathStage>::get_Count()Microsoft.Xna.Framework.Vector2::Length()ScheduleSystem.CitizenMovementHandler::NextNode()ScheduleSystem.CitizenMovementHandler::FollowPath(System.Single)ScheduleSystem.CitizenMovementHandler::EndStage()
GetList
#
private System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2> GetList()
Method metadata
- Visibilityprivate
- Return type
System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2> - StaticFalse
- VirtualFalse
- Hash
EE8AA2600993432B108A7FDA1661606FC7A57BD6E22FFDB8BBA4AC053B14BDEA - Body hash
AF272AD139326E98C59B3AFC66780EEDCD593A1B35118054C50AFC1C74780120 - IL size22
Referenced calls
System.Collections.Generic.Stack<System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>>::TryPop(!0&)System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>::.ctor()
InteriorPathStage
#
private ScheduleSystem.PathStage InteriorPathStage(Microsoft.Xna.Framework.Vector2 startPosition, Microsoft.Xna.Framework.Vector2 endPosition, CandideServer.Models.Worlds.WorldModel worldModel)
Method metadata
- Visibilityprivate
- Return type
ScheduleSystem.PathStage - StaticFalse
- VirtualFalse
- Hash
19B2BD23CEA824703C8D068E99BFBE2F3E873A614A099E222BF5CFA4F2C78879 - Body hash
ADC45E6EA029230D30159002F19431EF297E4EDF542E323325B56AD7ED80A2E1 - IL size91
Referenced calls
ScheduleSystem.CitizenMovementHandler::GetList()CandideServer.PathFinding.PathFindArgs::InteriorPathFind(CandideServer.Citizens.Base.AbstractCitizenController, Microsoft.Xna.Framework.Vector2, Microsoft.Xna.Framework.Vector2, System.Guid)CandideServer.PathFinding.PathFindSystem::QueuePathFindTask(CandideServer.PathFinding.PathFindArgs)System.Nullable<System.Int32>::.ctor(!0)
NextNode
#
private System.Void NextNode()
Method metadata
- Visibilityprivate
- Return type
System.Void - StaticFalse
- VirtualFalse
- Hash
F1AFE45E2394D15B0E1BFAF4B92E0861FF44075F241B008AFC0D28DB0801C898 - Body hash
E94BA0B5EBC3C2360E5AF3A311B3C1AD31260C5E66B31F3BAE6B615ED7FCEFD0 - IL size113
Referenced calls
System.Nullable<System.Int32>::get_HasValue()ScheduleSystem.CitizenMovementHandler::EndStage()System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>::get_Item(System.Int32)CandideCreator.Shared.Helpers.VectorExtension::ToVector2(Microsoft.Xna.Framework.Vector3)Microsoft.Xna.Framework.Vector2::op_Subtraction(Microsoft.Xna.Framework.Vector2, Microsoft.Xna.Framework.Vector2)
NextStage
#
private System.Void NextStage()
Method metadata
- Visibilityprivate
- Return type
System.Void - StaticFalse
- VirtualFalse
- Hash
4743238B466EA83AA72B6E869F201B48781FCFC193DEE4056EF180A9544926DD - Body hash
1D51BD06B0AFBB77132C1C6DC40D3127F08E543BA66D4106262D181DB83DB79C - IL size228
Referenced calls
System.Collections.Generic.List<ScheduleSystem.PathStage>::get_Count()System.Nullable<System.Single>::get_HasValue()System.Nullable<System.Single>::get_Value()Shared.Entity.EntityWrapper::set_Direction(System.Single)Shared.Entity.EntityWrapper::get_FloorHeight()CandideCreator.Shared.Helpers.VectorExtension::ToVector3Xyz(Microsoft.Xna.Framework.Vector2, System.Single)CandideServer.ServerControllers.CitizensSController::MoveCitizen(CandideServer.Models.Citizen.CitizenModel, Microsoft.Xna.Framework.Vector3, System.Guid)ScheduleSystem.CitizenMovementHandler::ClearGoal()ScheduleSystem.CitizenMovementHandler::ReturnList(System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>)System.Collections.Generic.List<ScheduleSystem.PathStage>::get_Item(System.Int32)System.Collections.Generic.List<ScheduleSystem.PathStage>::RemoveAt(System.Int32)System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>::get_Count()ScheduleSystem.CitizenMovementHandler::NextNode()
OutsidePathStage
#
private ScheduleSystem.PathStage OutsidePathStage(Microsoft.Xna.Framework.Vector2 startPosition, Microsoft.Xna.Framework.Vector2 endPosition, CandideServer.Models.Worlds.WorldModel worldModel, CandideServer.SimulationModels.BuildingSimulationModel fromBuilding, CandideServer.SimulationModels.BuildingSimulationModel toBuilding)
Method metadata
- Visibilityprivate
- Return type
ScheduleSystem.PathStage - StaticFalse
- VirtualFalse
- Hash
F4A98EB00BA34B5346EA4D3839223CA0280EB2A901D090D93B32DBF17DB1BAAB - Body hash
EDD16DF43B9CD3A6B5234AC4090C8920B78EA1A739A80CB51873B266B0655A55 - IL size236
Referenced calls
ScheduleSystem.CitizenMovementHandler::GetList()System.Nullable<Microsoft.Xna.Framework.Vector2>::.ctor(!0)CandideServer.PathFinding.PathFindArgs::RoadPathFind(CandideServer.Citizens.Base.AbstractCitizenController, System.Nullable<Microsoft.Xna.Framework.Vector2>, System.Nullable<Microsoft.Xna.Framework.Vector2>, System.Guid, CandideServer.SimulationModels.BuildingSimulationModel, CandideServer.SimulationModels.BuildingSimulationModel, System.Nullable<System.Guid>)CandideServer.PathFinding.PathFindSystem::QueuePathFindTask(CandideServer.PathFinding.PathFindArgs)System.Nullable<System.Int32>::.ctor(!0)
ReturnList
#
private System.Void ReturnList(System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2> list)
Method metadata
- Visibilityprivate
- Return type
System.Void - StaticFalse
- VirtualFalse
- Hash
6BE05F77F8681720B98B6681A9C60FCA6FD49ED7F63054415305C5150007A797 - Body hash
D7483BB80F2BFDE9E498B49EBACB320BF90A496C48D594E953BEB0E02260F5AD - IL size18
Referenced calls
System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>::Clear()System.Collections.Generic.Stack<System.Collections.Generic.List<Microsoft.Xna.Framework.Vector2>>::Push(!0)
SetGoalPosition
#
public System.Void SetGoalPosition(ScheduleSystem.WorldPosition goalPosition, System.Single stopDistance)
Method metadata
- Visibilitypublic
- Return type
System.Void - StaticFalse
- VirtualFalse
- Hash
D4AA6A8CC572BF2358C46F2977BF1D582A4C2EB5A812B14F2D11094B2B97727E - Body hash
9C51066C41316642515A266B793E7469CF5759A84E2EC01830522924A638597E - IL size747
Referenced calls
ScheduleSystem.WorldPosition::op_Equality(ScheduleSystem.WorldPosition, ScheduleSystem.WorldPosition)ScheduleSystem.CitizenMovementHandler::ClearGoal()System.Collections.Generic.Dictionary<System.Guid, CandideServer.Models.Worlds.WorldModel>::TryGetValue(!0, !1&)CandideCreator.Shared.Helpers.VectorExtension::ToVector2(Microsoft.Xna.Framework.Vector3)System.Diagnostics.Stopwatch::StartNew()System.Guid::op_Inequality(System.Guid, System.Guid)System.Nullable<System.Guid>::get_HasValue()System.Nullable<System.Guid>::GetValueOrDefault()System.Collections.Generic.Dictionary<System.Guid, CandideServer.SimulationModels.BuildingSimulationModel>::TryGetValue(!0, !1&)CandideServer.ServerManagers.CitizenServerManager::TryGetBuildingInteriorDoorPosition(CandideServer.SimulationModels.BuildingSimulationModel, Microsoft.Xna.Framework.Vector2&)CandideServer.ServerManagers.CitizenServerManager::TryGetBuildingExteriorDoorPosition(CandideServer.SimulationModels.BuildingSimulationModel, Microsoft.Xna.Framework.Vector2&)ScheduleSystem.CitizenMovementHandler::InteriorPathStage(Microsoft.Xna.Framework.Vector2, Microsoft.Xna.Framework.Vector2, CandideServer.Models.Worlds.WorldModel)System.Collections.Generic.List<ScheduleSystem.PathStage>::Add(!0)ScheduleSystem.CitizenMovementHandler::OutsidePathStage(Microsoft.Xna.Framework.Vector2, Microsoft.Xna.Framework.Vector2, CandideServer.Models.Worlds.WorldModel, CandideServer.SimulationModels.BuildingSimulationModel, CandideServer.SimulationModels.BuildingSimulationModel)System.Diagnostics.Stopwatch::get_Elapsed()System.TimeSpan::get_TotalSeconds()System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::.ctor(System.Int32, System.Int32)System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::AppendLiteral(System.String)System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::AppendFormatted(!!0, System.String)System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::ToStringAndClear()CandideCreator.Shared.Helpers.ServerWarningHelper::Warning(System.String)
Called by
String literals
Citizen pathfinding took long! Time taken:F3s.
Update
#
public System.Void Update(System.Single dt)
Method metadata
- Visibilitypublic
- Return type
System.Void - StaticFalse
- VirtualFalse
- Hash
CD014C74CD2BC65CB82BBCD0902DD53E33DC1C353517B0266B49D1DF00948CE7 - Body hash
FD23986D097BCEFBF909853088B69CE2E72D26BB5527F41825B60CF9ADE823A3 - IL size42
Referenced calls
System.Collections.Generic.List<ScheduleSystem.PathStage>::get_Count()ScheduleSystem.CitizenMovementHandler::NextStage()ScheduleSystem.CitizenMovementHandler::CheckForPathfindTaskResults()ScheduleSystem.CitizenMovementHandler::FollowPath(System.Single)
Called by
BM.MoveCitizen::UpdateCandideServer.Entities.ScheduleSystem.Schedule::UpdateContinueToDeskAfterFleeCandideServer.Entities.ScheduleSystem.Schedule::UpdateFleeingToSafetyCandideServer.Entities.ScheduleSystem.Schedule::UpdateMovementTaskCandideServer.Entities.ScheduleSystem.Schedule::UpdateVisitingUpgradedBuildingCandideServer.Entities.ScheduleSystem.Schedule::UpdateWalkingHomeDueToInteractionCandideServer.Entities.ScheduleSystem.Schedule::UpdateWalkingHomeDueToNoTaskCandideServer.Entities.ScheduleSystem.Schedule::UpdateWalkingHomeDueToTownChange