- Timestamp:
- 2015-06-26 00:36:23 (8 years ago)
- Location:
- 2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs
r6413 r6414 182 182 private Image[] foregroundDecorations = LoadImages("viljaa", "grass", "grass"); 183 183 private Image[] blockImages = LoadImages("box2", "rock"); 184 private Image[] decorationImages = LoadImages("paali", "tree1"); 184 185 185 186 private Image[] houseImages = LoadImages("house", "houseburned"); … … 231 232 private Animation tattiMageCastAnimation; 232 233 private Animation fireballAnimation; 234 private Animation hedgehogAnimation; 233 235 234 236 private Animation bossRiseAnimation; … … 391 393 ClearAll(); 392 394 CreateLevel(); 393 MediaPlayer.Play("hillbilly_level0");394 MediaPlayer.IsRepeating = true;395 395 ScreenSettings(); 396 396 SetControls(); … … 425 425 bossHurtAnimation = LoadAnimation("bosshurt"); 426 426 fireballAnimation = LoadAnimation("fireball"); 427 hedgehogAnimation = LoadAnimation("siili"); 427 428 428 429 cameraOffset = Window.Width / 4; … … 496 497 level.SetTileMethod(Color.DarkGray, CreateMilk); 497 498 level.SetTileMethod(Color.Rose, CreateFlame, true); 498 //level.SetTileMethod(Color.Azure, CreateDummy, Color.Azure); //TODO: CreateSmoke 499 level.SetTileMethod(Color.FromHexCode("0094FF"), CreateDecoration); //TODO: CreateSmoke 500 level.SetTileMethod(Color.FromHexCode("E256FF"), CreateHedgehog); 499 501 //level.SetTileMethod(Color.Orange, CreateDummy, Color.Orange); //TODO: CreateTombstone 500 502 501 level.SetTileMethod(Color.FromHexCode("FF6A00"), CreateTreeTrunk); //Pihhh jostain heksoista. Ikävästi haisee luovuttamiselta! :----D502 level.SetTileMethod(Color.FromHexCode("57007F"), CreateTreeRoot); // Heksojen käytössä ei ole mitään hävettävää :P503 level.SetTileMethod(Color.FromHexCode("FF6A00"), CreateTreeTrunk); 504 level.SetTileMethod(Color.FromHexCode("57007F"), CreateTreeRoot); 503 505 level.SetTileMethod(Color.FromHexCode("00FF21"), CreateTreeBranch); 504 506 level.SetTileMethod(Color.FromHexCode("5B7F00"), CreateSwingTrap); … … 555 557 fireballTimer.Start(); 556 558 } 559 } 560 561 void CreateHedgehog(Vector position, double width, double height) 562 { 563 PlatformCharacter hedgehog = new PlatformCharacter(width, height * 0.6); 564 hedgehog.Position = position; 565 hedgehog.Animation = hedgehogAnimation; 566 hedgehog.Animation.FPS = RandomGen.NextInt(18, 24); 567 hedgehog.Animation.Step(RandomGen.NextInt(0, 16)); 568 hedgehog.Animation.Resume(); 569 hedgehog.Tag = "burn"; 570 hedgehog.CollisionIgnoreGroup = 3; 571 Add(hedgehog, 1); 572 573 PlatformWandererBrain brain = new PlatformWandererBrain(); 574 brain.Speed = 60; 575 brain.FallsOffPlatforms = false; 576 brain.TriesToJump = true; 577 hedgehog.Brain = brain; 578 579 AddCollisionHandler(hedgehog, "pitchfork", delegate(PhysicsObject w, PhysicsObject p) { w.Destroy(); }); 580 } 581 582 void CreateDecoration(Vector position, double width, double height) 583 { 584 GameObject decoration = new GameObject(width * 2, height * 3); 585 decoration.Position = position; 586 //decoration.Top = position.Y - height * 0.5; 587 //decoration.Animation = bossRiseAnimation; 588 decoration.Image = decorationImages[levelNumber]; 589 Add(decoration, -2); 557 590 } 558 591 -
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRunContent/HillbillyRunContent.contentproj
r6412 r6414 460 460 </Compile> 461 461 </ItemGroup> 462 <ItemGroup> 463 <Compile Include="paali.png"> 464 <Name>paali</Name> 465 <Importer>TextureImporter</Importer> 466 <Processor>TextureProcessor</Processor> 467 </Compile> 468 </ItemGroup> 469 <ItemGroup> 470 <Compile Include="tree1.png"> 471 <Name>tree1</Name> 472 <Importer>TextureImporter</Importer> 473 <Processor>TextureProcessor</Processor> 474 </Compile> 475 <Compile Include="tree2.png"> 476 <Name>tree2</Name> 477 <Importer>TextureImporter</Importer> 478 <Processor>TextureProcessor</Processor> 479 </Compile> 480 <Compile Include="tree3.png"> 481 <Name>tree3</Name> 482 <Importer>TextureImporter</Importer> 483 <Processor>TextureProcessor</Processor> 484 </Compile> 485 </ItemGroup> 462 486 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 463 487 <!-- 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.