- Timestamp:
- 2013-06-12 15:05:27 (9 years ago)
- Location:
- 2013/24/EemeliP/Tasohyppelypeli3/Tasohyppelypeli3
- Files:
-
- 15 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/24/EemeliP/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3/Braaains!!.cs
r4084 r4104 9 9 public class Tasohyppelypeli3 : PhysicsGame 10 10 { 11 const double nopeus = 300;12 const double hyppyNopeus = 750;11 const double nopeus = 450; 12 const double hyppyNopeus = 800; 13 13 const int RUUDUN_KOKO = 40; 14 14 15 15 PlatformCharacter pelaaja1; 16 16 17 Image pelaajanKuva = LoadImage(" O.o");17 Image pelaajanKuva = LoadImage("ukko"); 18 18 Image tahtiKuva = LoadImage("Brains"); 19 19 20 SoundEffect maaliAani = LoadSoundEffect("maali"); 20 SoundEffect maaliAani = LoadSoundEffect("beep"); 21 private Animation fetusAnimaatio; 21 22 22 23 public override void Begin() 23 24 { 25 fetusAnimaatio = LoadAnimation("fetus"); 26 24 27 MultiSelectWindow alkuValikko = new MultiSelectWindow("Braaains!!", 25 "Aloita peli", "Lopeta"); 28 "Start", "Close"); 29 //alkuValikko.AddItemHandler(0, AloitaPeli); 30 alkuValikko.AddItemHandler(1, Exit); 26 31 Add(alkuValikko); 27 32 IsFullScreen = true; … … 38 43 void LuoKentta() 39 44 { 40 SoundEffect hyppyAani = LoadSoundEffect("smb_jump-super.wav"); 41 MediaPlayer.Play("Fire In The Hole"); 45 MediaPlayer.Play("hotdamned"); 42 46 TileMap kentta = TileMap.FromLevelAsset("kentta1"); 43 47 kentta.SetTileMethod('#', LisaaTaso); … … 53 57 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 54 58 taso.Position = paikka; 55 taso.Color = Color. Purple;59 taso.Color = Color.Red; 56 60 Add(taso); 57 61 } … … 70 74 { 71 75 pelaaja1 = new PlatformCharacter(leveys, korkeus); 76 pelaaja1.Animation = fetusAnimaatio; 77 pelaaja1.Animation.Start(); 72 78 pelaaja1.Position = paikka; 73 79 pelaaja1.Mass = 4.0; 74 pelaaja1.Image = pelaajanKuva;80 //pelaaja1.Image = pelaajanKuva; 75 81 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 76 82 Add(pelaaja1); … … 109 115 { 110 116 maaliAani.Play(); 111 MessageDisplay.Add(" NAM NAM, SÖIT AIVOT!");117 MessageDisplay.Add("BRAAAINS!!"); 112 118 tahti.Destroy(); 113 119 } -
2013/24/EemeliP/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/Tasohyppelypeli3Content.contentproj
r4084 r4104 46 46 </ItemGroup> 47 47 <ItemGroup> 48 <Compile Include="fetus.anim"> 49 <Name>fetus</Name> 50 <Importer>AnimationImporter</Importer> 51 <Processor>AnimationContentProcessor</Processor> 52 </Compile> 48 53 <Compile Include="maali.wav"> 49 54 <Name>maali</Name> … … 68 73 </ItemGroup> 69 74 <ItemGroup> 70 <Compile Include="O.o.png">71 <Name>O.o</Name>72 <Importer>TextureImporter</Importer>73 <Processor>TextureProcessor</Processor>74 </Compile>75 </ItemGroup>76 <ItemGroup>77 75 <Compile Include="Brains.png"> 78 76 <Name>Brains</Name> … … 82 80 </ItemGroup> 83 81 <ItemGroup> 84 <Compile Include=" Fire In The Hole.mp3">85 <Name> Fire In The Hole</Name>86 <Importer> Mp3Importer</Importer>87 <Processor> SongProcessor</Processor>82 <Compile Include="Tausta.png"> 83 <Name>Tausta</Name> 84 <Importer>TextureImporter</Importer> 85 <Processor>TextureProcessor</Processor> 88 86 </Compile> 89 87 </ItemGroup> 90 88 <ItemGroup> 91 <Compile Include=" smb_jump-super.wav">92 <Name> smb_jump-super</Name>89 <Compile Include="good2.wav"> 90 <Name>good2</Name> 93 91 <Importer>WavImporter</Importer> 94 92 <Processor>SoundEffectProcessor</Processor> … … 96 94 </ItemGroup> 97 95 <ItemGroup> 98 <Compile Include="Tausta.png"> 99 <Name>Tausta</Name> 96 <Compile Include="gunpoint.mp3"> 97 <Name>gunpoint</Name> 98 <Importer>Mp3Importer</Importer> 99 <Processor>SongProcessor</Processor> 100 </Compile> 101 <Compile Include="ukko.png"> 102 <Name>ukko</Name> 100 103 <Importer>TextureImporter</Importer> 101 104 <Processor>TextureProcessor</Processor> 105 </Compile> 106 <Compile Include="stick.png"> 107 <Name>stick</Name> 108 <Importer>TextureImporter</Importer> 109 <Processor>TextureProcessor</Processor> 110 </Compile> 111 </ItemGroup> 112 <ItemGroup> 113 <Compile Include="beep.wav"> 114 <Name>beep</Name> 115 <Importer>WavImporter</Importer> 116 <Processor>SoundEffectProcessor</Processor> 117 </Compile> 118 </ItemGroup> 119 <ItemGroup> 120 <Compile Include="paikallaan.anim"> 121 <Name>paikallaan</Name> 122 <Importer>AnimationImporter</Importer> 123 <Processor>AnimationContentProcessor</Processor> 124 </Compile> 125 </ItemGroup> 126 <ItemGroup> 127 <Compile Include="hotdamned.mp3"> 128 <Name>hotdamned</Name> 129 <Importer>Mp3Importer</Importer> 130 <Processor>SongProcessor</Processor> 102 131 </Compile> 103 132 </ItemGroup> -
2013/24/EemeliP/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/kentta1.txt
r4084 r4104 1 2 3 4 * 5 # # # 6 * * 7 ### ### * 8 * ** ### 9 ### ###* * 10 * * ### # 11 * * ### # 12 ### * * # 13 *********** ### #### * # 14 * * ############# # * # 15 ### ### # * # 16 N # * # # 17 ############################################################################# * # # 18 # * # # 19 # * # # 20 # * # # 21 # * # * ########################## 22 # * # ### # 23 # * # * # # # # # ## # 24 # * # ### # # # # # # # # # 25 # * ################# ### # # # # # # # # # 26 # * * # # # # # ## 27 # * ********* ### # 1 2 ### 3 * ### # 4 # # # * # 5 * * ### ######## 6 ### ### * # 7 * * ### ### # 8 ### ### * ### # 9 # * ### # # # 10 * # ### # #################################### ############# ############ ############# 11 ### # * # # # # # 12 # ### #### * # #* # # # 13 * * ############# # # # # # # 14 ### ### # # # # # # # 15 N # * # # # # # # *********************************** 16 ############################################################################# # # # # # ** ##################################################### 17 # # # # # # #### 18 # # # # # # ### # # # # ## # 19 # # * # # # # # # # # # # # # 20 # # * ################# ############ ############################ # # # # # # # # 21 # # ### # # # # # # # # # 22 # # * # # # # # ## 23 # # ### # 24 # ############### ### # 25 # * # 26 # * * ### # 28 27 ###################### # 29 28 # #
Note: See TracChangeset
for help on using the changeset viewer.