Initial commit
This commit is contained in:
+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
|
||||
Reference in New Issue
Block a user