- Timestamp:
- 2015-06-24 20:27:27 (6 years ago)
- Location:
- 2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs
r6287 r6288 122 122 123 123 # region Images 124 private Image[] groundImages = LoadImages("ground" ); //Näitä ei tosin kaikkia kenties jaksa tehdä erilaisiksi levelistä riippuen125 private Image[] groundTopImages = LoadImages("ground_top" );126 private Image[] foregroundDecorations = LoadImages("viljaa" );127 private Image[] blockImages = LoadImages("box2" );124 private Image[] groundImages = LoadImages("ground", "ground"); //Näitä ei tosin kaikkia kenties jaksa tehdä erilaisiksi levelistä riippuen 125 private Image[] groundTopImages = LoadImages("ground_top", "ground_top"); 126 private Image[] foregroundDecorations = LoadImages("viljaa", "grass"); 127 private Image[] blockImages = LoadImages("box2", "box"); 128 128 129 129 private Image[] houseImages = LoadImages("house", "houseburned"); … … 162 162 public override void Begin() 163 163 { 164 Initializing(); 164 165 //IntroSequence(); 165 166 //MainMenu(); … … 287 288 void StartGame() 288 289 { 289 Initializing();290 ClearAll(); 290 291 CreateLevel(); 291 292 ScreenSettings(); 293 SetControls(); 294 } 295 296 public void NextLevel() 297 { 298 levelNumber++; 299 StartGame(); 292 300 } 293 301 … … 326 334 cameraTimer.Start(); 327 335 328 329 336 //Background 330 337 GameObject forestBackground = new GameObject(Level.Width, Level.Height); … … 339 346 void CreateLevel() 340 347 { 348 startingPlayers.Clear(); 349 players.Clear(); 341 350 Gravity = new Vector(0, -1000); 342 351 … … 360 369 level.Optimize(Color.Black, Color.Brown); 361 370 level.Execute(TILE_SIZE, TILE_SIZE); 362 363 SetControls();364 371 } 365 372 … … 671 678 Keyboard.Listen(Key.RightShift, ButtonState.Pressed, UseImprovement, "Player 2 uses their tools", startingPlayers[1]); 672 679 680 Keyboard.Listen(Key.F12, ButtonState.Pressed, NextLevel, null); 681 673 682 Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Show help"); 674 683 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Exit game"); -
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRunContent/HillbillyRunContent.contentproj
r6284 r6288 233 233 </Compile> 234 234 </ItemGroup> 235 <ItemGroup> 236 <Compile Include="level1.png"> 237 <Name>level1</Name> 238 <Importer>TextureImporter</Importer> 239 <Processor>TextureProcessor</Processor> 240 </Compile> 241 </ItemGroup> 242 <ItemGroup> 243 <Compile Include="grass.png"> 244 <Name>grass</Name> 245 <Importer>TextureImporter</Importer> 246 <Processor>TextureProcessor</Processor> 247 </Compile> 248 </ItemGroup> 235 249 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 236 250 <!-- 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.