diff --git a/Svelto.ECS/Context/Factories/GameObjectFactory.cs b/Svelto.ECS/Context/Factories/GameObjectFactory.cs
index ecd3350..9b73f0a 100644
--- a/Svelto.ECS/Context/Factories/GameObjectFactory.cs
+++ b/Svelto.ECS/Context/Factories/GameObjectFactory.cs
@@ -39,17 +39,17 @@ namespace Svelto.Context
return go;
}
- ///
- /// Register a prefab to be built later using a string ID.
- ///
- /// original prefab
- virtual public GameObject Build(GameObject prefab)
+ public virtual GameObject Build(GameObject prefab)
{
var copy = Object.Instantiate(prefab) as GameObject;
return copy;
}
+ ///
+ /// Register a prefab to be built later using a string ID.
+ ///
+ /// original prefab
public void RegisterPrefab(GameObject prefab, string prefabName, GameObject parent = null)
{
var objects = new GameObject[2];
diff --git a/Svelto.ECS/ECS/Sequencer.cs b/Svelto.ECS/ECS/Sequencer.cs
index c554429..52fad56 100644
--- a/Svelto.ECS/ECS/Sequencer.cs
+++ b/Svelto.ECS/ECS/Sequencer.cs
@@ -1,14 +1,25 @@
using System;
-using Steps = System.Collections.Generic.Dictionary>;
+using System.Collections.Generic;
namespace Svelto.ECS
{
+ public class Steps : Dictionary>
+ {}
+
+ public class To : Dictionary
+ {
+ public void Add(IStep engine)
+ {
+ Add(Condition.always, new [] {engine});
+ }
+ }
+
public interface IStep
{ }
public interface IStep:IStep
{
- void Step(ref T token, Enum condition);
+ void Step(ref T token, int condition);
}
public class Sequencer
@@ -23,7 +34,7 @@ namespace Svelto.ECS
Next(engine, ref param, Condition.always);
}
- public void Next(IEngine engine, ref T param, Enum condition)
+ public void Next(IEngine engine, ref T param, int condition)
{
var tos = _steps[engine];
var steps = tos[condition];
@@ -37,8 +48,8 @@ namespace Svelto.ECS
}
//you can inherit from Condition and add yours
- public enum Condition
+ public class Condition
{
- always
+ public const int always = 0;
}
}
\ No newline at end of file