Changeset 5313 for 2014/27/JouniP_esimerkki
- Timestamp:
- 2014-07-03 09:22:24 (9 years ago)
- Location:
- 2014/27/JouniP_esimerkki/Efektit/Efektit
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/27/JouniP_esimerkki/Efektit/Efektit/Efektit/Efektit.cs
r5312 r5313 7 7 using Jypeli.Widgets; 8 8 9 9 10 public class Efektit : PhysicsGame 10 11 { 11 12 PhysicsObject pallo; 13 Image partikkeli = LoadImage("rajahdyspartikkeli"); 12 14 13 15 public override void Begin() 14 16 { 15 L evel.Background.Color = Color.Black;17 LuoKentta(); 16 18 LisaaPallo(); 19 LisaaLaatikoita(); 17 20 18 21 LisaaNappainkuuntelijat(); 19 22 23 24 20 25 } 21 26 22 private void LisaaPallo() 27 void Rajayta(PhysicsObject tormaaja, PhysicsObject kohde) 28 { 29 ExplosionSystem rajahdys = new ExplosionSystem(partikkeli, 20); 30 Add(rajahdys); 31 rajahdys.MinScale = 1; 32 rajahdys.MaxScale = 40; 33 rajahdys.MaxLifetime = 3; 34 rajahdys.AddEffect(tormaaja.X, tormaaja.Y, 10); 35 } 36 37 void LisaaLaatikoita() 38 { 39 int i = 0; 40 while (i < 20) 41 { 42 PhysicsObject laatikko = new PhysicsObject(30, 30, Shape.Rectangle); 43 double minX = Level.Left; 44 double minY = Level.Bottom; 45 double maxX = Level.Right; 46 double maxY = Level.Top; 47 laatikko.Position = RandomGen.NextVector(minX, minY, maxX, maxY); 48 laatikko.Color = RandomGen.NextColor(); 49 laatikko.Tag = "loota"; 50 Add(laatikko); 51 i++; 52 } 53 } 54 55 void LuoKentta() 56 { 57 Level.Background.Color = Color.Black; 58 Level.CreateBorders(); 59 Camera.ZoomToLevel(); 60 } 61 62 void LisaaPallo() 23 63 { 24 64 pallo = new PhysicsObject(40, 40, Shape.Circle); 25 65 Add(pallo); 66 AddCollisionHandler(pallo, "loota", Rajayta); 26 67 } 27 68 28 privatevoid LisaaNappainkuuntelijat()69 void LisaaNappainkuuntelijat() 29 70 { 30 71 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); -
2014/27/JouniP_esimerkki/Efektit/Efektit/Efektit/obj/x86/Debug/Efektit.csproj.FileListAbsolute.txt
r5312 r5313 7 7 C:\MyTemp\JouniP_esimerkki\Efektit\Efektit\Efektit\obj\x86\Debug\Efektit.exe 8 8 C:\MyTemp\JouniP_esimerkki\Efektit\Efektit\Efektit\obj\x86\Debug\Efektit.pdb 9 C:\MyTemp\JouniP_esimerkki\Efektit\Efektit\Efektit\bin\x86\Debug\Content\rajahdyspartikkeli.xnb -
2014/27/JouniP_esimerkki/Efektit/Efektit/EfektitContent/EfektitContent.contentproj
r5312 r5313 45 45 <Reference Include="AnimationExtension" /> 46 46 </ItemGroup> 47 <ItemGroup> 48 <Compile Include="rajahdyspartikkeli.png"> 49 <Name>rajahdyspartikkeli</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. -
2014/27/JouniP_esimerkki/Efektit/Efektit/EfektitContent/obj/x86/Debug/ContentPipeline.xml
r5312 r5313 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item> 5 <Source>rajahdyspartikkeli.png</Source> 6 <Name>rajahdyspartikkeli</Name> 7 <Importer>TextureImporter</Importer> 8 <Processor>TextureProcessor</Processor> 9 <Options>None</Options> 10 <Output>C:\MyTemp\JouniP_esimerkki\Efektit\Efektit\Efektit\bin\x86\Debug\Content\rajahdyspartikkeli.xnb</Output> 11 <Time>2014-07-03T09:18:34.0142447+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> 54 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 55 <Value>2014-06-10T15:50:44+03:00</Value> 56 </Assembly> 57 <Assembly> 17 58 <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 59 <Value>2012-04-04T09:57:00.7719393+03:00</Value>
Note: See TracChangeset
for help on using the changeset viewer.