Changeset 4589 for 2013/27


Ignore:
Timestamp:
2013-07-23 15:50:47 (6 years ago)
Author:
janiemit
Message:
 
Location:
2013/27/TeemuM
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2013/27/TeemuM/Game/Game/Game/Game.cs

    r4529 r4589  
    1717 
    1818    public static G game; 
     19    Image Background = LoadImage("Ground0"); 
    1920    private IntMeter scoreboard; 
    2021    public Player player { get; private set; } 
     
    186187        Keyboard.Listen(Key.Tab, ButtonState.Pressed, DeveloperCommand, null); 
    187188 
     189        Map(); 
    188190        player = new Player(this, 50, 50, 10, true); 
    189191        player.Dying += GameOver; 
    190192        Add(player); 
    191         Camera.Follow(player); 
     193        //Camera.Follow(player); 
    192194 
    193195        AddScoreMeter(); 
     
    297299    } 
    298300 
     301    public void Map() 
     302    {     
     303        Level.Width = Screen.Width; 
     304        Level.Height = Screen.Height; 
     305 
     306        Surfaces levelBorders = Level.CreateBorders(10, 10, 10); 
     307        levelBorders.Bottom.Color = Color.Aqua; 
     308        levelBorders.Bottom.IgnoresCollisionResponse = true; 
     309        levelBorders.Top.Color = Color.Aqua; 
     310        levelBorders.Top.IgnoresCollisionResponse = true; 
     311        levelBorders.Left.Color = Color.Aqua; 
     312        levelBorders.Left.IgnoresCollisionResponse = true; 
     313        levelBorders.Right.Color = Color.Aqua; 
     314        levelBorders.Right.IgnoresCollisionResponse = true; 
     315         
     316 
     317        Level.Background.Image = Background; 
     318        Level.Background.TileToLevel(); 
     319        Camera.ZoomToLevel(); 
     320    } 
     321 
    299322    void CreateLifeMeter() 
    300323    { 
     
    315338        GameObject layer = new GameObject(Game.Screen.Width + 100, Game.Screen.Height + 100); 
    316339        layer.Color = Color.Transparent; 
    317         layer.Position = player.Position; 
     340        layer.Position = Screen.Center; 
    318341        Add(layer, 1); 
    319342        layer.FadeColorTo(Color.Lerp(Color.Transparent, Color.Black, 0.8), 1.0); 
    320343 
    321344        GameObject txt = new GameObject(987, 248); 
    322         txt.Position = player.Position; 
     345        txt.Position = Level.Center; 
    323346        txt.Image = LoadImage("GameOverImage"); 
    324347        Add(txt, 1); 
    325348 
    326349        PushButton r = new PushButton("Return to menu"); 
    327         r.X = player.X; 
    328         r.Y = player.Y - Screen.Height / 4; 
     350        r.X = Level.Center.X; 
     351        r.Y = Level.Center.Y - Screen.Height / 4; 
    329352        r.Clicked += delegate() {  MainMenu(); }; 
    330353        Add(r, 1); 
  • 2013/27/TeemuM/Game/Game/Game/Game.csproj.Debug.cachefile

    r4484 r4589  
    44Content\Zombie3.xnb 
    55Content\Zombie4.xnb 
     6Content\transparent.xnb 
     7Content\GameOverImage.xnb 
     8Content\Ground0.xnb 
    69Content\Background0.xnb 
    710Content\Background1.xnb 
     
    1013Content\Background4.xnb 
    1114Content\Enemyspawn0.xnb 
     15Content\GameOverSound0.xnb 
    1216Content\MenuMusic0.xnb 
    1317Content\Randomsound0.xnb 
     18Content\EasterEgg.xnb 
    1419Content\Zombiebite0.xnb 
    1520Content\Zombiesound0.xnb 
    1621Content\Zombiesound1.xnb 
    1722Content\Zombiesound2.xnb 
    18 Content\transparent.xnb 
    19 Content\EasterEgg.xnb 
    20 Content\transparent.xnb 
    21 Content\GameOverSound0.xnb 
    22 Content\GameOverImage.xnb 
     23Content\Slime.xnb 
     24Content\Slime2.xnb 
     25Content\Slime3.xnb 
     26Content\Slime4.xnb 
    2327Content\Background0.wma 
    2428Content\Background1.wma 
     
    2731Content\Background4.wma 
    2832Content\Enemyspawn0.wma 
     33Content\GameOverSound0.wma 
    2934Content\MenuMusic0.wma 
    3035Content\Randomsound0.wma 
     36Content\EasterEgg.wma 
    3137Content\Zombiebite0.wma 
    3238Content\Zombiesound0.wma 
    3339Content\Zombiesound1.wma 
    3440Content\Zombiesound2.wma 
    35 Content\EasterEgg.wma 
    36 Content\GameOverSound0.wma 
  • 2013/27/TeemuM/Game/Game/GameContent/GameContent.contentproj

    r4484 r4589  
    160160    </Compile> 
    161161  </ItemGroup> 
     162  <ItemGroup> 
     163    <Compile Include="Slime.png"> 
     164      <Name>Slime</Name> 
     165      <Importer>TextureImporter</Importer> 
     166      <Processor>TextureProcessor</Processor> 
     167    </Compile> 
     168    <Compile Include="Slime2.png"> 
     169      <Name>Slime2</Name> 
     170      <Importer>TextureImporter</Importer> 
     171      <Processor>TextureProcessor</Processor> 
     172    </Compile> 
     173    <Compile Include="Slime3.png"> 
     174      <Name>Slime3</Name> 
     175      <Importer>TextureImporter</Importer> 
     176      <Processor>TextureProcessor</Processor> 
     177    </Compile> 
     178    <Compile Include="Slime4.png"> 
     179      <Name>Slime4</Name> 
     180      <Importer>TextureImporter</Importer> 
     181      <Processor>TextureProcessor</Processor> 
     182    </Compile> 
     183  </ItemGroup> 
     184  <ItemGroup> 
     185    <Compile Include="Ground0.jpg"> 
     186      <Name>Ground0</Name> 
     187      <Importer>TextureImporter</Importer> 
     188      <Processor>TextureProcessor</Processor> 
     189    </Compile> 
     190  </ItemGroup> 
    162191  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    163192  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
Note: See TracChangeset for help on using the changeset viewer.