Changeset 6654 for 2015/27/SampoR
- Timestamp:
- 2015-07-01 11:49:22 (8 years ago)
- Location:
- 2015/27/SampoR/Pommipeli
- Files:
-
- 3 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/Pommipeli.cs
r6613 r6654 9 9 public class Pommipeli : PhysicsGame 10 10 { 11 const double nopeus = 2 00;12 const double hyppyNopeus = 7 50;11 const double nopeus = 250; 12 const double hyppyNopeus = 780; 13 13 const int RUUDUN_KOKO = 40; 14 14 … … 17 17 Image pelaajanKuva = LoadImage("sotilas"); 18 18 Image pommiKuva = LoadImage("pommi"); 19 Image vihollisenKuva = LoadImage("Vihollinen"); 19 20 20 21 SoundEffect maaliAani = LoadSoundEffect("maali"); … … 38 39 kentta.SetTileMethod('*', LisaaPommi); 39 40 kentta.SetTileMethod('S', LisaaPelaaja); 41 kentta.SetTileMethod('V', LisaaVihollinen); 40 42 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 41 43 Level.CreateBorders(); … … 65 67 pelaaja1 = new PlatformCharacter(leveys, korkeus); 66 68 pelaaja1.Position = paikka; 67 pelaaja1.Mass = 4.0;69 pelaaja1.Mass = 6.0; 68 70 pelaaja1.Image = pelaajanKuva; 69 71 AddCollisionHandler(pelaaja1, "pommi", TormaaPommiin); … … 72 74 pelaaja1.Weapon = new AssaultRifle(20.0, 20.0); 73 75 pelaaja1.Weapon.IsVisible = false; 76 } 77 78 void LisaaVihollinen(Vector paikka, double leveys, double korkeus) 79 { 80 PlatformCharacter vihollinen = new PlatformCharacter(leveys, korkeus); 81 vihollinen.Position = paikka; 82 vihollinen.Image = vihollisenKuva; 83 vihollinen.Tag = "vihollinen"; 84 Add(vihollinen); 74 85 } 75 86 … … 115 126 void AmmuAseella(AssaultRifle ase) 116 127 { 117 ase.Shoot(); 128 129 PhysicsObject ammus = ase.Shoot(); 130 if (ammus != null) 131 { 132 ammus.LifetimeLeft = new TimeSpan(0, 0, 2); 133 AddCollisionHandler(ammus, delegate(PhysicsObject a, PhysicsObject b) 134 { 135 a.Destroy(); 136 }); 137 AddCollisionHandler(ammus, "pommi", TormaaPommiin); 138 139 } 140 118 141 119 142 -
2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/Pommipeli.csproj.Debug.cachefile
r6613 r6654 1 1 Content\maali.xnb 2 2 Content\tahti.xnb 3 Content\kentta1.xnb4 3 Content\pommi.xnb 5 4 Content\sotilas.xnb 5 Content\kentta1.xnb 6 Content\Vihollinen.xnb -
2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/obj/x86/Debug/ContentPipeline-{E66DD545-885E-4E0E-8EF2-6E1200871AC7}.xml
r6613 r6654 9 9 <Options>None</Options> 10 10 <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\maali.xnb</Output> 11 <Time>2015-0 6-30T11:04:40.8393338+03:00</Time>11 <Time>2015-07-01T09:54:01.6896541+03:00</Time> 12 12 </Item> 13 13 <Item> … … 18 18 <Options>None</Options> 19 19 <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\tahti.xnb</Output> 20 <Time>2015-06-30T11:04:40.841334+03:00</Time> 20 <Time>2015-07-01T09:54:01.8456441+03:00</Time> 21 </Item> 22 <Item> 23 <Source>pommi.png</Source> 24 <Name>pommi</Name> 25 <Importer>TextureImporter</Importer> 26 <Processor>TextureProcessor</Processor> 27 <Options>None</Options> 28 <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\pommi.xnb</Output> 29 <Time>2015-07-01T09:54:01.7052531+03:00</Time> 30 </Item> 31 <Item> 32 <Source>sotilas.png</Source> 33 <Name>sotilas</Name> 34 <Importer>TextureImporter</Importer> 35 <Processor>TextureProcessor</Processor> 36 <Options>None</Options> 37 <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\sotilas.xnb</Output> 38 <Time>2015-07-01T09:54:01.7052531+03:00</Time> 21 39 </Item> 22 40 <Item> … … 27 45 <Options>None</Options> 28 46 <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\kentta1.xnb</Output> 29 <Time>2015-0 6-30T14:38:44.938222+03:00</Time>47 <Time>2015-07-01T11:44:18.7293209+03:00</Time> 30 48 </Item> 31 49 <Item> 32 <Source> pommi.png</Source>33 <Name> pommi</Name>50 <Source>Vihollinen.png</Source> 51 <Name>Vihollinen</Name> 34 52 <Importer>TextureImporter</Importer> 35 53 <Processor>TextureProcessor</Processor> 36 54 <Options>None</Options> 37 <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\pommi.xnb</Output> 38 <Time>2015-06-30T12:53:31.0375985+03:00</Time> 39 </Item> 40 <Item> 41 <Source>sotilas.png</Source> 42 <Name>sotilas</Name> 43 <Importer>TextureImporter</Importer> 44 <Processor>TextureProcessor</Processor> 45 <Options>None</Options> 46 <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\sotilas.xnb</Output> 47 <Time>2015-06-30T14:38:00.195646+03:00</Time> 55 <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\Vihollinen.xnb</Output> 56 <Time>2015-07-01T11:42:51.9715209+03:00</Time> 48 57 </Item> 49 58 <BuildSuccessful>true</BuildSuccessful> … … 66 75 <Assembly> 67 76 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 68 <Value>2011-09-01T1 7:22:30+03:00</Value>77 <Value>2011-09-01T16:22:30+03:00</Value> 69 78 </Assembly> 70 79 <Assembly> 71 80 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 72 <Value>2011-09-01T1 7:22:30+03:00</Value>81 <Value>2011-09-01T16:22:30+03:00</Value> 73 82 </Assembly> 74 83 <Assembly> 75 84 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 76 <Value>2011-09-01T1 7:22:30+03:00</Value>85 <Value>2011-09-01T16:22:30+03:00</Value> 77 86 </Assembly> 78 87 <Assembly> 79 88 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 80 <Value>2011-09-01T1 7:22:30+03:00</Value>89 <Value>2011-09-01T16:22:30+03:00</Value> 81 90 </Assembly> 82 91 <Assembly> 83 92 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 84 <Value>2011-09-01T1 7:22:30+03:00</Value>93 <Value>2011-09-01T16:22:30+03:00</Value> 85 94 </Assembly> 86 95 <Assembly> 87 96 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 88 <Value>2011-09-01T1 7:22:30+03:00</Value>97 <Value>2011-09-01T16:22:30+03:00</Value> 89 98 </Assembly> 90 99 <Assembly> … … 94 103 <Assembly> 95 104 <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 96 <Value>2012-0 3-16T14:34:20.6136434+02:00</Value>105 <Value>2012-07-09T09:26:00.6586946+03:00</Value> 97 106 </Assembly> 98 107 </Assemblies> -
2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/obj/x86/Debug/Pommipeli.csproj.FileListAbsolute.txt
r6613 r6654 12 12 C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\pommi.xnb 13 13 C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\sotilas.xnb 14 C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\Vihollinen.xnb -
2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/obj/x86/Debug/cachefile-{E66DD545-885E-4E0E-8EF2-6E1200871AC7}-targetpath.txt
r6613 r6654 1 1 Content\maali.xnb 2 2 Content\tahti.xnb 3 Content\kentta1.xnb4 3 Content\pommi.xnb 5 4 Content\sotilas.xnb 5 Content\kentta1.xnb 6 Content\Vihollinen.xnb -
2015/27/SampoR/Pommipeli/Pommipeli/PommipeliContent/PommipeliContent.contentproj
r6613 r6654 76 76 </Compile> 77 77 </ItemGroup> 78 <ItemGroup> 79 <Compile Include="Vihollinen.png"> 80 <Name>Vihollinen</Name> 81 <Importer>TextureImporter</Importer> 82 <Processor>TextureProcessor</Processor> 83 </Compile> 84 </ItemGroup> 78 85 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 79 86 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/27/SampoR/Pommipeli/Pommipeli/PommipeliContent/kentta1.txt
r6613 r6654 1 2 1 *** 2 ### 3 3 4 * *5 4 ** * V 5 ### ## ## 6 6 7 **8 ## ####7 ** ** V* 8 ## ## ## 9 9 10 * * **11 ## ## ## ##10 *V ** ** 11 ## ## ## # 12 12 13 * * **14 # # #### ## ##13 * * * * ** ** 14 # # ## ## ## 15 15 16 S17 ###################### 16 S V 17 ########################
Note: See TracChangeset
for help on using the changeset viewer.