- Timestamp:
- 2015-07-23 11:49:13 (8 years ago)
- Location:
- 2015/30/TomiM/Tasohyppelypeli
- Files:
-
- 15 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/30/TomiM/Tasohyppelypeli/Tasohyppelypeli/Tasohyppelypeli/Tasohyppelypeli.cs
r6934 r6968 18 18 Image pelaajanKuva = LoadImage("tyyppi3"); 19 19 Image tahtiKuva = LoadImage("kolikko"); 20 Image setelikuva = LoadImage("seteli"); 20 21 Image vihollisenKuva = LoadImage("vihollinen"); 21 22 … … 23 24 24 25 26 private Image[] ukkelinKavely = LoadImages("tyyppi", "tyyppi2", "tyyppi4"); 25 27 26 28 … … 36 38 LuoPistelaskuri(); 37 39 38 RandomMoverBrain satunnaisAivot = new RandomMoverBrain(100);39 satunnaisAivot.ChangeMovementSeconds = 1;40 vihollinen.Brain = satunnaisAivot;41 satunnaisAivot.WanderRadius = 20;42 40 43 41 … … 53 51 { 54 52 55 Level.AmbientLight = 0.3; 56 57 Light valo = new Light(); 58 valo.Intensity = 0.8; 59 valo.Distance = 1200; 60 valo.Position = valo.Position; 61 Add(valo); 62 63 Smoke savu = new Smoke(); 64 savu.Position = valo.Position; 65 Add(savu); 66 Wind = new Vector( 0, 0); 53 54 55 67 56 68 57 Level.CreateBottomBorder(); … … 73 62 kentta.SetTileMethod('*', LisaaTahti); 74 63 kentta.SetTileMethod('V', LisaaVihollinen); 64 kentta.SetTileMethod('S', LisaaSeteli); 65 75 66 76 67 kentta.SetTileMethod('N', LisaaPelaaja); … … 119 110 pelaaja1.CanRotate = false; 120 111 121 pelaaja1.Weapon = new PlasmaCannon(20, 5); 122 pelaaja1.Weapon.Ammo.Value = 1000; 123 124 125 126 127 112 113 114 pelaaja1.Animation = new Animation(ukkelinKavely); 115 116 pelaaja1.Animation.Start(); 117 pelaaja1.Animation.FPS = 5; 128 118 } 129 119 void LisaaVihollinen(Vector paikka, double leveys, double korkeus) … … 135 125 Add(vihollinen); 136 126 vihollinen.Tag = "pahis"; 137 127 PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 128 tasoAivot.Speed = 100; 129 130 vihollinen.Brain = tasoAivot; 131 tasoAivot.FallsOffPlatforms = false; 138 132 139 133 … … 191 185 192 186 pelaaja1.Destroy(); 187 188 AloitaAlusta(); 189 190 191 192 193 } 194 void AloitaAlusta() 195 { 193 196 ClearAll(); 194 197 LuoKentta(); 195 198 LisaaNappaimet(); 199 Gravity = new Vector(0, -1000); 200 201 196 202 LuoPistelaskuri(); 197 203 204 205 206 198 207 Camera.Follow(pelaaja1); 199 200 201 Gravity = new Vector(0, -1000); 202 203 204 205 206 207 208 } 209 void AloitaAlusta() 210 { 211 ClearAll(); 212 LuoKentta(); 213 LisaaNappaimet(); 214 208 Camera.ZoomFactor = 1.2; 209 Camera.StayInLevel = true; 215 210 216 211 }IntMeter pisteLaskuri; … … 228 223 229 224 IntMeter keratytEsineet = new IntMeter(0); 230 231 225 226 232 227 233 228 pisteNaytto.BindTo(pisteLaskuri); 234 229 Add(pisteNaytto); 235 230 236 pisteNaytto.IntFormatString = " Kolikoita: {0:D1}";231 pisteNaytto.IntFormatString = "rahaa: {0:D1}"; 237 232 238 233 } … … 242 237 243 238 } 244 } 245 239 void LisaaSeteli(Vector paikka, double leveys, double korkeus) 240 { 241 PhysicsObject seteli = PhysicsObject.CreateStaticObject(leveys, korkeus); 242 seteli .IgnoresCollisionResponse = true; 243 seteli.Position = paikka; 244 seteli.Image = setelikuva; 245 seteli.Tag = "seteli"; 246 Add(seteli); 247 248 249 250 } 251 252 } 246 253 247 254 -
2015/30/TomiM/Tasohyppelypeli/Tasohyppelypeli/Tasohyppelypeli/Tasohyppelypeli.csproj.Debug.cachefile
r6906 r6968 2 2 Content\norsu.xnb 3 3 Content\tahti.xnb 4 Content\kentta1.xnb5 4 Content\kolikko.xnb 6 5 Content\tyyppi3.xnb 7 6 Content\vihollinen.xnb 7 Content\tyyppi.xnb 8 Content\tyyppi4.xnb 9 Content\tyyppi2.xnb 10 Content\tyyppi5.xnb 11 Content\tyyppi6.xnb 12 Content\kentta1.xnb 13 Content\kentta2.xnb 14 Content\seteli.xnb -
2015/30/TomiM/Tasohyppelypeli/Tasohyppelypeli/Tasohyppelypeli/obj/x86/Debug/Tasohyppelypeli.csproj.FileListAbsolute.txt
r6906 r6968 2 2 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\norsu.xnb 3 3 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tahti.xnb 4 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kentta1.xnb5 4 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Tasohyppelypeli.exe 6 5 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Tasohyppelypeli.pdb … … 14 13 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi3.xnb 15 14 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\vihollinen.xnb 15 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi.xnb 16 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi4.xnb 17 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi2.xnb 18 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi5.xnb 19 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi6.xnb 20 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kentta1.xnb 21 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kentta2.xnb 22 C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\seteli.xnb -
2015/30/TomiM/Tasohyppelypeli/Tasohyppelypeli/Tasohyppelypeli/obj/x86/Debug/cachefile-{CA2FFE4F-20E6-425C-B09B-578352278E8F}-targetpath.txt
r6906 r6968 2 2 Content\norsu.xnb 3 3 Content\tahti.xnb 4 Content\kentta1.xnb5 4 Content\kolikko.xnb 6 5 Content\tyyppi3.xnb 7 6 Content\vihollinen.xnb 7 Content\tyyppi.xnb 8 Content\tyyppi4.xnb 9 Content\tyyppi2.xnb 10 Content\tyyppi5.xnb 11 Content\tyyppi6.xnb 12 Content\kentta1.xnb 13 Content\kentta2.xnb 14 Content\seteli.xnb -
2015/30/TomiM/Tasohyppelypeli/Tasohyppelypeli/TasohyppelypeliContent/TasohyppelypeliContent.contentproj
r6906 r6968 61 61 <Processor>TextureProcessor</Processor> 62 62 </Compile> 63 <Compile Include="kentta1.txt">64 <Name>kentta1</Name>65 <Importer>TextFileImporter</Importer>66 <Processor>TextFileContentProcessor</Processor>67 </Compile>68 63 </ItemGroup> 69 64 <ItemGroup> … … 88 83 </Compile> 89 84 </ItemGroup> 85 <ItemGroup> 86 <Compile Include="tyyppi.png"> 87 <Name>tyyppi</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 </Compile> 91 </ItemGroup> 92 <ItemGroup> 93 <Compile Include="tyyppi4.png"> 94 <Name>tyyppi4</Name> 95 <Importer>TextureImporter</Importer> 96 <Processor>TextureProcessor</Processor> 97 </Compile> 98 </ItemGroup> 99 <ItemGroup> 100 <Compile Include="tyyppi2.png"> 101 <Name>tyyppi2</Name> 102 <Importer>TextureImporter</Importer> 103 <Processor>TextureProcessor</Processor> 104 </Compile> 105 </ItemGroup> 106 <ItemGroup> 107 <Compile Include="tyyppi5.png"> 108 <Name>tyyppi5</Name> 109 <Importer>TextureImporter</Importer> 110 <Processor>TextureProcessor</Processor> 111 </Compile> 112 </ItemGroup> 113 <ItemGroup> 114 <Compile Include="tyyppi6.png"> 115 <Name>tyyppi6</Name> 116 <Importer>TextureImporter</Importer> 117 <Processor>TextureProcessor</Processor> 118 </Compile> 119 </ItemGroup> 120 <ItemGroup> 121 <Compile Include="kentta1.txt"> 122 <Name>kentta1</Name> 123 <Importer>TextFileImporter</Importer> 124 <Processor>TextFileContentProcessor</Processor> 125 </Compile> 126 </ItemGroup> 127 <ItemGroup> 128 <Compile Include="kentta2.png"> 129 <Name>kentta2</Name> 130 <Importer>TextureImporter</Importer> 131 <Processor>TextureProcessor</Processor> 132 </Compile> 133 </ItemGroup> 134 <ItemGroup> 135 <Compile Include="seteli.png"> 136 <Name>seteli</Name> 137 <Importer>TextureImporter</Importer> 138 <Processor>TextureProcessor</Processor> 139 </Compile> 140 </ItemGroup> 90 141 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 91 142 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/30/TomiM/Tasohyppelypeli/Tasohyppelypeli/TasohyppelypeliContent/kentta1.txt
r6934 r6968 8 8 * ########## V 9 9 * V#################### 10 # 11 ## V N ###V10 # S ##### ***** 11 ## * N S ## S #V 12 12 ## ## ### # # # ########**** # 13 *# * # * V # * ## * # *################# V # V *13 V # * # * V # * ## * # *################# V # V * 14 14 ################################################################# -
2015/30/TomiM/Tasohyppelypeli/Tasohyppelypeli/TasohyppelypeliContent/obj/x86/Debug/ContentPipeline.xml
r6934 r6968 30 30 </Item> 31 31 <Item> 32 <Source>kentta1.txt</Source>33 <Name>kentta1</Name>34 <Importer>TextFileImporter</Importer>35 <Processor>TextFileContentProcessor</Processor>36 <Options>None</Options>37 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kentta1.xnb</Output>38 <Time>2015-07-22T14:38:39.4380144+03:00</Time>39 </Item>40 <Item>41 32 <Source>kolikko.png</Source> 42 33 <Name>kolikko</Name> … … 64 55 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\vihollinen.xnb</Output> 65 56 <Time>2015-07-22T12:28:58.4467364+03:00</Time> 57 </Item> 58 <Item> 59 <Source>tyyppi.png</Source> 60 <Name>tyyppi</Name> 61 <Importer>TextureImporter</Importer> 62 <Processor>TextureProcessor</Processor> 63 <Options>None</Options> 64 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi.xnb</Output> 65 <Time>2015-07-23T10:34:25.9361042+03:00</Time> 66 </Item> 67 <Item> 68 <Source>tyyppi4.png</Source> 69 <Name>tyyppi4</Name> 70 <Importer>TextureImporter</Importer> 71 <Processor>TextureProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi4.xnb</Output> 74 <Time>2015-07-23T10:59:10.3225042+03:00</Time> 75 </Item> 76 <Item> 77 <Source>tyyppi2.png</Source> 78 <Name>tyyppi2</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi2.xnb</Output> 83 <Time>2015-07-23T10:55:16.5603042+03:00</Time> 84 </Item> 85 <Item> 86 <Source>tyyppi5.png</Source> 87 <Name>tyyppi5</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi5.xnb</Output> 92 <Time>2015-07-23T10:47:22.0473042+03:00</Time> 93 </Item> 94 <Item> 95 <Source>tyyppi6.png</Source> 96 <Name>tyyppi6</Name> 97 <Importer>TextureImporter</Importer> 98 <Processor>TextureProcessor</Processor> 99 <Options>None</Options> 100 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi6.xnb</Output> 101 <Time>2015-07-23T10:53:49.6769042+03:00</Time> 102 </Item> 103 <Item> 104 <Source>kentta1.txt</Source> 105 <Name>kentta1</Name> 106 <Importer>TextFileImporter</Importer> 107 <Processor>TextFileContentProcessor</Processor> 108 <Options>None</Options> 109 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kentta1.xnb</Output> 110 <Time>2015-07-23T11:48:20.8309042+03:00</Time> 111 </Item> 112 <Item> 113 <Source>kentta2.png</Source> 114 <Name>kentta2</Name> 115 <Importer>TextureImporter</Importer> 116 <Processor>TextureProcessor</Processor> 117 <Options>None</Options> 118 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kentta2.xnb</Output> 119 <Time>2015-07-23T11:26:14.6714042+03:00</Time> 120 </Item> 121 <Item> 122 <Source>seteli.png</Source> 123 <Name>seteli</Name> 124 <Importer>TextureImporter</Importer> 125 <Processor>TextureProcessor</Processor> 126 <Options>None</Options> 127 <Output>C:\MyTemp\TomiM\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\seteli.xnb</Output> 128 <Time>2015-07-23T11:44:30.1477042+03:00</Time> 66 129 </Item> 67 130 <BuildSuccessful>true</BuildSuccessful>
Note: See TracChangeset
for help on using the changeset viewer.