專案類圖

灰色耳机發表於2024-08-18
classDiagram class AActor { <<Abstract>> } class UObject { <<Abstract>> } class UBlueprintFunctionLibrary { <<Abstract>> } class AMyActorBase { +int32 ActorId +FOnPositionRotationUpdated OnPositionRotationUpdated +SetActorPosition(FVector NewPosition) +SetActorRotation(FRotator NewRotation) +BeginPlay() +TakePicture() +DestroySelf() -HandlePositionRotationUpdate(FVector NewPosition, FRotator NewRotation) } class AAircraftTest { +Tick(float DeltaTime) +SetActorRotation(FRotator NewRotation) } class AMissileTest { +Tick(float DeltaTime) +LaunchMissile() +ExplodeMissile() } class ATargetActor { +DestroySelf() } class UMyActorManager { +TArray<AMyActorBase*> ManagedActors +RegisterActor(AMyActorBase* Actor) +AMyActorBase* GetActorById(int32 ActorId) +FOnActorUpdated OnActorUpdated +CreateObject(UClass* ObjectClass, FVector Position, FRotator Rotation) +UpdateActor(int32 ActorId, FVector NewPosition, FRotator NewRotation) } class UTargetManager { +TArray<ATargetActor*> ManagedTargets +RegisterTarget(ATargetActor* Target) +ATargetActor* GetTargetById(int32 TargetId) +UpdateTarget(int32 TargetId, FVector NewPosition, FRotator NewRotation) } class URegionBase { +int32 RegionId +FVector Position +FRotator Rotation +SetPosition(FVector NewPosition) +SetRotation(FRotator NewRotation) } class URegionManager { +TArray<URegionBase*> ManagedRegions +RegisterRegion(URegionBase* Region) +URegionBase* GetRegionById(int32 RegionId) +FOnRegionUpdated OnRegionUpdated +CreateRegion(FVector Position, FRotator Rotation) +UpdateRegion(int32 RegionId, FVector NewPosition, FRotator NewRotation) } class UUdpSocketServer { +StartListening() +OnDataReceived(const TArray<uint8>& Data) +SendPicture(const TArray<uint8>& ImageData) -ParseAircraftData(const TArray<uint8>& Data, int32& OutActorId, FVector& OutPosition, FRotator& OutRotation) -ParseMissileData(const TArray<uint8>& Data, int32& OutActorId, FVector& OutPosition) -ParseCreateRegionData(const TArray<uint8>& Data, FVector& OutPosition, FRotator& OutRotation) -ParseUpdateRegionData(const TArray<uint8>& Data, int32& OutRegionId, FVector& OutPosition, FRotator& OutRotation) } subgraph MainClasses AMyActorBase AAircraftTest AMissileTest ATargetActor UMyActorManager UTargetManager end subgraph RegionClasses URegionBase URegionManager end subgraph UtilityClasses UUdpSocketServer end AActor <|-- AMyActorBase AActor <|-- URegionBase AMyActorBase <|-- AAircraftTest AMyActorBase <|-- AMissileTest AMyActorBase <|-- ATargetActor UObject <|-- UMyActorManager UObject <|-- URegionManager UObject <|-- UTargetManager UBlueprintFunctionLibrary <|-- UUdpSocketServer AMyActorBase o-- UMyActorManager : "Managed Actors" ATargetActor o-- UTargetManager : "Managed Targets" URegionBase o-- URegionManager : "Managed Regions" UUdpSocketServer *-- UMyActorManager : "Notify Actor Update" UUdpSocketServer *-- UTargetManager : "Notify Target Update" UUdpSocketServer *-- URegionManager : "Notify Region Update"

相關文章