Example #1
0
        private void CreateSystems()
        {
            SystemManager systemManager = SystemManager.Instance();

            Game_Engine.Systems.System newSystem;

            newSystem = new SystemRender(entityCamera);
            systemManager.AddRenderSystem(newSystem);

            newSystem = new SystemRender(mapCamera);
            systemManager.AddRenderSystem(newSystem);

            newSystem = new SystemInput();
            systemManager.AddUpdateSystem(newSystem);

            newSystem = new SystemPhysics();
            systemManager.AddUpdateSystem(newSystem);

            newSystem = new SystemCollision();
            systemManager.AddUpdateSystem(newSystem);

            newSystem       = new SystemArtificialInput(map);
            artificialInput = (SystemArtificialInput)newSystem;
            systemManager.AddUpdateSystem(newSystem);

            newSystem = new SystemAnimation();
            systemManager.AddUpdateSystem(newSystem);

            newSystem = new SystemAudio();
            systemManager.AddUpdateSystem(newSystem);
        }
Example #2
0
        private void CreateSystems()
        {
            ISystem newSystem;

            //--update
            newSystem = new SystemAudio();
            systemManager.AddUpdateSystem(newSystem);

            newSystem = new SystemLinearMovement();
            systemManager.AddUpdateSystem(newSystem);

            newSystem = new SystemAudio();
            systemManager.AddUpdateSystem(newSystem);

            newSystem = new SystemGhostAI(entityManager);
            systemManager.AddUpdateSystem(newSystem);

            newSystem = new SystemPlayerControl(sceneManager);
            systemManager.AddUpdateSystem(newSystem);

            //--collision
            newSystem = new SystemCollisionDetection();
            systemManager.AddCollisionSystem((SystemCollisionDetection)newSystem);
            newSystem = new SystemCollisionResponse(entityManager);
            systemManager.AddResponseSystem((ISystemCollisionResponse)newSystem);

            //--render
            newSystem = new SystemRender();
            systemManager.AddRenderSystem(newSystem);

            //--final
            newSystem = new SystemMovement();
            systemManager.AddFinalSystem(newSystem);
        }
        private void CreateSystems()
        {
            ISystem newSystem;

            //Render Systems
            newSystem = new SystemRender(cameraList, lightPosition, sceneManager.ClientRectangle);
            systemManager.AddRenderSystem(newSystem);

            //Update Systems
            newSystem = new SystemAudio(mainCamera);
            systemManager.AddUpdateSystem(newSystem);
            newSystem = new SystemAI(map, Maze.rows, Maze.columns, player);
            systemManager.AddUpdateSystem(newSystem);
            newSystem = new SystemSphereCollision();
            systemManager.AddUpdateSystem(newSystem);
            newSystem = new SystemBoxCollision();
            systemManager.AddUpdateSystem(newSystem);
            newSystem = new SystemAIMovement(sceneManager);
            systemManager.AddUpdateSystem(newSystem);
            newSystem = new SystemMovement(sceneManager);
            systemManager.AddUpdateSystem(newSystem);

            //Assigns entities to appropriate systems
            systemManager.AssignEntities(entityManager);
        }