- Timestamp:
- 2015-06-25 23:19:17 (8 years ago)
- Location:
- 2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs
r6405 r6407 205 205 206 206 private Image lavaWallImage = LoadImage("lavawall"); 207 private Image lavaFloorImage = LoadImage("lavafloor"); 207 208 private Image spikeImage = LoadImage("spikes"); 208 209 private Image spikeLeftImage = LoadImage("spikeleft"); … … 492 493 level.SetTileMethod(Color.FromHexCode("C600AC"), CreateSpike, spikeLeftImage); 493 494 495 level.SetTileMethod(Color.FromHexCode("FF8C8C"), CreateLava); 496 494 497 level.SetTileMethod(Color.FromHexCode("BADA55"), CreatePrisoner); // Lempivärini. 495 498 … … 660 663 spike.Tag = "burn"; 661 664 Add(spike); 665 } 666 667 void CreateLava(Vector position, double width, double height) 668 { 669 GameObject lava = new GameObject(width * 13, height * 5); 670 lava.Image = lavaFloorImage; 671 lava.Position = position; 672 lava.Left = position.X - width * 0.5; 673 lava.Bottom = position.Y - height * 0.5; 674 Add(lava, 3); 675 676 PhysicsObject lavaCollision = PhysicsObject.CreateStaticObject(width * 13, height); 677 lavaCollision.IsVisible = false; 678 lavaCollision.Position = position; 679 lavaCollision.Left = position.X - width * 0.5; 680 lavaCollision.Tag = "lava"; 681 Add(lavaCollision); 662 682 } 663 683 -
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRunContent/HillbillyRunContent.contentproj
r6405 r6407 439 439 </Compile> 440 440 </ItemGroup> 441 <ItemGroup> 442 <Compile Include="lavafloor.png"> 443 <Name>lavafloor</Name> 444 <Importer>TextureImporter</Importer> 445 <Processor>TextureProcessor</Processor> 446 </Compile> 447 </ItemGroup> 441 448 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 442 449 <!-- 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.