@startuml class GhostManager { - {static} instance : GhostManager + {static} getInstance() : GhostManager - selectedBlockData : BlockData - ghostObject : GameObject - canPlace : bool = false - onClearEvent : UnityEvent - alignToSurfaceNormal : bool = true - snapRotation : bool = false - followSpeed : float = 20f - heightOffset : float = 0f - validTint : Color - invalidTint : Color - attachPoint : Transform - validator : IValidator - isValidPlacement : bool = true - currentSurfaceNormal : Vector3 - currentSurfacePoint : Vector3 - rotationAxis : Vector3 - ghostRenderers : Renderer[] - container : SocketContainer - jointBlock : JointBlock - block : Block - isDragged : bool = false - isJustPlaced : bool = false - editingSourceObject : GameObject - editingOriginalPos : Vector3 - editingOriginalRot : Quaternion - isEditingExisting : bool - currentStrategy : IGhostMovementStrategy + SetMovementStrategy(strategy:IGhostMovementStrategy) : void - rayInteractor : RayInteractor - snappingSystem : SnapSystem - environment : Environment - commandHandler : CommandHandler - socketIterator : SocketIterator - inputProvider : BaseInputProvider - Awake() : void - Start() : void - Update() : void + GhostTransform : Transform <> + setDrag(drag:bool) : void - OnPlace() : void + ForcePlace() : void - resetPlaced() : IEnumerator - OnPlaceWithDragging() : void - PlaceBlock() : void - CommitExistingBlock() : void + SetupBlock(blockData:BlockData) : void + SetupExistingBlock(sourceObject:GameObject, strategy:IGhostMovementStrategy) : void - InitialiseGhostFromObject(ghost:GameObject) : void + HasActiveGhost() : bool + isGhost(obj:GameObject) : bool + ClearGhost() : void + ClearGhostData() : void - UpdateSurfaceTracking() : void - UpdateVisualFeedback(isValid:bool) : void - {static} SetLayerRecursively(obj:GameObject, layer:int, Method:Func) : void - {static} SetLayerRecursively(obj:GameObject, layer:int) : void - {static} RestoreMaterialAlpha(obj:GameObject, Method:Func) : void - {static} RestoreMaterialAlpha(obj:GameObject) : void - {static} RestoreMaterialColor(obj:GameObject, Method:Func) : void - {static} RestoreMaterialColor(obj:GameObject) : void + onClearAddListener(action:UnityAction) : void + setupBlock(blockData:BlockData) : void + clearGhost() : void + clearGhostData() : void - afterCreation(blockObj:GameObject) : void } MonoBehaviour <|-- GhostManager @enduml