} // Priority of the System. /// <summary> /// Create the System with the World as owning world. /// </summary> /// <param name="world">System's owner SubWorld.</param> public GameSystem(SubWorld world) { // Set up attributes. Priority = 1; World = world; BreakWorld = (BreakoutWorld)world; }
// 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); }
// 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); }
// Create player system. private PlayerSystem CreateSystem() { SubWorld world = new BreakoutWorld(0); return(new PlayerSystem(world)); }