Changeset 8918
- Timestamp:
- 2017-07-05 13:08:19 (6 years ago)
- Location:
- 2017/27/SimoR
- Files:
-
- 5 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/27/SimoR/Pong/Pong/Pong/Pong.cs
r8903 r8918 11 11 double nopeus = 500; 12 12 PhysicsObject pelaaja; 13 14 Image pumKuva = LoadImage("pum"); 13 15 14 16 public override void Begin() … … 25 27 26 28 AddCollisionHandler(pelaaja, "pallo", OsuiPalloon); 27 AddCollisionHandler(pelaaja, "pahapallo", OsuiPahaPalloon); 29 AddCollisionHandler(pelaaja, "pahapallo", OsuiPahaanPalloon); 30 } 31 32 void LuoVihollinen() 33 { 34 PhysicsObject vihu = new PhysicsObject(30, 30); 35 vihu.Tag = "vihollinen"; 36 vihu.Shape = Shape.Circle; 37 vihu.Color = Color.Blue; 38 vihu.X = -300; 39 Add(vihu); 40 41 FollowerBrain seuraajanAivot = new FollowerBrain(pelaaja); 42 seuraajanAivot.Speed = 50; // Millä nopeudella kohdetta seurataan 43 seuraajanAivot.DistanceFar = 600; // Etäisyys jolla aletaan seurata kohdetta 44 seuraajanAivot.DistanceClose = 100; // Etäisyys jolloin ollaan lähellä kohdetta 45 seuraajanAivot.StopWhenTargetClose = true; // Pysähdytään kun ollaan lähellä kohdetta 46 seuraajanAivot.TurnWhileMoving = true; 47 //seuraajanAivot.FarBrain = satunnaisAivot; 48 49 vihu.Brain = seuraajanAivot; 50 51 AssaultRifle ase = new AssaultRifle(60, 20); 52 ase.ProjectileCollision = AmmusOsui; 53 ase.FireRate = 900; 54 vihu.Add(ase); 55 56 Timer ajastin = new Timer(); 57 ajastin.Interval = 0.02; 58 ajastin.Timeout += delegate { AmmuAseella(ase); }; 59 ajastin.Start(); 60 } 61 62 void AmmuAseella(AssaultRifle ase) 63 { 64 PhysicsObject ammus = ase.Shoot(); 65 66 if (ammus != null) 67 { 68 //ammus.Size *= 3; 69 //ammus.Image = ... 70 //ammus.MaximumLifetime = TimeSpan.FromSeconds(2.0); 71 } 72 } 73 74 void AmmusOsui(PhysicsObject ammus, PhysicsObject kohde) 75 { 76 ammus.Destroy(); 28 77 } 29 78 … … 34 83 } 35 84 36 void OsuiPaha Palloon(PhysicsObject tormaaja, PhysicsObject kohde)85 void OsuiPahaanPalloon(PhysicsObject tormaaja, PhysicsObject kohde) 37 86 { 38 87 tormaaja.Size *= 0.8; 39 88 kohde.Destroy(); 89 90 Explosion rajahdys = new Explosion(50); 91 rajahdys.Image = pumKuva; 92 rajahdys.Position = kohde.Position; 93 Add(rajahdys); 40 94 } 41 95 … … 46 100 47 101 LuoPelaaja(); 102 LuoVihollinen(); 48 103 49 104 for (int i = 0; i < 120; i++) -
2017/27/SimoR/Pong/Pong/Pong/obj/x86/Debug/ContentPipeline-{B5657C23-C28C-451B-852B-8C591DFB28DC}.xml
r8813 r8918 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item> 5 <Source>pum.png</Source> 6 <Name>pum</Name> 7 <Importer>TextureImporter</Importer> 8 <Processor>TextureProcessor</Processor> 9 <Options>None</Options> 10 <Output>C:\MyTemp\SimoR\Pong\Pong\Pong\bin\x86\Debug\Content\pum.xnb</Output> 11 <Time>2017-07-05T13:06:20.7648151+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> -
2017/27/SimoR/Pong/Pong/Pong/obj/x86/Debug/Pong.csproj.FileListAbsolute.txt
r8813 r8918 7 7 C:\MyTemp\SimoR\Pong\Pong\Pong\obj\x86\Debug\Pong.exe 8 8 C:\MyTemp\SimoR\Pong\Pong\Pong\obj\x86\Debug\Pong.pdb 9 C:\MyTemp\SimoR\Pong\Pong\Pong\bin\x86\Debug\Content\pum.xnb -
2017/27/SimoR/Pong/Pong/PongContent/PongContent.contentproj
r8813 r8918 45 45 <Reference Include="AnimationExtension" /> 46 46 </ItemGroup> 47 <ItemGroup> 48 <Compile Include="pum.png"> 49 <Name>pum</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.