Changeset 8110
- Timestamp:
- 2016-07-26 12:52:39 (7 years ago)
- Location:
- 2016/30/luennot/Pallopeli
- Files:
-
- 5 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/30/luennot/Pallopeli/Pallopeli/Pallopeli/Pallopeli.cs
r8102 r8110 9 9 public class Pallopeli : PhysicsGame 10 10 { 11 PhysicsObject pelaaja1; 12 Image pelaajanKuva = LoadImage("pinkman"); 13 11 14 public override void Begin() 12 15 { 16 Level.CreateBorders(); 13 17 14 18 LuoPallo(-100.0, -20.5, Color.HotPink); 15 LuoPallo( 0.0,0.0, Color.MidnightBlue);19 LuoPallo(200.0, 0.0, Color.MidnightBlue); 16 20 LuoPallo(150.0, 0.0, Color.Green); 17 21 LuoPallo(150.0, 400.0, Color.MediumVioletRed); 18 22 23 LisaaPelaaja(); 24 19 25 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 20 26 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 27 Keyboard.Listen(Key.Left, ButtonState.Down, LiikutaPelaajaa, "Liiku vasemmalle", new Vector(-1000, 0)); 28 Keyboard.Listen(Key.Right, ButtonState.Down, LiikutaPelaajaa, "Liiku oikealle", new Vector(1000, 0)); 29 Keyboard.Listen(Key.Up, ButtonState.Down, LiikutaPelaajaa, "Liiku ylös", new Vector(0, 1000)); 30 Keyboard.Listen(Key.Down, ButtonState.Down, LiikutaPelaajaa, "Liiku alas", new Vector(0, -1000)); 31 } 32 33 void LiikutaPelaajaa(Vector vektori) 34 { 35 pelaaja1.Push(vektori); 36 } 37 void LisaaPelaaja() 38 { 39 pelaaja1 = new PhysicsObject(40.0, 40.0); 40 pelaaja1.CanRotate = false; 41 pelaaja1.Image = pelaajanKuva; 42 Add(pelaaja1); 43 AddCollisionHandler(pelaaja1, "pallura", PelaajaTormaaPalloon); 44 } 45 46 void PelaajaTormaaPalloon(PhysicsObject pelaajahahmo, PhysicsObject pallonen) 47 { 48 pallonen.Destroy(); 49 pelaajahahmo.Size *= 1.5; 21 50 } 22 51 … … 27 56 pallo.X = xkoordinaatti; 28 57 pallo.Y = ykoordinaatti; 58 pallo.Tag = "pallura"; 29 59 Add(pallo); 30 60 } -
2016/30/luennot/Pallopeli/Pallopeli/Pallopeli/obj/x86/Debug/ContentPipeline-{E1D1A644-28B6-4869-96C9-94543A574B86}.xml
r8102 r8110 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item> 5 <Source>pinkman.png</Source> 6 <Name>pinkman</Name> 7 <Importer>TextureImporter</Importer> 8 <Processor>TextureProcessor</Processor> 9 <Options>None</Options> 10 <Output>C:\MyTemp\JouniP_luennot\Pallopeli\Pallopeli\Pallopeli\bin\x86\Debug\Content\pinkman.xnb</Output> 11 <Time>2016-07-26T12:44:05.0416742+03:00</Time> 12 </Item> 4 13 <BuildSuccessful>true</BuildSuccessful> 5 14 <Settings> … … 16 25 <Assemblies> 17 26 <Assembly> 27 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 28 <Value>2015-02-09T20:18:44+02:00</Value> 29 </Assembly> 30 <Assembly> 31 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 32 <Value>2011-09-01T16:22:30+03:00</Value> 33 </Assembly> 34 <Assembly> 35 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 36 <Value>2011-09-01T16:22:30+03:00</Value> 37 </Assembly> 38 <Assembly> 39 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 40 <Value>2011-09-01T16:22:30+03:00</Value> 41 </Assembly> 42 <Assembly> 43 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 44 <Value>2011-09-01T16:22:30+03:00</Value> 45 </Assembly> 46 <Assembly> 47 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 48 <Value>2011-09-01T16:22:30+03:00</Value> 49 </Assembly> 50 <Assembly> 51 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 52 <Value>2011-09-01T16:22:30+03:00</Value> 53 </Assembly> 54 <Assembly> 55 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 56 <Value>2015-02-17T22:27:18+02:00</Value> 57 </Assembly> 58 <Assembly> 18 59 <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> 19 60 <Value>2016-06-13T14:34:23.3940496+03:00</Value> -
2016/30/luennot/Pallopeli/Pallopeli/Pallopeli/obj/x86/Debug/Pallopeli.csproj.FileListAbsolute.txt
r8102 r8110 7 7 C:\MyTemp\JouniP_luennot\Pallopeli\Pallopeli\Pallopeli\obj\x86\Debug\Pallopeli.exe 8 8 C:\MyTemp\JouniP_luennot\Pallopeli\Pallopeli\Pallopeli\obj\x86\Debug\Pallopeli.pdb 9 C:\MyTemp\JouniP_luennot\Pallopeli\Pallopeli\Pallopeli\bin\x86\Debug\Content\pinkman.xnb -
2016/30/luennot/Pallopeli/Pallopeli/PallopeliContent/PallopeliContent.contentproj
r8102 r8110 45 45 <Reference Include="AnimationExtension" /> 46 46 </ItemGroup> 47 <ItemGroup> 48 <Compile Include="pinkman.png"> 49 <Name>pinkman</Name> 50 <Importer>TextureImporter</Importer> 51 <Processor>TextureProcessor</Processor> 52 </Compile> 53 </ItemGroup> 47 54 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 48 55 <!-- 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.