protected override void OnCreate() { var world = World.DefaultGameObjectInjectionWorld; animationSystem = world.GetOrCreateSystem <AnimationSystem>(); cameraFollowSystem = world.GetOrCreateSystem <CameraFollowSystem>(); retrieveInteractableCollisionsSystem = world.GetOrCreateSystem <RetrieveInteractableCollisionsSystem>(); playerCollisionSystem = world.GetOrCreateSystem <PlayerCollisionSystem>(); temporaryEnemySpawnerSystem = world.GetOrCreateSystem <TemporaryEnemySpawnerSystem>(); var lateSimulation = world.GetOrCreateSystem <LateSimulationManager>(); lateSimulation.AddSystemToUpdateList(animationSystem); lateSimulation.AddSystemToUpdateList(cameraFollowSystem); lateSimulation.AddSystemToUpdateList(retrieveInteractableCollisionsSystem); lateSimulation.AddSystemToUpdateList(playerCollisionSystem); lateSimulation.AddSystemToUpdateList(temporaryEnemySpawnerSystem); lateSimulation.SortSystemUpdateList(); }
protected override void OnCreate() { var world = World.DefaultGameObjectInjectionWorld; stateEventSystem = world.GetOrCreateSystem <StateEventSystem>(); animationEventSystem = world.GetOrCreateSystem <AnimationEventSystem>(); interactableEventSystem = world.GetOrCreateSystem <InteractableEventSystem>(); soundEventSystem = world.GetOrCreateSystem <SoundEventSystem>(); lootSystem = world.GetOrCreateSystem <LootSystem>(); visualEventSystem = world.GetOrCreateSystem <VisualEventSystem>(); cleanupSystem = world.GetOrCreateSystem <CleanupSystem>(); dropSystem = world.GetOrCreateSystem <DropSystem>(); uiSystem = world.GetOrCreateSystem <UISystem>(); globalEventListenerSystem = world.GetOrCreateSystem <GlobalEventListenerSystem>(); playerCollisionSystem = world.GetOrCreateSystem <PlayerCollisionSystem>(); invincibleSystem = world.GetOrCreateSystem <InvincibleSystem>(); interactableDoorSystem = world.GetOrCreateSystem <InteractableDoorSystem>(); var presentation = world.GetOrCreateSystem <PresentationManager>(); presentation.AddSystemToUpdateList(stateEventSystem); presentation.AddSystemToUpdateList(animationEventSystem); presentation.AddSystemToUpdateList(interactableEventSystem); presentation.AddSystemToUpdateList(lootSystem); presentation.AddSystemToUpdateList(visualEventSystem); presentation.AddSystemToUpdateList(soundEventSystem); presentation.AddSystemToUpdateList(cleanupSystem); presentation.AddSystemToUpdateList(dropSystem); presentation.AddSystemToUpdateList(uiSystem); presentation.AddSystemToUpdateList(globalEventListenerSystem); presentation.AddSystemToUpdateList(invincibleSystem); presentation.AddSystemToUpdateList(interactableDoorSystem); // presentation.AddSystemToUpdateList(playerCollisionSystem); presentation.SortSystemUpdateList(); }