Beispiel #1
0
        public FearEngineImpl CreateAndRunFearGame(FearGame game)
        {
            FearEngineImpl engine = new FearEngineImpl(game, game.GetType().Name);

            GraphicsDeviceManager graphicsMan = new GraphicsDeviceManager(engine);

            engine.SetupDeviceManager(graphicsMan);

            engine.Initialised += new EngineInitialisedHandler(OnEngineInitialised);
            engine.Run();

            return(engine);
        }
Beispiel #2
0
        public void OnEngineInitialised(FearEngineImpl engine)
        {
            engine.Initialised -= new EngineInitialisedHandler(OnEngineInitialised);

            StandardKernel kernel = new StandardKernel(new FearEngineNinjectModule(engine.Device,
                                                                                   new MouseManager(engine),
                                                                                   new KeyboardManager(engine)));

            engine.InjectDependencies(kernel.Get <FearResourceManager>(),
                                      kernel.Get <Input>(),
                                      kernel.Get <GameObjectFactory>(),
                                      kernel.Get <UpdateableFactory>(),
                                      kernel.Get <SceneFactory>(),
                                      kernel.Get <LightFactory>(),
                                      kernel.Get <CameraFactory>());
        }
Beispiel #3
0
 public void Startup(FearEngine.FearEngineImpl engine)
 {
     fearEngine = engine;
 }