- Timestamp:
- 2015-06-15 00:25:16 (8 years ago)
- 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 252 252 { 253 253 IsMouseVisible = true; 254 //SetWindowSize(1024, 768);254 SetWindowSize(1024, 768); 255 255 ansaKuvat = new Image[] {piikkiAnsaKuvat[0], murskausAnsaKuvat[0]}; 256 256 menu = new MainMenu(this, "New game", "Highscores", "Help", "Quit"); -
2015/24/ohjaajat/Dungeon/Dungeon/Dungeon/MainMenu.cs
r6086 r6087 16 16 private Image ratasKuva = Game.LoadImage("ratas"); 17 17 private Image palaKuva = Game.LoadImage("pala"); 18 private Image aukkoPohjaKuva = Game.LoadImage("aukko"); 19 private Image aukkoKuva = Game.LoadImage("aukko2"); 18 20 19 21 private GameObject pala; // Putoava palkki. 20 22 private GameObject ratas; // Palkin vieressä pyörivä ratas. 23 private GameObject pohjaAukko; // Aukko josta tulee ulos barbaareja. 21 24 22 25 private const double Gravitaatio = -600.0; … … 60 63 { 61 64 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); 64 68 barbaari.Image = peli.vihuKuvat[0]; 65 69 barbaari.Animation = new Animation(peli.vihuKuvat) { FPS = 10 }; … … 76 80 pala.Image = palaKuva; 77 81 pala.TextureWrapSize = new Vector(1, toistoja); 78 peli.Add(pala );82 peli.Add(pala, 2); 79 83 80 84 ratas = new GameObject(130, 130); 81 85 ratas.Image = ratasKuva; 82 86 ratas.Position = pala.Position + new Vector(60, 0); 83 peli.Add(ratas );87 peli.Add(ratas, 2); 84 88 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); 86 103 } 87 104 -
2015/24/ohjaajat/Dungeon/Dungeon/DungeonContent/DungeonContent.contentproj
r6084 r6087 254 254 </Compile> 255 255 </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> 256 268 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 257 269 <!-- 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.