Changeset 6087 for 2015/24


Ignore:
Timestamp:
2015-06-15 00:25:16 (8 years ago)
Author:
sieerinn
Message:

Alkuvalikkoon reikä.

Location:
2015/24/ohjaajat/Dungeon/Dungeon
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2015/24/ohjaajat/Dungeon/Dungeon/Dungeon/Dungeon.cs

    r6085 r6087  
    252252    { 
    253253        IsMouseVisible = true; 
    254         //SetWindowSize(1024, 768); 
     254        SetWindowSize(1024, 768); 
    255255        ansaKuvat = new Image[] {piikkiAnsaKuvat[0], murskausAnsaKuvat[0]}; 
    256256        menu = new MainMenu(this, "New game", "Highscores", "Help", "Quit"); 
  • 2015/24/ohjaajat/Dungeon/Dungeon/Dungeon/MainMenu.cs

    r6086 r6087  
    1616    private Image ratasKuva = Game.LoadImage("ratas"); 
    1717    private Image palaKuva = Game.LoadImage("pala"); 
     18    private Image aukkoPohjaKuva = Game.LoadImage("aukko"); 
     19    private Image aukkoKuva = Game.LoadImage("aukko2"); 
    1820 
    1921    private GameObject pala; // Putoava palkki. 
    2022    private GameObject ratas; // Palkin vieressä pyörivä ratas. 
     23    private GameObject pohjaAukko; // Aukko josta tulee ulos barbaareja. 
    2124 
    2225    private const double Gravitaatio = -600.0; 
     
    6063    { 
    6164        var barbaari = new GameObject(64, 64); 
    62         barbaari.Right = peli.Camera.ScreenToWorld(new Vector(Game.Screen.Left, 0)).X; 
    63         barbaari.Bottom = peli.Camera.ScreenToWorld(new Vector(0, Game.Screen.Bottom)).Y + RandomGen.NextDouble(0, 32); 
     65        //barbaari.Right = peli.Camera.ScreenToWorld(new Vector(Game.Screen.Left, 0)).X; 
     66        barbaari.X = pohjaAukko.X - pohjaAukko.Width/3; 
     67        barbaari.Bottom = peli.Camera.ScreenToWorld(new Vector(0, Game.Screen.Bottom)).Y; // + RandomGen.NextDouble(0, 32); 
    6468        barbaari.Image = peli.vihuKuvat[0]; 
    6569        barbaari.Animation = new Animation(peli.vihuKuvat) { FPS = 10 }; 
     
    7680        pala.Image = palaKuva; 
    7781        pala.TextureWrapSize = new Vector(1, toistoja); 
    78         peli.Add(pala); 
     82        peli.Add(pala, 2); 
    7983 
    8084        ratas = new GameObject(130, 130); 
    8185        ratas.Image = ratasKuva; 
    8286        ratas.Position = pala.Position + new Vector(60, 0); 
    83         peli.Add(ratas); 
     87        peli.Add(ratas, 2); 
    8488 
    85         pala.Bottom = Game.Screen.Top; 
     89        pala.Bottom = Game.Screen.Top; // Pala putoaa ikkunan yläreunasta. 
     90 
     91        // Aukon pohjavalo. 
     92        pohjaAukko = new GameObject(200, 100); 
     93        pohjaAukko.Image = aukkoPohjaKuva; 
     94        pohjaAukko.Left = peli.Camera.ScreenToWorld(new Vector(Game.Screen.Left, 0)).X; 
     95        pohjaAukko.Bottom = peli.Camera.ScreenToWorld(new Vector(0, Game.Screen.Bottom)).Y; 
     96        peli.Add(pohjaAukko, -1); 
     97 
     98        // Päällä näkyvä osittain väpinäkyvä valo. 
     99        var aukkoValo = new GameObject(pohjaAukko.Width, pohjaAukko.Height); 
     100        aukkoValo.Image = aukkoKuva; 
     101        aukkoValo.Position = pohjaAukko.Position; 
     102        peli.Add(aukkoValo, 1); 
    86103    } 
    87104 
  • 2015/24/ohjaajat/Dungeon/Dungeon/DungeonContent/DungeonContent.contentproj

    r6084 r6087  
    254254    </Compile> 
    255255  </ItemGroup> 
     256  <ItemGroup> 
     257    <Compile Include="aukko.png"> 
     258      <Name>aukko</Name> 
     259      <Importer>TextureImporter</Importer> 
     260      <Processor>TextureProcessor</Processor> 
     261    </Compile> 
     262    <Compile Include="aukko2.png"> 
     263      <Name>aukko2</Name> 
     264      <Importer>TextureImporter</Importer> 
     265      <Processor>TextureProcessor</Processor> 
     266    </Compile> 
     267  </ItemGroup> 
    256268  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    257269  <!--  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.