예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InputManager"/> class.
 /// </summary>
 /// <param name="parentGame">The parent game.</param>
 public InputManager(BaseGame parentGame)
     : base(parentGame)
 {
     this.inputState            = new InputState();
     this.globalInputBindingSet = new InputBindingSet();
     this.childInputBindingSets = new ThrottledCollection <List <InputBindingSet>, InputBindingSet>(new List <InputBindingSet>());
     this.childInputBindingSets.Add(globalInputBindingSet);
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeferredRenderSystem"/> class.
 /// </summary>
 /// <param name="parentGame">The <see cref="BaseGame"/> instance that is instantiating this renderer.</param>
 /// <param name="gameWorld">The <see cref="World"/> instance that contains the scene to be rendered.</param>
 /// <param name="gameCamera">The <see cref="Camera"/> instance that describes the perspective from which to render.</param>
 internal DeferredRenderSystem(BaseGame parentGame, World gameWorld, Camera gameCamera)
     : base(parentGame)
 {
     this.gameWorld                   = gameWorld;
     this.gameCamera                  = gameCamera;
     this.postProcessingEffects       = new ThrottledCollection <SortedSet <IPostProcess>, IPostProcess>(new SortedSet <IPostProcess>());
     this.simulatedPostProcessEffects = new ThrottledCollection <QuadTree <SimulatedPostProcess, List <SimulatedPostProcess> >, SimulatedPostProcess>(new QuadTree <SimulatedPostProcess, List <SimulatedPostProcess> >(this.gameWorld.Bounds, 4));
     this.mergeRenderTargets          = new MergeTargetsShader();
     this.disablePostProcesses        = false;
     this.parentGame                  = parentGame;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="World"/> class.
 /// </summary>
 /// <param name="parentGame">The Game in which the instance lives.</param>
 /// <param name="worldPerPixelRatio">The number of world units for each pixel.</param>
 /// <param name="gravity">The gravity that will be applied to world objects.</param>
 /// <param name="bounds">The world's bounds.</param>
 internal World(BaseGame parentGame, RectangleF bounds, float worldPerPixelRatio, Vector2 gravity)
     : base(parentGame)
 {
     this.Bounds                   = bounds;
     this.worldSpriteObjects       = new ThrottledCollection <QuadTree <SpriteBase, List <SpriteBase> >, SpriteBase>(new QuadTree <SpriteBase, List <SpriteBase> >(bounds, 4));
     this.worldSimObjects          = new ThrottledCollection <SortedSet <SimBase>, SimBase>(new SortedSet <SimBase>());
     this.screenDrawableComponents = new ThrottledCollection <SortedSet <ScreenDrawableComponent>, ScreenDrawableComponent>(new SortedSet <ScreenDrawableComponent>());
     this.physicsWorld             = new FarseerPhysics.Dynamics.World(gravity);
     this.worldPerPixelRatio       = worldPerPixelRatio;
     this.parentGame               = parentGame;
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InputBindingSet"/> class.
 /// </summary>
 public InputBindingSet()
 {
     this.inputBindings = new ThrottledCollection <List <ConditionalInputBinding>, ConditionalInputBinding>(new List <ConditionalInputBinding>());
 }