Ejemplo n.º 1
0
        public override void Update(GameTime gameTime)
        {
            foreach (MapLayer ActiveMapLayer in ListLayer)
            {
                ActiveMapLayer.Update(gameTime);
            }

            LayerHolderDrawable.Update(gameTime);

            if ((KeyboardHelper.KeyHold(Keys.LeftControl) || KeyboardHelper.KeyHold(Keys.RightControl)) && KeyboardHelper.KeyPressed(Keys.K))
            {
                LayerHolderDrawable = new Map3DDrawable(Map, GameScreen.GraphicsDevice);
            }
            if ((KeyboardHelper.KeyHold(Keys.LeftControl) || KeyboardHelper.KeyHold(Keys.RightControl)) && KeyboardHelper.KeyPressed(Keys.L))
            {
                //ListLayer[0].LayerGrid = new CubeMap3D(Map, 0, ListLayer[0], GameScreen.GraphicsDevice);
            }
            if ((KeyboardHelper.KeyHold(Keys.LeftControl) || KeyboardHelper.KeyHold(Keys.RightControl)) && KeyboardHelper.KeyPressed(Keys.O))
            {
                //ListLayer[0].LayerGrid = new SphericalMap3D(Map, 0, ListLayer[0], GameScreen.GraphicsDevice);
            }
            if ((KeyboardHelper.KeyHold(Keys.LeftControl) || KeyboardHelper.KeyHold(Keys.RightControl)) && KeyboardHelper.KeyPressed(Keys.U))
            {
                LayerHolderDrawable = new DeathmatchMap2DHolder(Map);
            }
        }
Ejemplo n.º 2
0
 public override void TogglePreview(bool UsePreview)
 {
     if (!UsePreview)
     {
         LayerHolderDrawable = new DeathmatchMap2DHolder(Map);
     }
     else if (Map.ListTileSet.Count > 0)
     {
         LayerHolderDrawable = new Map3DDrawable(Map, GameScreen.GraphicsDevice);
     }
 }
Ejemplo n.º 3
0
        public LayerHolderDeathmatch(DeathmatchMap Map, BinaryReader BR)
        {
            this.Map = Map;
            int LayerCount = BR.ReadInt32();

            ListLayer = new List <MapLayer>(LayerCount);

            for (int i = 0; i < LayerCount; ++i)
            {
                ListLayer.Add(new MapLayer(Map, BR));
            }

            LayerHolderDrawable = new DeathmatchMap2DHolder(Map);
        }