Changeset 6929 for 2015/30/EliasHu/RescueRanger/RescueRanger
- Timestamp:
- 2015-07-22 14:55:33 (6 years ago)
- Location:
- 2015/30/EliasHu/RescueRanger/RescueRanger
- Files:
-
- 9 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/30/EliasHu/RescueRanger/RescueRanger/RescueRanger/RescueRanger.cs
r6910 r6929 10 10 { 11 11 const double nopeus = 200; 12 const double hyppyNopeus = 4 0;12 const double hyppyNopeus = 43; 13 13 const int RUUDUN_KOKO = 40; 14 14 … … 23 23 24 24 25 Image tukki = LoadImage("log"); 26 Image lehti = LoadImage("leaf"); 27 Image taustaKuva = LoadImage("america"); 25 //TODO vikaan kenttään metsäpalo 26 //TODO musiikki taustalle 27 //TODO maali texture 28 //TODO lääkäri asema loppuun 29 30 31 Image tukki = LoadImage ("log"); 32 Image lehti = LoadImage ("leaf"); 33 Image taustaKuva = LoadImage ("america"); 28 34 Image pelaajanKuva = LoadImage("mediheli"); 29 Image tahtiKuva = LoadImage("tahti"); 30 Image elain = LoadImage("elain"); 31 Image ranger = LoadImage("ranger"); 32 33 SoundEffect maaliAani = LoadSoundEffect("maali"); 35 Image tahtiKuva = LoadImage ("tahti"); 36 Image elain = LoadImage ("elain"); 37 Image rangerz = LoadImage ("ranger"); 38 Image fly = LoadImage ("Flybomb"); 39 40 SoundEffect maaliAani = LoadSoundEffect ("maali"); 41 SoundEffect hitmarker = LoadSoundEffect("HITMARKER"); 42 SoundEffect rajahdysAani = LoadSoundEffect("Barrels"); 34 43 35 44 public override void Begin() … … 59 68 pistelaskuri.MaxValue = 0; 60 69 TileMap kentta = TileMap.FromLevelAsset("kentta"+kenttanumero); 61 kentta.SetTileMethod('#', LisaaTaso); 62 kentta.SetTileMethod('i', LisaaTaso2); 63 kentta.SetTileMethod('*', LisaaElain); 64 kentta.SetTileMethod('=', LisaaTurva); 65 kentta.SetTileMethod('N', LisaaPelaaja); 66 kentta.SetTileMethod('t', LisaaMaali); 67 kentta.SetTileMethod('u', LisaaTalo); 68 kentta.SetTileMethod('r', LisaaRanger); 69 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 70 kentta.SetTileMethod('#', LisaaTaso) ; 71 kentta.SetTileMethod('i', LisaaTaso2) ; 72 kentta.SetTileMethod('*', LisaaElain) ; 73 kentta.SetTileMethod('=', LisaaTurva) ; 74 kentta.SetTileMethod('N', LisaaPelaaja) ; 75 kentta.SetTileMethod('t', LisaaMaali) ; 76 kentta.SetTileMethod('u', LisaaTalo) ; 77 kentta.SetTileMethod('r', LisaaRanger) ; 78 kentta.SetTileMethod('V', LisaaVihollinen); 79 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO) ; 70 80 Level.CreateBorders(); 71 81 Level.Background.Image = taustaKuva; … … 100 110 GameObject ranger = new GameObject(leveys, korkeus); 101 111 ranger.Position = paikka; 102 ranger.Image = ranger ;112 ranger.Image = rangerz; 103 113 Add(ranger); 104 114 } … … 115 125 } 116 126 127 void LisaaVihollinen(Vector paikka, double leveys, double korkeus) 128 { 129 PhysicsObject vihollinen = new PhysicsObject(leveys, korkeus); 130 vihollinen.Position = paikka; 131 vihollinen.Tag = "karpanen"; 132 vihollinen.IgnoresGravity = true; 133 vihollinen.Image = fly; 134 Add(vihollinen); 135 List<Vector> polku = new List<Vector>() ; 136 polku.Add(paikka+ new Vector(200, 0)) ; 137 polku.Add(paikka-new Vector(200, 0)) ; 138 PathFollowerBrain polkuaivot = new PathFollowerBrain(); 139 polkuaivot.Path = polku ; 140 polkuaivot.Loop = true ; 141 vihollinen.Brain = polkuaivot ; 142 143 144 } 145 146 void TormaaKarpaseen(PhysicsObject pelaaja1, PhysicsObject vihollinen) 147 { 148 Explosion rajahdys = new Explosion(5000000) ; 149 rajahdys.Position = vihollinen.Position; 150 rajahdys.Sound = rajahdysAani ; 151 rajahdys.Speed = 10000 ; 152 Add(rajahdys) ; 153 pelaaja1.Destroy() ; 154 vihollinen.Destroy() ; 155 Timer.SingleShot(2, aloitapeli); 156 } 117 157 118 158 void LisaaTurva(Vector paikka, double leveys, double korkeus) … … 147 187 void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 148 188 { 149 pelaaja1 = new PlatformCharacter(leveys , korkeus);189 pelaaja1 = new PlatformCharacter(leveys * 1.5, korkeus * 0.7); 150 190 pelaaja1.Position = paikka; 151 191 pelaaja1.Mass = 400; 152 192 pelaaja1.Image = pelaajanKuva; 153 AddCollisionHandler(pelaaja1, "Elain", TormaaElaimeen); 154 AddCollisionHandler(pelaaja1, "Puu", TormaaPuuhun); 155 AddCollisionHandler(pelaaja1, "maali", TormaaMaaliin); 193 AddCollisionHandler(pelaaja1, "Elain", TormaaElaimeen) ; 194 AddCollisionHandler(pelaaja1, "Puu", TormaaPuuhun) ; 195 AddCollisionHandler(pelaaja1, "maali", TormaaMaaliin) ; 196 AddCollisionHandler(pelaaja1, "karpanen", TormaaKarpaseen); 156 197 Add(pelaaja1); 157 198 } … … 205 246 { 206 247 pisteLaskuri2.Value += 1; 248 hitmarker.Play(); 207 249 aloitapeli(); 208 250 } -
2015/30/EliasHu/RescueRanger/RescueRanger/RescueRanger/RescueRanger.csproj.Debug.cachefile
r6910 r6929 12 12 Content\log.xnb 13 13 Content\elain.xnb 14 Content\ranger.xnb 15 Content\HITMARKER.xnb 16 Content\Flybomb.xnb 17 Content\Barrels.xnb -
2015/30/EliasHu/RescueRanger/RescueRanger/RescueRanger/obj/x86/Debug/RescueRanger.csproj.FileListAbsolute.txt
r6910 r6929 20 20 C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\log.xnb 21 21 C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\elain.xnb 22 C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\ranger.xnb 23 C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\HITMARKER.xnb 24 C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\Flybomb.xnb 25 C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\Barrels.xnb -
2015/30/EliasHu/RescueRanger/RescueRanger/RescueRanger/obj/x86/Debug/cachefile-{D77DA1D7-8701-41C1-98B2-08AF5C040485}-targetpath.txt
r6910 r6929 13 13 Content\elain.xnb 14 14 Content\ranger.xnb 15 Content\HITMARKER.xnb 16 Content\Flybomb.xnb 17 Content\Barrels.xnb -
2015/30/EliasHu/RescueRanger/RescueRanger/RescueRangerContent/RescueRangerContent.contentproj
r6910 r6929 137 137 </Compile> 138 138 </ItemGroup> 139 <ItemGroup> 140 <Compile Include="HITMARKER.wav"> 141 <Name>HITMARKER</Name> 142 <Importer>WavImporter</Importer> 143 <Processor>SoundEffectProcessor</Processor> 144 </Compile> 145 </ItemGroup> 146 <ItemGroup> 147 <Compile Include="Flybomb.png"> 148 <Name>Flybomb</Name> 149 <Importer>TextureImporter</Importer> 150 <Processor>TextureProcessor</Processor> 151 </Compile> 152 </ItemGroup> 153 <ItemGroup> 154 <Compile Include="Barrels.wav"> 155 <Name>Barrels</Name> 156 <Importer>WavImporter</Importer> 157 <Processor>SoundEffectProcessor</Processor> 158 </Compile> 159 </ItemGroup> 139 160 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 140 161 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/30/EliasHu/RescueRanger/RescueRanger/RescueRangerContent/kentta1.txt
r6910 r6929 1 ############### ######## ############# ###########2 # ## ###### ######3 # ## #########1 ###############iiiiii## ############# ########### 2 # ##iiii## ###### 3 # ##ii## V ##### 4 4 # #### ######### ##### ##### 5 5 # ## ##iiiiiiii### #iiiii### #### 6 # ## ###iiiiiiii#### ####iiiii ##### ####6 # ## ###iiiiiiii#### ####iiiiiii### #### 7 7 # N ## ###iiiiiiii#################iiiii##### ### 8 8 # tttttttt # ## ############ ##iiiii# ## 9 9 # ## # uuuu uuu # ## 10 # # ## uuuu ###11 # # ## uuuu * ###12 # # ##uuuu ===== ####13 # # #### uuuu ########14 # # ###### uuuu uuu ############15 ########## #################################################################10 # #i# uuuu ### 11 # #i# uuuu * ### 12 # #i# V uuuu ===== #### 13 # #i### uuuu ######## 14 # #iiii## uuuu uuu ############ 15 ##########iiiiii########################################################### -
2015/30/EliasHu/RescueRanger/RescueRanger/RescueRangerContent/obj/x86/Debug/ContentPipeline.xml
r6910 r6929 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2015-07-22T1 0:49:38.6544744+03:00</Time>38 <Time>2015-07-22T12:58:49.3534822+03:00</Time> 39 39 </Item> 40 40 <Item> … … 127 127 <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\ranger.xnb</Output> 128 128 <Time>2015-07-22T11:39:10.2631684+03:00</Time> 129 </Item> 130 <Item> 131 <Source>HITMARKER.wav</Source> 132 <Name>HITMARKER</Name> 133 <Importer>WavImporter</Importer> 134 <Processor>SoundEffectProcessor</Processor> 135 <Options>None</Options> 136 <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\HITMARKER.xnb</Output> 137 <Time>2015-07-22T13:32:58.5927793+03:00</Time> 138 </Item> 139 <Item> 140 <Source>Flybomb.png</Source> 141 <Name>Flybomb</Name> 142 <Importer>TextureImporter</Importer> 143 <Processor>TextureProcessor</Processor> 144 <Options>None</Options> 145 <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\Flybomb.xnb</Output> 146 <Time>2015-07-22T13:51:04.4718713+03:00</Time> 147 </Item> 148 <Item> 149 <Source>Barrels.wav</Source> 150 <Name>Barrels</Name> 151 <Importer>WavImporter</Importer> 152 <Processor>SoundEffectProcessor</Processor> 153 <Options>None</Options> 154 <Output>C:\MyTemp\EliasHu\RescueRanger\RescueRanger\RescueRanger\bin\x86\Debug\Content\Barrels.xnb</Output> 155 <Time>2015-07-22T14:41:24.0884186+03:00</Time> 129 156 </Item> 130 157 <BuildSuccessful>true</BuildSuccessful>
Note: See TracChangeset
for help on using the changeset viewer.