mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-05-14 11:25:04 +00:00
Refactor MovingPlatformComponent to support subcomponents for movement and rotation
- Introduced PlatformSubComponent as a base class for platform movement logic. - Added MoverSubComponent for standard path-following behavior. - Implemented SimpleMoverSubComponent for auto-generating two-waypoint paths. - Created RotatorSubComponent to handle angular velocity and rotation along paths. - Updated MovingPlatformComponent to manage multiple subcomponents and their states. - Modified serialization and update logic to accommodate new subcomponent architecture. - Adjusted GameMessages to include additional parameters for platform state synchronization. - Enhanced SimplePhysicsComponent to prevent double movement when on a moving platform. - Added new CMakeLists.txt for organizing MovingPlatformComponent files.
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
add_subdirectory(MovingPlatformComponent)
|
||||
|
||||
foreach(file ${DGAME_DCOMPONENTS_MOVINGPLATFORMCOMPONENT})
|
||||
list(APPEND DGAME_DCOMPONENTS_SUBCOMPONENT_SOURCES "MovingPlatformComponent/${file}")
|
||||
endforeach()
|
||||
|
||||
set(DGAME_DCOMPONENTS_SOURCES
|
||||
${DGAME_DCOMPONENTS_SUBCOMPONENT_SOURCES}
|
||||
"AchievementVendorComponent.cpp"
|
||||
"ActivityComponent.cpp"
|
||||
"BaseCombatAIComponent.cpp"
|
||||
@@ -51,7 +58,7 @@ set(DGAME_DCOMPONENTS_SOURCES
|
||||
)
|
||||
|
||||
add_library(dComponents OBJECT ${DGAME_DCOMPONENTS_SOURCES})
|
||||
target_include_directories(dComponents PUBLIC "."
|
||||
target_include_directories(dComponents PUBLIC "." "MovingPlatformComponent"
|
||||
"${PROJECT_SOURCE_DIR}/dGame/dPropertyBehaviors" # via ModelComponent.h
|
||||
"${PROJECT_SOURCE_DIR}/dGame/dPropertyBehaviors/ControlBehaviorMessages"
|
||||
"${PROJECT_SOURCE_DIR}/dGame/dMission" # via MissionComponent.h
|
||||
|
||||
Reference in New Issue
Block a user