- Timestamp:
- 2012-06-15 11:20:02 (11 years ago)
- Location:
- 2012/24/NikiV/JungleRun
- Files:
-
- 14 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/24/NikiV/JungleRun/JungleRun/JungleRun/JungleRun.cs
r3025 r3081 47 47 public override void Begin() 48 48 { 49 paikallaanOikealle = Image.Mirror(paikallaanVasemmalle); 50 kavelyOikealle = Image.Mirror(kavelyVasemmalle); 49 51 if (DataStorage.Exists("pisteet.xml")) 50 52 topLista = DataStorage.Load<ScoreList>(topLista, "pisteet.xml"); … … 61 63 } 62 64 63 void luoKentta() 64 { 65 void luoKentta(string kenttaTiedostonNimi) 66 { 67 65 68 LuoLaskuri(); 66 TileMap kentta = TileMap.From File("kentta1.txt");69 TileMap kentta = TileMap.FromLevelAsset(kenttaTiedostonNimi); 67 70 kentta.SetTileMethod('#', lisaaTaso); 68 71 kentta.SetTileMethod('*', lisaaTahti); … … 73 76 kentta.SetTileMethod('v', Lisaavihu); 74 77 kentta.SetTileMethod('r', Lisaaraha); 78 kentta.SetTileMethod('M', LisaaMaali); 75 79 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 76 80 Level.CreateBorders(); 77 81 82 83 Gravity = new Vector(0, -1000); 84 85 LuoMittarit(); 86 lisaaNappaimet(); 87 88 Camera.Follow(pelaaja1); 89 Camera.ZoomFactor = 1.2; 90 Camera.StayInLevel = true; 78 91 79 92 Level.Background.CreateGradient(Color.White, Color.SkyBlue); 80 93 94 } 95 96 void LisaaMaali(Vector paikka, double leveys, double korkeus) 97 { 98 PhysicsObject maali = PhysicsObject.CreateStaticObject(leveys, korkeus); 99 maali.Position = paikka; 100 maali.Tag = "maali"; 101 maali.Image = LoadImage("maaliKuva"); 102 Add(maali); 81 103 } 82 104 … … 117 139 AddCollisionHandler(pelaaja1, "raha", CollisionHandler.AddMeterValue(pisteLaskuri, 1)); 118 140 AddCollisionHandler(pelaaja1, "raha", CollisionHandler.DestroyTarget); 141 AddCollisionHandler(pelaaja1, "maali", PelaajaMaalissa); 119 142 120 143 Add(pelaaja1); 144 121 145 } 122 146 … … 236 260 void VoimaLoppui(double mittarinArvo) 237 261 { 238 //pelaaja1.Destroy();262 pelaaja1.Destroy(); 239 263 ParhaatPisteet(); 240 264 … … 301 325 void AloitaPeli() 302 326 { 303 paikallaanOikealle = Image.Mirror(paikallaanVasemmalle); 304 kavelyOikealle = Image.Mirror(kavelyVasemmalle); 305 Gravity = new Vector(0, -1000); 306 307 luoKentta(); 308 LuoMittarit(); 309 lisaaNappaimet(); 310 311 Camera.Follow(pelaaja1); 312 Camera.ZoomFactor = 1.2; 313 Camera.StayInLevel = true; 327 328 329 SeuraavaKentta(1); 314 330 315 331 } … … 379 395 AloitaPeli(); 380 396 } 381 397 void SeuraavaKentta(int kentanNro) 398 { 399 ClearAll(); 400 401 402 403 if (kentanNro == 1) luoKentta("kentta1"); 404 else if (kentanNro == 2) luoKentta("kentta2"); 405 else if(kentanNro > 2) Exit(); 406 407 } 408 void LuoKentta(string kenttaTiedostonNimi) 409 { 410 TileMap ruudut = TileMap.FromFile(kenttaTiedostonNimi); 411 //tässä luodaan kenttä tekstitiedostosta 412 } 413 414 void PelaajaMaalissa(PhysicsObject pelaaja, PhysicsObject maali) 415 { 416 SeuraavaKentta(2); 417 } 382 418 } -
2012/24/NikiV/JungleRun/JungleRun/JungleRun/JungleRun.csproj
r2980 r3081 122 122 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 123 123 </Content> 124 <Content Include="kentta2.txt" /> 124 125 </ItemGroup> 125 126 <ItemGroup> -
2012/24/NikiV/JungleRun/JungleRun/JungleRun/JungleRun.csproj.Debug.cachefile
r3025 r3081 15 15 Content\multaa.xnb 16 16 Content\raha.xnb 17 Content\GameThumbnail.xnb 18 Content\pomo.xnb 19 Content\maaliKuva.xnb 20 Content\kentta1.xnb 21 Content\kentta2.xnb 17 22 Content\vs sephiroth.wma 18 23 Content\12 Raita 12.wma -
2012/24/NikiV/JungleRun/JungleRun/JungleRun/bin/x86/Debug/Data/pisteet.xml
r3025 r3081 6 6 <Item Index="0" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 7 7 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 8 <Value>asdf </Value>8 <Value>asdfuttyt</Value> 9 9 </Field> 10 10 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 11 <Value> 3</Value>11 <Value>7</Value> 12 12 </Field> 13 13 </Item> 14 14 <Item Index="1" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 15 15 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 16 <Value> n</Value>16 <Value>asdf</Value> 17 17 </Field> 18 18 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 19 <Value> 1</Value>19 <Value>5</Value> 20 20 </Field> 21 21 </Item> 22 22 <Item Index="2" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 23 23 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 24 <Value> i</Value>24 <Value>asdf</Value> 25 25 </Field> 26 26 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 27 <Value> 1</Value>27 <Value>5</Value> 28 28 </Field> 29 29 </Item> 30 30 <Item Index="3" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 31 31 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 32 <Value> ki</Value>32 <Value>asdf</Value> 33 33 </Field> 34 34 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 35 <Value> 1</Value>35 <Value>5</Value> 36 36 </Field> 37 37 </Item> 38 38 <Item Index="4" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 39 39 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 40 <Value> n</Value>40 <Value>asdf</Value> 41 41 </Field> 42 42 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 43 <Value> 1</Value>43 <Value>5</Value> 44 44 </Field> 45 45 </Item> 46 46 <Item Index="5" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 47 47 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 48 <Value> i</Value>48 <Value>asdf</Value> 49 49 </Field> 50 50 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 51 <Value> 1</Value>51 <Value>5</Value> 52 52 </Field> 53 53 </Item> 54 54 <Item Index="6" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 55 55 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 56 <Value> ki</Value>56 <Value>asdf</Value> 57 57 </Field> 58 58 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 59 <Value> 1</Value>59 <Value>5</Value> 60 60 </Field> 61 61 </Item> 62 62 <Item Index="7" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 63 63 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 64 <Value> n</Value>64 <Value>asdf</Value> 65 65 </Field> 66 66 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 67 <Value> 1</Value>67 <Value>5</Value> 68 68 </Field> 69 69 </Item> 70 70 <Item Index="8" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 71 71 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 72 <Value> n</Value>72 <Value>asdf</Value> 73 73 </Field> 74 74 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 75 <Value> 1</Value>75 <Value>5</Value> 76 76 </Field> 77 77 </Item> 78 78 <Item Index="9" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 79 79 <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 80 <Value> i</Value>80 <Value>asdf</Value> 81 81 </Field> 82 82 <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 83 <Value> 1</Value>83 <Value>5</Value> 84 84 </Field> 85 85 </Item> … … 87 87 </Field> 88 88 <Field Name="LastEnteredName" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 89 <Value>asdf </Value>89 <Value>asdfuttyt</Value> 90 90 </Field> 91 91 </Object> -
2012/24/NikiV/JungleRun/JungleRun/JungleRun/bin/x86/Debug/kentta1.txt
r3025 r3081 5 5 6 6 7 s s s8 rrrrr v s v oo oo 9 ooooooooo oooooo ooo oooo 7 rr s s s M 8 rrrrr v s v oo oo oo 9 ooooooooo oooooo ooo oooo ooo 10 10 11 N v 11 N v r v v 12 12 mmmmmmmmmmmmmmmmmmmm -
2012/24/NikiV/JungleRun/JungleRun/JungleRun/kentta1.txt
r3025 r3081 5 5 6 6 7 s s s8 rrrrr v s v oo oo 9 ooooooooo oooooo ooo oooo 7 rr s s s M 8 rrrrr v s v oo oo oo 9 ooooooooo oooooo ooo oooo ooo 10 10 11 N v 11 N v r v v 12 12 mmmmmmmmmmmmmmmmmmmm -
2012/24/NikiV/JungleRun/JungleRun/JungleRun/obj/x86/Debug/ContentPipeline-{F47465E6-6899-4E18-A630-D974FBA44481}.xml
r3025 r3081 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\kokeilu.xnb</Output> 38 <Time>2012-06-1 2T14:32:05.0520773+03:00</Time>38 <Time>2012-06-15T09:25:33.4891197+03:00</Time> 39 39 </Item> 40 40 <Item> … … 147 147 <Output>C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\raha.xnb</Output> 148 148 <Time>2012-06-14T13:59:49.060705+03:00</Time> 149 </Item> 150 <Item> 151 <Source>GameThumbnail.png</Source> 152 <Name>GameThumbnail</Name> 153 <Importer>TextureImporter</Importer> 154 <Processor>TextureProcessor</Processor> 155 <Options>None</Options> 156 <Output>C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\GameThumbnail.xnb</Output> 157 <Time>2012-06-15T09:54:57.0027144+03:00</Time> 158 </Item> 159 <Item> 160 <Source>pomo.png</Source> 161 <Name>pomo</Name> 162 <Importer>TextureImporter</Importer> 163 <Processor>TextureProcessor</Processor> 164 <Options>None</Options> 165 <Output>C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\pomo.xnb</Output> 166 <Time>2012-06-15T09:40:57.5572472+03:00</Time> 167 </Item> 168 <Item> 169 <Source>maaliKuva.png</Source> 170 <Name>maaliKuva</Name> 171 <Importer>TextureImporter</Importer> 172 <Processor>TextureProcessor</Processor> 173 <Options>None</Options> 174 <Output>C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\maaliKuva.xnb</Output> 175 <Time>2012-06-15T10:28:57.2200077+03:00</Time> 176 </Item> 177 <Item> 178 <Source>kentta1.txt</Source> 179 <Name>kentta1</Name> 180 <Importer>TextFileImporter</Importer> 181 <Processor>TextFileContentProcessor</Processor> 182 <Options>None</Options> 183 <Output>C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\kentta1.xnb</Output> 184 <Time>2012-06-15T10:34:59.3410767+03:00</Time> 185 </Item> 186 <Item> 187 <Source>kentta2.txt</Source> 188 <Name>kentta2</Name> 189 <Importer>TextFileImporter</Importer> 190 <Processor>TextFileContentProcessor</Processor> 191 <Options>None</Options> 192 <Output>C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\kentta2.xnb</Output> 193 <Time>2012-06-15T10:52:20.7348346+03:00</Time> 149 194 </Item> 150 195 <BuildSuccessful>true</BuildSuccessful> -
2012/24/NikiV/JungleRun/JungleRun/JungleRun/obj/x86/Debug/JungleRun.csproj.FileListAbsolute.txt
r3025 r3081 26 26 C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\multaa.xnb 27 27 C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\raha.xnb 28 C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\GameThumbnail.xnb 29 C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\pomo.xnb 30 C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\maaliKuva.xnb 31 C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\kentta1.xnb 32 C:\MyTemp\NikiV\JungleRun\JungleRun\JungleRun\bin\x86\Debug\Content\kentta2.xnb -
2012/24/NikiV/JungleRun/JungleRun/JungleRun/obj/x86/Debug/cachefile-{F47465E6-6899-4E18-A630-D974FBA44481}-targetpath.txt
r3025 r3081 17 17 Content\multaa.xnb 18 18 Content\raha.xnb 19 Content\GameThumbnail.xnb 20 Content\pomo.xnb 21 Content\maaliKuva.xnb 22 Content\kentta1.xnb 23 Content\kentta2.xnb -
2012/24/NikiV/JungleRun/JungleRun/JungleRunContent/JungleRunContent.contentproj
r3025 r3081 152 152 </Compile> 153 153 </ItemGroup> 154 <ItemGroup> 155 <Compile Include="GameThumbnail.png"> 156 <Name>GameThumbnail</Name> 157 <Importer>TextureImporter</Importer> 158 <Processor>TextureProcessor</Processor> 159 </Compile> 160 </ItemGroup> 161 <ItemGroup> 162 <Compile Include="pomo.png"> 163 <Name>pomo</Name> 164 <Importer>TextureImporter</Importer> 165 <Processor>TextureProcessor</Processor> 166 </Compile> 167 </ItemGroup> 168 <ItemGroup> 169 <Compile Include="maaliKuva.png"> 170 <Name>maaliKuva</Name> 171 <Importer>TextureImporter</Importer> 172 <Processor>TextureProcessor</Processor> 173 </Compile> 174 </ItemGroup> 175 <ItemGroup> 176 <Compile Include="kentta1.txt"> 177 <Name>kentta1</Name> 178 <Importer>TextFileImporter</Importer> 179 <Processor>TextFileContentProcessor</Processor> 180 </Compile> 181 <Compile Include="kentta2.txt"> 182 <Name>kentta2</Name> 183 <Importer>TextFileImporter</Importer> 184 <Processor>TextFileContentProcessor</Processor> 185 </Compile> 186 </ItemGroup> 154 187 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 155 188 <!-- 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.