Changeset 4512 for 2013


Ignore:
Timestamp:
2013-07-22 14:19:57 (6 years ago)
Author:
dezhidki
Message:

Talletus.

Location:
2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster
Files:
9 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/CastleMaster.csproj

    r4508 r4512  
    7474  </ItemGroup> 
    7575  <ItemGroup> 
     76    <Compile Include="Graphics\Camera.cs" /> 
     77    <Compile Include="Graphics\RenderHelper.cs" /> 
     78    <Compile Include="Graphics\Resources.cs" /> 
     79    <Compile Include="Graphics\SpriteSheet.cs" /> 
     80    <Compile Include="Graphics\Viewport.cs" /> 
    7681    <Compile Include="Input\InputHandler.cs" /> 
    7782    <Compile Include="Properties\AssemblyInfo.cs" /> 
    7883    <Compile Include="Program.cs" /> 
    7984    <Compile Include="Game.cs" /> 
     85    <Compile Include="World\Level.cs" /> 
     86    <Compile Include="World\Tiles\Tile.cs" /> 
     87    <Compile Include="World\Tiles\TileFloor.cs" /> 
    8088  </ItemGroup> 
    8189  <ItemGroup> 
  • 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/Game.cs

    r4508 r4512  
    1313using Keys = System.Windows.Forms.Keys; 
    1414using System.Text; 
     15using CastleMaster.Graphics; 
     16using CastleMaster.World; 
    1517 
    1618namespace CastleMaster 
     
    3133        private SpriteBatch spriteBatch; 
    3234        private InputHandler input; 
     35        private RenderHelper renderer; 
     36        private Camera camera; 
     37        private Level level; 
    3338         
    3439        #region Counter 
     
    7782        { 
    7883            spriteBatch = new SpriteBatch(GraphicsDevice); 
     84            renderer = new RenderHelper(spriteBatch); 
     85 
     86            Resources.LoadResources(Content, renderer); 
    7987        } 
    8088 
     
    92100            base.BeginRun(); 
    93101 
    94  
     102            camera = new Camera(); 
     103            level = new Level(128, 128); 
    95104        } 
    96105 
     
    103112        { 
    104113            input.Update(); 
     114            camera.Update(); 
    105115 
    106             if (InputHandler.IsKeyDown(Keys.Escape)) 
     116            if (InputHandler.HasKeyBeenPressed(Keys.Escape)) 
    107117                this.Exit(); 
    108118 
     
    127137            GraphicsDevice.Clear(Color.Black); 
    128138 
     139            renderer.BeginRender(); 
     140 
     141            level.RenderBackground(camera, renderer); 
     142             
     143            renderer.EndRender(); 
    129144 
    130145            frames++; 
Note: See TracChangeset for help on using the changeset viewer.