// Create player system and accompanying components.
        private BallSystem CreateSystem()
        {
            SubWorld       world          = new BreakoutWorld(0);
            BallSystem     ballSystem     = new BallSystem(world);
            ColliderSystem colliderSystem = new ColliderSystem(world);

            world.AddSystem(new PowerUpSystem(world));
            world.AddSystem(colliderSystem);
            world.AddSystem(ballSystem);

            return(ballSystem);
        }
Beispiel #2
0
        // Create brick system and accompanying components.
        public BrickSystem CreateBrickSystem()
        {
            BreakoutWorld world = new BreakoutWorld(0);

            world.AddSystem(new ColliderSystem(world));

            BrickSystem brickSystem = new BrickSystem(world);

            world.AddSystem(brickSystem);

            return(brickSystem);
        }