Exemplo n.º 1
0
        void CompositionRoot <T>()
        {
            var unityEntitySubmissionScheduler = new UnityEntitiesSubmissionScheduler("oop-abstraction");

            _enginesRoot = new EnginesRoot(unityEntitySubmissionScheduler);

            var moveCubesEngine    = new MoveCubesEngine();
            var moveSpheresEngine  = new MoveSpheresEngine();
            var selectParentEngine = new SelectNewParentEngine();

            var listOfEnginesToTick = new FasterList <IStepEngine>(new IStepEngine[]
            {
                moveCubesEngine
                , moveSpheresEngine
                , selectParentEngine
            });
            var tickingEnginesGroup = new TickingEnginesGroup(listOfEnginesToTick);

            _enginesRoot.AddEngine(tickingEnginesGroup);
            _enginesRoot.AddEngine(moveCubesEngine);
            _enginesRoot.AddEngine(moveSpheresEngine);
            _enginesRoot.AddEngine(selectParentEngine);

            OOPManagerCompositionRoot.Compose(_enginesRoot, listOfEnginesToTick, NUMBER_OF_SPHERES);
        }
Exemplo n.º 2
0
        void CompositionRoot()
        {
            var unityEntitySubmissionScheduler = new UnityEntitiesSubmissionScheduler("oop-abstraction");

            _enginesRoot = new EnginesRoot(unityEntitySubmissionScheduler);

            CreateStartupEntities();

            var moveCubesEngine    = new MoveCubesEngine();
            var moveSpheresEngine  = new MoveSpheresEngine();
            var selectParentEngine = new SelectNewParentEngine();

            var tickingEnginesGroup = new TickingEnginesGroup(
                new FasterList <IStepEngine>(new IStepEngine[]
            {
                moveCubesEngine, moveSpheresEngine, selectParentEngine
            }));

            _enginesRoot.AddEngine(tickingEnginesGroup);
            _enginesRoot.AddEngine(moveCubesEngine);
            _enginesRoot.AddEngine(moveSpheresEngine);
            _enginesRoot.AddEngine(selectParentEngine);
        }