Changeset 847
- Timestamp:
- 2010-06-15 11:31:58 (12 years ago)
- Location:
- 2010/23/hniemi/ShootEmUp/ShootEmUp
- Files:
-
- 17 added
- 5 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/23/hniemi/ShootEmUp/ShootEmUp/Alus.cs
r823 r847 57 57 } 58 58 59 59 60 public void SetWeapon(Weapon ase) 60 61 { 61 62 if (kaytossaOlevaAse != null) kaytossaOlevaAse.Destroy(); 63 ase.IsVisible = false; 62 64 this.Add(ase); 63 65 kaytossaOlevaAse = ase; … … 69 71 public void Shoot() 70 72 { 71 if (kaytossaOlevaAse != null) 72 { 73 kaytossaOlevaAse.Shoot().Angle = this.Angle; 74 } 73 PhysicsObject panos = kaytossaOlevaAse.Shoot(); 74 if ( panos != null) { 75 panos.Angle = this.Angle; 76 } 77 75 78 } 76 79 -
2010/23/hniemi/ShootEmUp/ShootEmUp/Content/Content.contentproj
r823 r847 27 27 </ItemGroup> 28 28 <ItemGroup> 29 <Compile Include=" pelaajaAlus.png">30 <Name> pelaajaAlus</Name>29 <Compile Include="vihollinen2.png"> 30 <Name>vihollinen2</Name> 31 31 <Importer>TextureImporter</Importer> 32 32 <Processor>TextureProcessor</Processor> … … 61 61 </Compile> 62 62 </ItemGroup> 63 <ItemGroup> 64 <Compile Include="sankarialus\sankarialusThrust1.png"> 65 <Name>sankarialusThrust1</Name> 66 <Importer>TextureImporter</Importer> 67 <Processor>TextureProcessor</Processor> 68 </Compile> 69 </ItemGroup> 70 <ItemGroup> 71 <Compile Include="sankarialus\sankarialusThrust2.png"> 72 <Name>sankarialusThrust2</Name> 73 <Importer>TextureImporter</Importer> 74 <Processor>TextureProcessor</Processor> 75 </Compile> 76 </ItemGroup> 77 <ItemGroup> 78 <Compile Include="sankarialus\sankarialusStop.png"> 79 <Name>sankarialusStop</Name> 80 <Importer>TextureImporter</Importer> 81 <Processor>TextureProcessor</Processor> 82 </Compile> 83 </ItemGroup> 84 <ItemGroup> 85 <Compile Include="sankarialus\sankarialusStopShield.png"> 86 <Name>sankarialusStopShield</Name> 87 <Importer>TextureImporter</Importer> 88 <Processor>TextureProcessor</Processor> 89 </Compile> 90 </ItemGroup> 91 <ItemGroup> 92 <Compile Include="vihollinen3.png"> 93 <Name>vihollinen3</Name> 94 <Importer>TextureImporter</Importer> 95 <Processor>TextureProcessor</Processor> 96 </Compile> 97 </ItemGroup> 63 98 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 64 99 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2010/23/hniemi/ShootEmUp/ShootEmUp/Content/obj/x86/Debug/ContentPipeline.xml
r823 r847 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item>5 <Source>pelaajaAlus.png</Source>6 <Name>pelaajaAlus</Name>7 <Importer>TextureImporter</Importer>8 <Processor>TextureProcessor</Processor>9 <Options>None</Options>10 <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\pelaajaAlus.xnb</Output>11 <Time>2010-06-11T19:57:36+03:00</Time>12 </Item>13 4 <Item> 14 5 <Source>vihollinen1.png</Source> … … 46 37 <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\ohjus.xnb</Output> 47 38 <Time>2010-06-14T15:13:56.2405151+03:00</Time> 39 </Item> 40 <Item> 41 <Source>vihollinen2.png</Source> 42 <Name>vihollinen2</Name> 43 <Importer>TextureImporter</Importer> 44 <Processor>TextureProcessor</Processor> 45 <Options>None</Options> 46 <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen2.xnb</Output> 47 <Time>2010-06-11T19:57:36+03:00</Time> 48 </Item> 49 <Item> 50 <Source>sankarialus\sankarialusThrust1.png</Source> 51 <Name>sankarialus\sankarialusThrust1</Name> 52 <Importer>TextureImporter</Importer> 53 <Processor>TextureProcessor</Processor> 54 <Options>None</Options> 55 <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusThrust1.xnb</Output> 56 <Time>2010-06-15T09:37:30.7697918+03:00</Time> 57 </Item> 58 <Item> 59 <Source>sankarialus\sankarialusThrust2.png</Source> 60 <Name>sankarialus\sankarialusThrust2</Name> 61 <Importer>TextureImporter</Importer> 62 <Processor>TextureProcessor</Processor> 63 <Options>None</Options> 64 <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusThrust2.xnb</Output> 65 <Time>2010-06-15T09:36:59.4334098+03:00</Time> 66 </Item> 67 <Item> 68 <Source>sankarialus\sankarialusStop.png</Source> 69 <Name>sankarialus\sankarialusStop</Name> 70 <Importer>TextureImporter</Importer> 71 <Processor>TextureProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusStop.xnb</Output> 74 <Time>2010-06-15T09:38:14.9813231+03:00</Time> 75 </Item> 76 <Item> 77 <Source>sankarialus\sankarialusStopShield.png</Source> 78 <Name>sankarialus\sankarialusStopShield</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusStopShield.xnb</Output> 83 <Time>2010-06-15T09:38:20.1289043+03:00</Time> 84 </Item> 85 <Item> 86 <Source>vihollinen3.png</Source> 87 <Name>vihollinen3</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen3.xnb</Output> 92 <Time>2010-06-15T11:22:42.3386343+03:00</Time> 48 93 </Item> 49 94 <BuildSuccessful>true</BuildSuccessful> -
2010/23/hniemi/ShootEmUp/ShootEmUp/Peli.cs
r823 r847 14 14 15 15 //Liikkumisnopeudet 16 private const double nopeus= 300;17 private Vector nopeusPysty = new Vector(0, nopeus);18 private Vector nopeusVaaka = new Vector( nopeus, 0);16 private const double NOPEUS = 300; 17 private Vector nopeusPysty = new Vector(0,NOPEUS); 18 private Vector nopeusVaaka = new Vector(NOPEUS, 0); 19 19 20 20 //Kentän rakenne … … 27 27 28 28 //Viholliset 29 private const int VIHOLLISKUVIA = 1;29 private const int VIHOLLISKUVIA = 3; 30 30 31 31 //Statistiikka … … 71 71 LataaKontrollit(pelaajaAlus); 72 72 //LataaTausta(kentanNumero); 73 //LataaViholliset();73 LataaViholliset(); 74 74 LataaHUD(); 75 75 } … … 104 104 pelaajaAlus = new Alus(40, 50, 10); 105 105 pelaajaAlus.Shape = Shapes.Triangle; 106 pelaajaAlus.Image = LoadImage(" pelaajaAlus");106 pelaajaAlus.Image = LoadImage("sankarialus/sankarialusStop"); 107 107 108 108 pelaajaAlus.Angle += Angle.Degrees(90); … … 121 121 ((Missile)weapons[1]).MissileCollision = MissileOsuu; 122 122 123 //Add(weapons[0]); 124 //Add(weapons[1]); 123 Add(pelaajaAlus); 125 124 pelaajaAlus.SetWeapon(weapons[1]); 126 Add(pelaajaAlus);125 127 126 AddCollisionHandler(pelaajaAlus, PelaajaTormaa); 128 127 … … 158 157 void Liikuta(Alus alus, Vector suunta) 159 158 { 160 if (- nopeus < alus.Velocity.Y && alus.Velocity.Y < nopeus&& suunta.Y != 0)159 if (-NOPEUS < alus.Velocity.Y && alus.Velocity.Y < NOPEUS && suunta.Y != 0) 161 160 { 162 161 alus.Velocity += suunta; 163 162 } 164 if (- nopeus < alus.Velocity.X && alus.Velocity.X < nopeus&& suunta.X != 0)163 if (-NOPEUS < alus.Velocity.X && alus.Velocity.X < NOPEUS && suunta.X != 0) 165 164 { 166 165 alus.Velocity += suunta; … … 372 371 void MissileOsuu(PhysicsObject missile, PhysicsObject toinen) 373 372 { 374 //missile.Destroy();373 if (toinen != pelaajaAlus) missile.Destroy(); 375 374 376 375 if (toinen.Tag.ToString() == "vihollinen") -
2010/23/hniemi/ShootEmUp/ShootEmUp/ShootEmUp.csproj.Debug.cachefile
r823 r847 1 Content\pelaajaAlus.xnb2 1 Content\vihollinen1.xnb 3 2 Content\ringout.xnb 4 3 Content\pum.xnb 5 4 Content\ohjus.xnb 5 Content\vihollinen2.xnb 6 Content\sankarialus\sankarialusThrust1.xnb 7 Content\sankarialus\sankarialusThrust2.xnb 8 Content\sankarialus\sankarialusStop.xnb 9 Content\sankarialus\sankarialusStopShield.xnb 10 Content\vihollinen3.xnb -
2010/23/hniemi/ShootEmUp/ShootEmUp/Weapons.cs
r823 r847 82 82 protected override PhysicsObject OnShoot() 83 83 { 84 if (IsAddedToGame) Game.MessageDisplay.Add("Pelissä on"); 85 PhysicsObject projectile = new PhysicsObject(Level * 80, Level * 40); 84 PhysicsObject projectile = new PhysicsObject(Level * 30, Level * 15); 86 85 projectile.Shape = Shapes.Triangle; 87 86 projectile.Position = this.Position; -
2010/23/hniemi/ShootEmUp/ShootEmUp/obj/x86/Debug/ShootEmUp.csproj.FileListAbsolute.txt
r823 r847 11 11 D:\Opiskelu\kurssit\NPO2010\ShootEmUp\ShootEmUp\obj\x86\Debug\ShootEmUp.csproj.GenerateResource.Cache 12 12 D:\Opiskelu\kurssit\NPO2010\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen1.xnb 13 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\pelaajaAlus.xnb14 13 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen1.xnb 15 14 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\ShootEmUp.exe … … 25 24 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\pum.xnb 26 25 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\ohjus.xnb 26 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen2.xnb 27 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusThrust1.xnb 28 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusThrust2.xnb 29 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusStop.xnb 30 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\sankarialus\sankarialusStopShield.xnb 31 C:\MyTemp\hniemi\ShootEmUp\ShootEmUp\bin\x86\Debug\Content\vihollinen3.xnb -
2010/23/hniemi/ShootEmUp/ShootEmUp/obj/x86/Debug/cachefile-{72efbe00-2f1f-4e1d-9867-af4a5a7cd89e}-targetpath.txt
r823 r847 1 Content\pelaajaAlus.xnb2 1 Content\vihollinen1.xnb 3 2 Content\ringout.xnb 4 3 Content\pum.xnb 5 4 Content\ohjus.xnb 5 Content\vihollinen2.xnb 6 Content\sankarialus\sankarialusThrust1.xnb 7 Content\sankarialus\sankarialusThrust2.xnb 8 Content\sankarialus\sankarialusStop.xnb 9 Content\sankarialus\sankarialusStopShield.xnb 10 Content\vihollinen3.xnb
Note: See TracChangeset
for help on using the changeset viewer.