diff --git a/Svelto.ECS/Sequencer.cs b/Svelto.ECS/Sequencer.cs index b8e7398..76bce9a 100644 --- a/Svelto.ECS/Sequencer.cs +++ b/Svelto.ECS/Sequencer.cs @@ -10,18 +10,22 @@ namespace Svelto.ECS { public void Add(IStep engine) { - Add(Condition.always, new [] {engine}); + Add(Condition.Always, new [] {engine}); + } + public void Add(IStep[] engines) + { + Add(Condition.Always, engines); } } public interface IStep - { } + {} public interface IStep:IStep { void Step(ref T token, int condition); } - + public interface ISequencer { void Next(IEngine engine, ref T param); @@ -38,23 +42,24 @@ namespace Svelto.ECS public void Next(IEngine engine, ref T param) { - Next(engine, ref param, Condition.always); + Next(engine, ref param, Condition.Always); } public void Next(IEngine engine, ref T param, int condition) { - var steps = _steps[engine][condition]; + int branch = condition; + var steps = _steps[engine][branch]; if (steps != null) for (int i = 0; i < steps.Length; i++) ((IStep)steps[i]).Step(ref param, condition); } - Steps _steps; + Steps _steps; } public static class Condition { - public const int always = 0; + public const int Always = 0; } } \ No newline at end of file