public SystemParallelPipeline(TSystem[] systems) { _systems = systems; _update = ECSUtils.BuildSystemUpdateMethod <TSystem>(); _buffer = new Task[systems.Length]; }
public void TryRegister(DependencyCollection collection, Type implementation) { if (ECSUtils.TryGetImplementedSystemInterfaces(implementation, out var contracts)) { collection.AddDependency(contracts, implementation, _lifetime); } }
public static DependencyCollection AddSystem <TSystem>( this DependencyCollection dependencies, DependencyLifetime lifetime = DependencyLifetime.Singleton) { var implementation = typeof(TSystem); if (!ECSUtils.TryGetImplementedSystemInterfaces(implementation, out var contracts)) { throw Error.InvalidOperation( $"Type '{ReflectionUtils.GetName<TSystem>()}' isn't implemented system interfaces"); } dependencies.AddDependency(contracts, implementation, lifetime); return(dependencies); }
// Use this for initialization void Start() { if (Instance == null) { Destroy(Instance); } Instance = this; if (L == null) { L = new XLua.LuaEnv(); L.DoString("require ('Main')"); L.DoString("OnStart()"); } ECSUtils.Setup(); }
public SystemSequentialPipeline(TSystem[] systems) { _systems = systems; _update = ECSUtils.BuildSystemUpdateMethod <TSystem>(); }
public SystemSinglePipeline(TSystem system) { _system = system; _update = ECSUtils.BuildSystemUpdateMethod <TSystem>(); }