protected AMainMenuPage(ContentManager content, GraphicsDeviceManager graphics, Camera camera, AButton[] buttons) : base(buttons)
 {
     if (content == null || graphics == null || camera == null)
     {
         mGroundPlaneRenderer = null;
         mCamera = null;
         return;
     }
     mGroundPlaneRenderer = new PlaneRenderer(graphics, camera, new BasicEffect(graphics.GraphicsDevice)
     {
         TextureEnabled = true,
         Texture        = content.Load <Texture2D>("textures/ground_sand")
     });
     mGroundPlaneRenderer.InitializePlane(GameScreen.GridSize * 50, 0, GameScreen.GridSize * 50, 50, 50);
     mCamera           = camera;
     mOriginalPosition = camera.Position;
 }
Beispiel #2
0
 internal void SetMapSize(int sizeX, int sizeZ)
 {
     mGroundPlaneRenderer.InitializePlane(sizeX, 0, sizeZ, (float)sizeX / GridSize, (float)sizeZ / GridSize);
     mHeroEffectPlaneRenderer.InitializePlane(1, 0.05f, 1);
     mCamera.SetClippingSize();
 }