Changeset 5845
- Timestamp:
- 2015-05-16 15:01:19 (8 years ago)
- Location:
- 2014/koodauskerho/38/AakeR
- Files:
-
- 12 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/koodauskerho/38/AakeR/Turborace/Turborace/Turborace.cs
r5834 r5845 6 6 using Jypeli.Effects; 7 7 using Jypeli.Widgets; 8 using Jypeli.Content; 8 9 9 10 public class Alus : PhysicsObject … … 20 21 private AssaultRifle ase; 21 22 public AssaultRifle Ase { get { return ase; } } 22 23 23 24 public Alus(double leveys, double korkeus) 24 25 : base(leveys, korkeus) … … 27 28 ase.IsVisible = false; 28 29 ase.ProjectileCollision = PanosOsui; 30 //ase.InfiniteAmmo = true; 29 31 Add(ase); 32 33 30 34 } 31 35 … … 36 40 { 37 41 Alus alus = (Alus)kohde; 38 alus.elamaLaskuri.Value -= 4;42 alus.elamaLaskuri.Value -= 3; 39 43 40 44 } … … 73 77 Image laserkuplakuva = LoadImage("LaserKupla"); 74 78 Image laserkuva = LoadImage("Laser"); 79 Image aluspalakuva = LoadImage("AlusPalanen"); 80 Image rajahdyskuva = LoadImage("Rajahdys"); 81 Image lasipalakuva = LoadImage("Lasipala"); 82 Image isolaserkuva1 = LoadImage("IsoLaser1"); 83 Image isolaserkuva2 = LoadImage("IsoLaser2"); 84 Image isolaserkuva3 = LoadImage("IsoLaser3"); 75 85 76 86 Alus alus1, alus2, alus3, alus4; … … 181 191 Add(elama1); 182 192 193 183 194 elama2 = new ProgressBar(50, 5); 184 195 elama2.Position = alus2.Position + new Vector(0, 30); … … 210 221 palkkilaskuri.Start(); 211 222 223 alus1.Destroyed += delegate { elama1.Destroy(); }; 224 alus2.Destroyed += delegate { elama2.Destroy(); }; 225 alus3.Destroyed += delegate { elama3.Destroy(); }; 226 alus4.Destroyed += delegate { elama4.Destroy(); }; 212 227 213 228 … … 216 231 public void AmmuLaser(Alus alus) 217 232 { 218 PhysicsObject panos = alus.Ase.Shoot(); 219 //panos.Image = laserkuva; 233 PhysicsObject panos; 234 if (alus.AmmoLaskuri.Value > 0) 235 { 236 panos = alus.Ase.Shoot(); 237 238 if (panos != null) 239 { 240 alus.AmmoLaskuri.Value--; 241 panos.Image = laserkuva; 242 panos.AbsoluteAngle = alus.AbsoluteAngle - Angle.FromDegrees(90); 243 244 } 245 246 } 247 220 248 } 221 249 … … 269 297 { 270 298 Alus alus = new Alus(60, 40); 299 alus.ElamaLaskuri.LowerLimit += delegate 300 { 301 alus.Destroy(); int pMaxMaara = 100; 302 // Alustetaan räjähdysjärjestelmä 303 // Parametrit: 304 // * kuva: mitä tekstuuria räjähdyksen 305 // hiukkasten halutaan käyttävän 306 // * pMaxMaara: räjähdyksen käyttämien 307 // hiukkasten eli partikkeleiden maksimimäärä 308 ExplosionSystem rajahdys = new ExplosionSystem(LoadImage("AlusPalanen"), 100); 309 rajahdys.MinScale = 20; 310 rajahdys.MaxScale = 25; 311 312 // Lisätään järjestelmä peliin 313 Add(rajahdys); 314 315 // "Käynnistetään" räjähdys 316 rajahdys.AddEffect(alus.X, alus.Y, 50); 317 318 319 ExplosionSystem rajahdys2 = new ExplosionSystem(LoadImage("Rajahdys"), 20); 320 rajahdys2.MinScale = 50; 321 rajahdys2.MaxScale = 100; 322 323 // Lisätään järjestelmä peliin 324 Add(rajahdys2); 325 326 // "Käynnistetään" räjähdys 327 rajahdys2.AddEffect(alus.X, alus.Y, 16); 328 329 ExplosionSystem rajahdys3 = new ExplosionSystem(LoadImage("Lasipala"), 8); 330 rajahdys3.MinScale = 30; 331 rajahdys3.MaxScale = 30; 332 333 // Lisätään järjestelmä peliin 334 Add(rajahdys3); 335 336 // "Käynnistetään" räjähdys 337 rajahdys3.AddEffect(alus.X, alus.Y, 50); 338 339 }; 271 340 alus.Shape = Shape.Rectangle; 272 341 alus.Image = kuva; -
2014/koodauskerho/38/AakeR/Turborace/Turborace/Turborace.csproj.Debug.cachefile
r5834 r5845 8 8 Content\LaserKupla.xnb 9 9 Content\Laser.xnb 10 Content\AlusPalanen.xnb 11 Content\Rajahdys.xnb 12 Content\Lasipala.xnb 13 Content\IsoLaser1.xnb 14 Content\IsoLaser2.xnb 15 Content\IsoLaser3.xnb -
2014/koodauskerho/38/AakeR/Turborace/Turborace/obj/x86/Debug/ContentPipeline-{F25903C4-EB60-483B-922D-0B23274E0822}.xml
r5834 r5845 83 83 <Time>2015-04-18T14:10:45.3012469+03:00</Time> 84 84 </Item> 85 <Item> 86 <Source>AlusPalanen.png</Source> 87 <Name>AlusPalanen</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\AlusPalanen.xnb</Output> 92 <Time>2015-05-16T13:14:44.2921008+03:00</Time> 93 </Item> 94 <Item> 95 <Source>Rajahdys.png</Source> 96 <Name>Rajahdys</Name> 97 <Importer>TextureImporter</Importer> 98 <Processor>TextureProcessor</Processor> 99 <Options>None</Options> 100 <Output>C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\Rajahdys.xnb</Output> 101 <Time>2015-05-16T14:12:21.2946836+03:00</Time> 102 </Item> 103 <Item> 104 <Source>Lasipala.png</Source> 105 <Name>Lasipala</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 <Options>None</Options> 109 <Output>C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\Lasipala.xnb</Output> 110 <Time>2015-05-16T14:16:43.0010836+03:00</Time> 111 </Item> 112 <Item> 113 <Source>IsoLaser1.png</Source> 114 <Name>IsoLaser1</Name> 115 <Importer>TextureImporter</Importer> 116 <Processor>TextureProcessor</Processor> 117 <Options>None</Options> 118 <Output>C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\IsoLaser1.xnb</Output> 119 <Time>2015-05-16T14:43:49.8224836+03:00</Time> 120 </Item> 121 <Item> 122 <Source>IsoLaser2.png</Source> 123 <Name>IsoLaser2</Name> 124 <Importer>TextureImporter</Importer> 125 <Processor>TextureProcessor</Processor> 126 <Options>None</Options> 127 <Output>C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\IsoLaser2.xnb</Output> 128 <Time>2015-05-16T14:44:05.7060836+03:00</Time> 129 </Item> 130 <Item> 131 <Source>IsoLaser3.png</Source> 132 <Name>IsoLaser3</Name> 133 <Importer>TextureImporter</Importer> 134 <Processor>TextureProcessor</Processor> 135 <Options>None</Options> 136 <Output>C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\IsoLaser3.xnb</Output> 137 <Time>2015-05-16T14:44:27.2572836+03:00</Time> 138 </Item> 85 139 <BuildSuccessful>true</BuildSuccessful> 86 140 <Settings> -
2014/koodauskerho/38/AakeR/Turborace/Turborace/obj/x86/Debug/Turborace.csproj.FileListAbsolute.txt
r5834 r5845 46 46 C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\LaserKupla.xnb 47 47 C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\Laser.xnb 48 C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\AlusPalanen.xnb 49 C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\Rajahdys.xnb 50 C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\Lasipala.xnb 51 C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\IsoLaser1.xnb 52 C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\IsoLaser2.xnb 53 C:\MyTemp\AakeRu\Turborace\Turborace\bin\x86\Debug\Content\IsoLaser3.xnb -
2014/koodauskerho/38/AakeR/Turborace/Turborace/obj/x86/Debug/cachefile-{F25903C4-EB60-483B-922D-0B23274E0822}-targetpath.txt
r5834 r5845 8 8 Content\LaserKupla.xnb 9 9 Content\Laser.xnb 10 Content\AlusPalanen.xnb 11 Content\Rajahdys.xnb 12 Content\Lasipala.xnb 13 Content\IsoLaser1.xnb 14 Content\IsoLaser2.xnb 15 Content\IsoLaser3.xnb -
2014/koodauskerho/38/AakeR/Turborace/TurboraceContent/TurboraceContent.contentproj
r5834 r5845 104 104 </Compile> 105 105 </ItemGroup> 106 <ItemGroup> 107 <Compile Include="AlusPalanen.png"> 108 <Name>AlusPalanen</Name> 109 <Importer>TextureImporter</Importer> 110 <Processor>TextureProcessor</Processor> 111 </Compile> 112 </ItemGroup> 113 <ItemGroup> 114 <Compile Include="Rajahdys.png"> 115 <Name>Rajahdys</Name> 116 <Importer>TextureImporter</Importer> 117 <Processor>TextureProcessor</Processor> 118 </Compile> 119 </ItemGroup> 120 <ItemGroup> 121 <Compile Include="Lasipala.png"> 122 <Name>Lasipala</Name> 123 <Importer>TextureImporter</Importer> 124 <Processor>TextureProcessor</Processor> 125 </Compile> 126 </ItemGroup> 127 <ItemGroup> 128 <Compile Include="IsoLaser1.png"> 129 <Name>IsoLaser1</Name> 130 <Importer>TextureImporter</Importer> 131 <Processor>TextureProcessor</Processor> 132 </Compile> 133 <Compile Include="IsoLaser2.png"> 134 <Name>IsoLaser2</Name> 135 <Importer>TextureImporter</Importer> 136 <Processor>TextureProcessor</Processor> 137 </Compile> 138 <Compile Include="IsoLaser3.png"> 139 <Name>IsoLaser3</Name> 140 <Importer>TextureImporter</Importer> 141 <Processor>TextureProcessor</Processor> 142 </Compile> 143 </ItemGroup> 106 144 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 107 145 <!-- 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.