Initial commit
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
@startuml
|
||||
class BaseInteractable {
|
||||
+ <<virtual>> onHoverEnter() : void
|
||||
+ <<virtual>> onHoverExit() : void
|
||||
+ <<virtual>> onSelectEnter() : void
|
||||
+ <<virtual>> onSelectExit() : void
|
||||
+ <<virtual>> highLightOn() : void
|
||||
+ <<virtual>> highLightOff() : void
|
||||
}
|
||||
MonoBehaviour <|-- BaseInteractable
|
||||
IInteractable <|-- BaseInteractable
|
||||
BaseInteractable --> "onSelectEnterEvent" UnityEvent
|
||||
BaseInteractable --> "onSelectExitEvent" UnityEvent
|
||||
BaseInteractable --> "onHoverEnterEvent" UnityEvent
|
||||
BaseInteractable --> "onHoverExitEvent" UnityEvent
|
||||
@enduml
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
@startuml
|
||||
class GrabInteractable {
|
||||
+ alignToSurfaceNormal : bool = true
|
||||
+ alignmentSpeed : float = 15f
|
||||
+ snapRotation : bool = false
|
||||
+ followSpeed : float = 20f
|
||||
+ heightOffset : float = 0f
|
||||
+ GetAttachPoint() : Transform
|
||||
+ SetAttachPoint(attachPoint:Transform) : void
|
||||
+ GetValidator() : IValidator
|
||||
}
|
||||
MonoBehaviour <|-- GrabInteractable
|
||||
GrabInteractable o-> "validTint" Color
|
||||
GrabInteractable o-> "invalidTint" Color
|
||||
@enduml
|
||||
@@ -0,0 +1,9 @@
|
||||
@startuml
|
||||
class HoveredUI {
|
||||
+ OnPointerEnter(eventData:PointerEventData) : void
|
||||
+ OnPointerExit(eventData:PointerEventData) : void
|
||||
}
|
||||
MonoBehaviour <|-- HoveredUI
|
||||
IPointerEnterHandler <|-- HoveredUI
|
||||
IPointerExitHandler <|-- HoveredUI
|
||||
@enduml
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
@startuml
|
||||
interface IInteractable {
|
||||
}
|
||||
@enduml
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
@startuml
|
||||
class UIInteractable {
|
||||
+ <<override>> onSelectEnter() : void
|
||||
+ <<override>> onSelectExit() : void
|
||||
+ setBlockData(blockData:BlockData) : void
|
||||
+ OnPointerDown(eventData:PointerEventData) : void
|
||||
}
|
||||
BaseInteractable <|-- UIInteractable
|
||||
IPointerDownHandler <|-- UIInteractable
|
||||
@enduml
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@startuml
|
||||
class DeleteInteractor {
|
||||
+ DeleteObjects() : void
|
||||
}
|
||||
MonoBehaviour <|-- DeleteInteractor
|
||||
@enduml
|
||||
@@ -0,0 +1,13 @@
|
||||
@startuml
|
||||
class RayInteractor {
|
||||
+ {static} getInstance() : RayInteractor
|
||||
+ GetHitInfo(hitInfo:RaycastHit) : bool
|
||||
+ GetCurrentGizmo() : GameObject
|
||||
+ GetHitPosition() : Vector3
|
||||
}
|
||||
class "UnityEvent`1"<T> {
|
||||
}
|
||||
MonoBehaviour <|-- RayInteractor
|
||||
RayInteractor --> "OnWorldClick" UnityEvent
|
||||
RayInteractor o-> "OnSelectEvent<IInteractable>" "UnityEvent`1"
|
||||
@enduml
|
||||
@@ -0,0 +1,11 @@
|
||||
@startuml
|
||||
class SnapSystem {
|
||||
+ {static} getInstance() : SnapSystem
|
||||
+ UpdateSockets(detectionPoint:Vector3, ghostRoot:Transform) : void
|
||||
+ ClearHighlights() : void
|
||||
+ Clear() : void
|
||||
+ GetNearbySockets() : List<SocketPoint>
|
||||
+ GetClosestSocket() : SocketPoint
|
||||
}
|
||||
MonoBehaviour <|-- SnapSystem
|
||||
@enduml
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
@startuml
|
||||
class TestCommandInteractor {
|
||||
}
|
||||
MonoBehaviour <|-- TestCommandInteractor
|
||||
@enduml
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
@startuml
|
||||
class AxisMoveStrategy {
|
||||
+ AxisMoveStrategy(lockedRotation:Quaternion, clampMin:float, clampMax:float)
|
||||
+ BeginDrag(axisDirection:Vector3, ghostPosition:Vector3) : void
|
||||
+ EndDrag() : void
|
||||
+ UpdateMovement(ctx:GhostMovementContext) : void
|
||||
}
|
||||
IGhostMovementStrategy <|-- AxisMoveStrategy
|
||||
@enduml
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@startuml
|
||||
class AxisRotateStrategy {
|
||||
+ OverridesSurfaceTracking : bool <<get>>
|
||||
+ Sensitivity : float = 0.4f
|
||||
+ AxisRotateStrategy(localAxis:LocalAxis, lockedPosition:Vector3)
|
||||
+ BeginRotate() : void
|
||||
+ EndRotate() : void
|
||||
+ UpdateMovement(ctx:GhostMovementContext) : void
|
||||
}
|
||||
enum LocalAxis {
|
||||
Up,
|
||||
Forward,
|
||||
Right,
|
||||
}
|
||||
IGhostMovementStrategy <|-- AxisRotateStrategy
|
||||
AxisRotateStrategy +-- LocalAxis
|
||||
@enduml
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@startuml
|
||||
class FreeMoveStrategy {
|
||||
+ UpdateMovement(ctx:GhostMovementContext) : void
|
||||
}
|
||||
IGhostMovementStrategy <|-- FreeMoveStrategy
|
||||
@enduml
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
@startuml
|
||||
struct GhostMovementContext {
|
||||
+ <<readonly>> FollowSpeed : float
|
||||
+ <<readonly>> HeightOffset : float
|
||||
+ <<readonly>> AlignToSurfaceNormal : bool
|
||||
+ <<readonly>> SnapRotation : bool
|
||||
+ GhostMovementContext(ghostTransform:Transform, surfacePoint:Vector3, surfaceNormal:Vector3, mySocket:SocketPoint, targetSocket:SocketPoint, attachPoint:Transform, followSpeed:float, heightOffset:float, alignToSurfaceNormal:bool, snapRotation:bool)
|
||||
}
|
||||
GhostMovementContext --> "GhostTransform" Transform
|
||||
GhostMovementContext --> "SurfacePoint" Vector3
|
||||
GhostMovementContext --> "SurfaceNormal" Vector3
|
||||
GhostMovementContext --> "MySocket" SocketPoint
|
||||
GhostMovementContext --> "TargetSocket" SocketPoint
|
||||
GhostMovementContext --> "AttachPoint" Transform
|
||||
GhostMovementContext --> "RotationAxis" Vector3
|
||||
@enduml
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
@startuml
|
||||
class GhostStrategyHandler {
|
||||
+ {static} getInstance() : GhostStrategyHandler
|
||||
+ StartDraggingRight() : void
|
||||
+ StartDraggingUp() : void
|
||||
+ StartDraggingForward() : void
|
||||
+ EndDragging() : void
|
||||
+ StartRotatingRight() : AxisRotateStrategy
|
||||
+ StartRotatingUp() : AxisRotateStrategy
|
||||
+ StartRotatingForward() : AxisRotateStrategy
|
||||
+ StartRotation() : void
|
||||
}
|
||||
MonoBehaviour <|-- GhostStrategyHandler
|
||||
@enduml
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
@startuml
|
||||
class GhostStrategyTester {
|
||||
+ ClampMin : float
|
||||
+ ClampMax : float = 5f
|
||||
+ RotateSensitivity : float = 0.4f
|
||||
}
|
||||
enum Mode {
|
||||
None,
|
||||
AxisMove,
|
||||
AxisRotate,
|
||||
}
|
||||
MonoBehaviour <|-- GhostStrategyTester
|
||||
GhostStrategyTester --> "TestTarget" GameObject
|
||||
GhostStrategyTester +-- Mode
|
||||
@enduml
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
@startuml
|
||||
interface IGhostMovementStrategy {
|
||||
}
|
||||
@enduml
|
||||
@@ -0,0 +1,20 @@
|
||||
@startuml
|
||||
class GhostManager {
|
||||
+ {static} getInstance() : GhostManager
|
||||
+ SetMovementStrategy(strategy:IGhostMovementStrategy) : void
|
||||
+ setDrag(drag:bool) : void
|
||||
+ ForcePlace() : void
|
||||
+ SetupBlock(blockData:BlockData) : void
|
||||
+ SetupExistingBlock(sourceObject:GameObject, strategy:IGhostMovementStrategy) : void
|
||||
+ HasActiveGhost() : bool
|
||||
+ isGhost(obj:GameObject) : bool
|
||||
+ ClearGhost() : void
|
||||
+ ClearGhostData() : void
|
||||
+ onClearAddListener(action:UnityAction) : void
|
||||
+ setupBlock(blockData:BlockData) : void
|
||||
+ clearGhost() : void
|
||||
+ clearGhostData() : void
|
||||
}
|
||||
MonoBehaviour <|-- GhostManager
|
||||
GhostManager --> "GhostTransform" Transform
|
||||
@enduml
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@startuml
|
||||
class InteractionManager {
|
||||
+ {static} getInstance() : InteractionManager
|
||||
}
|
||||
MonoBehaviour <|-- InteractionManager
|
||||
@enduml
|
||||
@@ -0,0 +1,12 @@
|
||||
@startuml
|
||||
class SelectionManager {
|
||||
+ {static} getInstance() : SelectionManager
|
||||
+ GetCurrentSelections() : List<IInteractable>
|
||||
+ ClearSelection() : void
|
||||
+ HasOneSelection() : bool
|
||||
}
|
||||
class "UnityEvent`1"<T> {
|
||||
}
|
||||
MonoBehaviour <|-- SelectionManager
|
||||
SelectionManager --> "SelectionEvent<IInteractable>" "UnityEvent`1"
|
||||
@enduml
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
@startuml
|
||||
class SocketManagerChecker {
|
||||
}
|
||||
MonoBehaviour <|-- SocketManagerChecker
|
||||
@enduml
|
||||
@@ -0,0 +1,11 @@
|
||||
@startuml
|
||||
class UIManager {
|
||||
+ {static} getInstance() : UIManager
|
||||
+ selectUIInteractable(uiInteractable:UIInteractable) : void
|
||||
+ deselectUIInteractable() : void
|
||||
}
|
||||
class "UnityEvent`1"<T> {
|
||||
}
|
||||
MonoBehaviour <|-- UIManager
|
||||
UIManager --> "onSelectEvent<BlockData>" "UnityEvent`1"
|
||||
@enduml
|
||||
Reference in New Issue
Block a user