feat: zone config blockers — decouple MovementManager from zone enums #42
No reviewers
Labels
No labels
architecture
bug
duplicate
enhancement
help wanted
invalid
performance
quality
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lavarius/ProjectOverlay!42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/zone-config-blockers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & Why
Replaces the hard-coded
Outside / Inside / Booth / StartSceneenum with a data-drivenZoneConfigScriptableObject, fully decouplingMovementManagerfrom zone naming. Zone triggers now publish capability data; movement code just queries what's currently blocked.New types
ZoneBlocker.csJump,AutoSprint,AccelerationMovementZoneConfig.csint weight+List<ZoneBlocker> blockersCreate Zone Config assets via Assets → Create → Lava Overlay → Zone Config.
ZoneManager (rewritten)
RegisterZone(config)/UnregisterZone(config)— called by trigger enter/exitSetSceneDefault(config)— scene baseline set byCharacterSceneInitializerClearActiveZones()— called on scene load to flush stale trigger stateIsBlocked(ZoneBlocker)— single query point for all consumersMovementManager
ZoneInfluenced→MonoBehaviourJump()— guarded byIsBlocked(Jump)ShouldSprint—!IsBlocked(AutoSprint) || SprintingMovement()— branches onIsBlocked(AccelerationMovement)Other changes
AnimationController—ZoneInfluencedremoved, zone override methods removed,SetZones()direct API keptCharacterZoneChanger—OnTriggerStay+blockslist replaced withOnTriggerEnter/OnTriggerExit; field is nowZoneConfigCharacterSpawnPoint—DefaultZoneis now aZoneConfigreferenceCharacterSceneInitializer—ApplyZonecallsZoneManagerinstead ofSetZoneon componentsZoneInfluenced.cs— deletedMigration
For each
CharacterZoneChangerin the scene:ZoneConfigasset with the appropriateweightandblockersZone Configfield on the trigger GameObjectFor each
CharacterSpawnPoint:ZoneConfigasset for the scene's default zoneDefault Zone