Changeset 5259
- Timestamp:
- 2014-07-02 09:30:22 (9 years ago)
- Location:
- 2014/27/JouniP_esimerkki/Pongpeli
- Files:
-
- 5 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/27/JouniP_esimerkki/Pongpeli/Pongpeli/Pongpeli/Pongpeli.cs
r5221 r5259 24 24 pallo.Hit(impulssi); 25 25 // AddCollisionHandler(pallo, "maila", CollisionHandler.ExplodeTarget(20.0, false)); 26 AddCollisionHandler(pallo, "maila", VaihdaPallonVaria);27 AddCollisionHandler(pallo, "maila", KahdennaPallo);26 // AddCollisionHandler(pallo, "maila", VaihdaPallonVaria); 27 // AddCollisionHandler(pallo, "maila", KahdennaPallo); 28 28 LisaaOhjaimet(); 29 29 30 30 31 } 32 33 PhysicsObject LuoPallo(double x, double y) 34 { 35 PhysicsObject pallo = new PhysicsObject(40, 40); 36 pallo.Shape = Shape.Circle; 37 pallo.X = x; 38 pallo.Y = y; 39 pallo.Restitution = 1.0; 40 Add(pallo); 41 return pallo; 31 42 } 32 43 … … 41 52 } 42 53 43 PhysicsObject LuoPallo(double x, double y) 44 { 45 PhysicsObject pallo = new PhysicsObject(40, 40); 46 pallo.Shape = Shape.Circle; 47 pallo.X = x; 48 pallo.Y = y; 49 pallo.Restitution = 1.0; 50 Add(pallo); 51 return pallo; 52 } 54 53 55 54 56 PhysicsObject LuoMaila(double x, double y) … … 67 69 { 68 70 // luodaan peliin pallo: 69 pallo = LuoPallo(0, 0); 71 pallo = LuoPallo(0.0, 0.0); 72 pallo.Image = LoadImage("ukkeli"); 73 pallo.Width = 100; 74 pallo.Height = 100; 75 // luodaan monta palloa: 76 int i = 0; 77 while (i < 50) 78 { 79 // PhysicsObject pallo2 = LuoPallo(50.0, 0.0); 80 // PhysicsObject pallo2 = LuoPallo(RandomGen.NextDouble(-100.0, 100.0) , 0.0); 81 // PhysicsObject pallo2 = LuoPallo(RandomGen.NextDouble(Level.Left, Level.Right), 0.0); 82 PhysicsObject pallo2 = LuoPallo(RandomGen.NextDouble(Level.Left, Level.Right), RandomGen.NextDouble(Level.Bottom, Level.Top)); 83 84 pallo2.Color = RandomGen.NextColor(); 85 i++; 86 } 87 88 89 70 90 //pallo = new PhysicsObject(40.0, 40.0); 71 91 //pallo.Shape = Shape.Circle; … … 81 101 // luodaan peliin reunat: 82 102 Level.CreateBorders(1.0, false); 83 Level.Background.Color = Color. Black;103 Level.Background.Color = Color.Olive; 84 104 85 105 } -
2014/27/JouniP_esimerkki/Pongpeli/Pongpeli/Pongpeli/obj/x86/Debug/Pongpeli.csproj.FileListAbsolute.txt
r5193 r5259 16 16 C:\MyTemp\JouniP_esimerkki\Pongpeli\Pongpeli\Pongpeli\obj\x86\Debug\Pongpeli.exe 17 17 C:\MyTemp\JouniP_esimerkki\Pongpeli\Pongpeli\Pongpeli\obj\x86\Debug\Pongpeli.pdb 18 C:\MyTemp\JouniP_esimerkki\Pongpeli\Pongpeli\Pongpeli\bin\x86\Debug\Content\ukkeli.xnb -
2014/27/JouniP_esimerkki/Pongpeli/Pongpeli/PongpeliContent/PongpeliContent.contentproj
r5192 r5259 44 44 <Reference Include="TextFileContentExtension" /> 45 45 </ItemGroup> 46 <ItemGroup> 47 <Compile Include="ukkeli.png"> 48 <Name>ukkeli</Name> 49 <Importer>TextureImporter</Importer> 50 <Processor>TextureProcessor</Processor> 51 </Compile> 52 </ItemGroup> 46 53 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 47 54 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2014/27/JouniP_esimerkki/Pongpeli/Pongpeli/PongpeliContent/obj/x86/Debug/ContentPipeline.xml
r5193 r5259 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item> 5 <Source>ukkeli.png</Source> 6 <Name>ukkeli</Name> 7 <Importer>TextureImporter</Importer> 8 <Processor>TextureProcessor</Processor> 9 <Options>None</Options> 10 <Output>C:\MyTemp\JouniP_esimerkki\Pongpeli\Pongpeli\Pongpeli\bin\x86\Debug\Content\ukkeli.xnb</Output> 11 <Time>2014-07-02T09:27:45.356574+03:00</Time> 12 </Item> 4 13 <BuildSuccessful>true</BuildSuccessful> 5 14 <Settings> … … 15 24 <Assemblies> 16 25 <Assembly> 26 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 27 <Value>2014-06-10T15:50:44+03:00</Value> 28 </Assembly> 29 <Assembly> 30 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 31 <Value>2010-08-23T12:41:18+03:00</Value> 32 </Assembly> 33 <Assembly> 34 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 35 <Value>2010-08-23T12:41:18+03:00</Value> 36 </Assembly> 37 <Assembly> 38 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 39 <Value>2010-08-23T12:41:18+03:00</Value> 40 </Assembly> 41 <Assembly> 42 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 43 <Value>2010-08-23T12:41:18+03:00</Value> 44 </Assembly> 45 <Assembly> 46 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 47 <Value>2010-08-23T12:41:18+03:00</Value> 48 </Assembly> 49 <Assembly> 50 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 51 <Value>2010-08-23T12:41:18+03:00</Value> 52 </Assembly> 53 <Assembly> 17 54 <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> 18 55 <Value>2012-04-04T09:57:00.7719393+03:00</Value>
Note: See TracChangeset
for help on using the changeset viewer.