public Engine(Windowing.IWindowProvider windowProvider, SharpFileSystem.IFileSystem fileSystem) { WindowProvider = windowProvider; // Initialize file system and resource manager FileSystem = new Common.IO.FileSystem(fileSystem); ResourceGroupManager = new Common.ResourceGroupManager(FileSystem); CoreResources = ResourceGroupManager.Add("core", 100); GameResources = ResourceGroupManager.Add("game", 10); // Setup graphics core GraphicsBackend = new Graphics.Backend(CoreResources, WindowProvider.Width, WindowProvider.Height, WindowProvider.WindowInfo); // Init resource loaders RegisterResourceLoaders(CoreResources); RegisterResourceLoaders(GameResources); // High level renderer (deferred + hdr) Renderer = new RendererImplementation(FileSystem, CoreResources, GraphicsBackend); // The input stuff InputManager = new Input.InputManager(WindowProvider.Bounds); // Setup game world GameWorld = new GameWorld(GameResources, GraphicsBackend); }
public GameObjectManager(Stage stage, InputManager inputManager, ResourceManager resourceManager, Triton.Physics.World physicsWorld, Graphics.Camera camera) { if (stage == null) throw new ArgumentNullException("stage"); if (inputManager == null) throw new ArgumentNullException("inputManager"); if (resourceManager == null) throw new ArgumentNullException("resourceManager"); if (physicsWorld == null) throw new ArgumentNullException("physicsWorld"); if (camera == null) throw new ArgumentNullException("camera"); Stage = stage; InputManager = inputManager; ResourceManager = resourceManager; PhysicsWorld = physicsWorld; Camera = camera; }