Initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
@startuml
|
||||
class AttachableBlock {
|
||||
+ GetConnectedBlocks() : List<AttachableBlock>
|
||||
+ GetAttachedJoints() : List<JointBlock>
|
||||
+ SetBlockType(BlockType:BlockType) : void
|
||||
+ DisconnectFrom(otherBlock:AttachableBlock) : void
|
||||
+ UnregisterJoint(joint:JointBlock) : void
|
||||
+ GetSocketContainer() : SocketContainer
|
||||
+ ConnectTo(otherBlock:AttachableBlock, mySocket:SocketPoint, theirSocket:SocketPoint) : void
|
||||
+ RegisterJoint(joint:JointBlock) : void
|
||||
}
|
||||
enum BlockType {
|
||||
Regular,
|
||||
Link,
|
||||
Gear,
|
||||
Structural,
|
||||
}
|
||||
MonoBehaviour <|-- AttachableBlock
|
||||
@enduml
|
||||
@@ -0,0 +1,4 @@
|
||||
@startuml
|
||||
interface BlockContainerInit {
|
||||
}
|
||||
@enduml
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@startuml
|
||||
class SimpleLinkContainerInit {
|
||||
+ InitBlockContainer(sockets:List<SocketPoint>) : List<SocketPoint>
|
||||
}
|
||||
MonoBehaviour <|-- SimpleLinkContainerInit
|
||||
BlockContainerInit <|-- SimpleLinkContainerInit
|
||||
@enduml
|
||||
@@ -0,0 +1,10 @@
|
||||
@startuml
|
||||
interface ISocket {
|
||||
}
|
||||
enum SocketType {
|
||||
Regular,
|
||||
JointHost,
|
||||
JointEnd,
|
||||
Universal,
|
||||
}
|
||||
@enduml
|
||||
@@ -0,0 +1,20 @@
|
||||
@startuml
|
||||
class JointBlock {
|
||||
+ TryPlaceJoint(targetSockets:List<SocketPoint>, isGhost:bool) : bool
|
||||
+ CreatePhysicsJoint(targetObj:GameObject, socket:SocketPoint) : void
|
||||
+ RemoveJoint() : void
|
||||
+ GetJointType() : JointBlockType
|
||||
+ GetSocketEnd1() : SocketPoint
|
||||
+ GetSocketEnd2() : SocketPoint
|
||||
+ IsPlaced() : bool
|
||||
}
|
||||
enum JointBlockType {
|
||||
FixedPivot,
|
||||
HingePivot,
|
||||
ConfigurablePivot,
|
||||
}
|
||||
class "List`1"<T> {
|
||||
}
|
||||
MonoBehaviour <|-- JointBlock
|
||||
JointBlock o-> "connectedBlocks<AttachableBlock>" "List`1"
|
||||
@enduml
|
||||
@@ -0,0 +1,8 @@
|
||||
@startuml
|
||||
class JointPlacementHandler {
|
||||
+ {static} getInstance() : JointPlacementHandler
|
||||
+ FindAllSocketsAlignedBetween(start:SocketPoint, end:SocketPoint) : List<SocketPoint>
|
||||
+ FindTargetSocketsForJoint(jointBlock:JointBlock, searchPosition:Vector3) : List<SocketPoint>
|
||||
}
|
||||
MonoBehaviour <|-- JointPlacementHandler
|
||||
@enduml
|
||||
@@ -0,0 +1,25 @@
|
||||
@startuml
|
||||
class SocketContainer {
|
||||
+ GetActiveSocket() : SocketPoint
|
||||
+ CycleToNextSocket() : void
|
||||
+ CycleToPreviousSocket() : void
|
||||
+ SetActiveSocketByIndex(index:int) : void
|
||||
+ SetActiveSocket(socket:SocketPoint) : void
|
||||
+ ResetToFirstSocket() : void
|
||||
+ GetAllSockets() : List<SocketPoint>
|
||||
+ GetAvailableSockets() : List<SocketPoint>
|
||||
+ GetOccupiedSockets() : List<SocketPoint>
|
||||
+ FindNearestCompatibleSocket(worldPosition:Vector3, sourceSocket:SocketPoint) : SocketPoint
|
||||
+ FindSocketsInRadius(worldPosition:Vector3, radius:float, onlyAvailable:bool) : List<SocketPoint>
|
||||
+ GetSocketsByType(type:SocketType) : List<SocketPoint>
|
||||
+ HighlightAllSockets(state:HighlightState) : void
|
||||
+ ClearAllHighlights() : void
|
||||
+ AddSocket(socket:SocketPoint) : void
|
||||
+ RemoveSocket(socket:SocketPoint) : void
|
||||
+ GetSocketCount() : int
|
||||
+ HasSockets() : bool
|
||||
+ GetCurrentSocketIndex() : int
|
||||
+ FindSocketsCompatibleWithJoint(jointBlock:JointBlock) : List<SocketPoint>
|
||||
}
|
||||
MonoBehaviour <|-- SocketContainer
|
||||
@enduml
|
||||
@@ -0,0 +1,9 @@
|
||||
@startuml
|
||||
class SocketIterator {
|
||||
+ {static} getInstance() : SocketIterator
|
||||
+ SetActiveContainer(container:SocketContainer) : void
|
||||
+ GetCurrentActiveSocket() : SocketPoint
|
||||
+ ClearActiveContainer() : void
|
||||
}
|
||||
MonoBehaviour <|-- SocketIterator
|
||||
@enduml
|
||||
@@ -0,0 +1,27 @@
|
||||
@startuml
|
||||
class SocketPoint {
|
||||
+ CanAccept(otherSocket:ISocket, isJoint:bool) : bool
|
||||
+ GetNormal() : Vector3
|
||||
+ Highlight(state:HighlightState) : void
|
||||
+ GetTransform() : Transform
|
||||
+ GetSocketType() : SocketType
|
||||
+ GetSocketRadius() : float
|
||||
+ SetSocketRadius(radius:float) : void
|
||||
+ IsOccupied() : bool
|
||||
+ IsJointOccupied() : bool
|
||||
+ GetOccupyingObject() : GameObject
|
||||
+ GetJointObject() : GameObject
|
||||
+ SetOccupied(obj:GameObject) : void
|
||||
+ SetJointOccupied(jointObject:GameObject) : void
|
||||
+ ReleaseJoint() : void
|
||||
+ Release() : void
|
||||
}
|
||||
enum HighlightState {
|
||||
Default,
|
||||
Active,
|
||||
Compatible,
|
||||
Incompatible,
|
||||
}
|
||||
MonoBehaviour <|-- SocketPoint
|
||||
ISocket <|-- SocketPoint
|
||||
@enduml
|
||||
Reference in New Issue
Block a user