private Graph CreateGraph(IWorldBase world) { if (world == null) { return(null); } var systems = WorldHelper.GetSystems(world); var modules = WorldHelper.GetModules(world); var graph = new Graph(this.checkpointCollector); graph.worldGraph = this; var rootNode = graph.AddNode(new WorldNode(world)); var modulesVisualContainer = graph.AddNode(rootNode, new ModulesVisualContainer(this.CreateSubGraph <ModuleVisualNode>(modules, "Update", WorldStep.VisualTick)), modules); var beginTick = graph.AddNode(modulesVisualContainer, new BeginTickNode(null), "Simulate"); var modulesLogicContainer = graph.AddNode(beginTick, new ModulesLogicContainer(this.CreateSubGraph <ModuleLogicNode>(modules, "AdvanceTick", WorldStep.LogicTick)), modules); var pluginsLogicContainer = graph.AddNode(modulesLogicContainer, new PluginsLogicContainer(null), "PlayPluginsForTick"); var systemsLogicContainer = graph.AddNode(pluginsLogicContainer, new SystemsLogicContainer(this.CreateSubGraph <SystemLogicNode>(systems, "AdvanceTick", WorldStep.LogicTick)), systems); var removeOnceComponents = graph.AddNode(systemsLogicContainer, new RemoveOnceComponentsNode(null), "RemoveComponentsOnce"); var endTick = graph.AddNode(removeOnceComponents, new EndTickNode(null)); var pluginsLogicSimulateContainer = graph.AddNode(endTick, new PluginsLogicSimulateContainer(null), "SimulatePluginsForTicks"); var systemsVisualContainer = graph.AddNode(pluginsLogicSimulateContainer, new SystemsVisualContainer(this.CreateSubGraph <SystemVisualNode>(systems, "Update", WorldStep.VisualTick)), systems); graph.AddNode(systemsVisualContainer, new RemoveMarkersNode(null), "RemoveMarkers"); return(graph); }
private Graph CreateGraph(World world) { if (world == null) { return(null); } var systems = WorldHelper.GetSystems(world); var modules = WorldHelper.GetModules(world); var graph = new Graph(this.checkpointCollector); graph.worldGraph = this; var rootNode = graph.AddNode(new WorldNode(world)); var modulesVisualContainer = graph.AddNode(rootNode, new ModulesVisualContainer(this.CreateSubGraph <ModuleVisualNode>(modules, "Update", WorldStep.VisualTick)), modules); var beginTick = graph.AddNode(modulesVisualContainer, new BeginTickNode(null), "Simulate"); var modulesLogicContainer = graph.AddNode(beginTick, new ModulesLogicContainer(this.CreateSubGraph <ModuleLogicNode>(modules, "AdvanceTick", WorldStep.LogicTick)), modules); var pluginsLogicContainer = graph.AddNode(modulesLogicContainer, new PluginsLogicContainer(null), "PlayPluginsForTick"); Node systemsLogicContainer = pluginsLogicContainer; for (int i = 0; i < systems.Length; ++i) { var group = systems.arr[i]; if (group.runtimeSystem.allSystems == null || group.runtimeSystem.allSystems.Count == 0) { continue; } systemsLogicContainer = graph.AddNode(systemsLogicContainer, new SystemsLogicContainer(group.name, this.CreateSubGraph <SystemLogicNode>(group.runtimeSystem.allSystems, "AdvanceTick", WorldStep.LogicTick)), group.runtimeSystem.allSystems); } var endTick = graph.AddNode(systemsLogicContainer, new EndTickNode(null)); var pluginsLogicSimulateContainer = graph.AddNode(endTick, new PluginsLogicSimulateContainer(null), "SimulatePluginsForTicks"); Node systemsVisualContainer = pluginsLogicSimulateContainer; for (int i = 0; i < systems.Length; ++i) { var group = systems.arr[i]; if (group.runtimeSystem.allSystems == null || group.runtimeSystem.allSystems.Count == 0) { continue; } systemsVisualContainer = graph.AddNode(systemsVisualContainer, new SystemsVisualContainer(group.name, this.CreateSubGraph <SystemVisualNode>(group.runtimeSystem.allSystems, "Update", WorldStep.VisualTick)), group.runtimeSystem.allSystems); } graph.AddNode(systemsVisualContainer, new RemoveMarkersNode(null), "RemoveMarkers"); return(graph); }
public IList <ME.ECS.ISystemBase> GetSystems() { return(WorldHelper.GetSystems(this.world)); }
public ME.ECS.Collections.BufferArray <SystemGroup> GetSystems() { return(WorldHelper.GetSystems(this.world)); }