Changeset 1366
- Timestamp:
- 2010-07-28 11:32:04 (13 years ago)
- Location:
- 2010/30/lesejuku/Somalia 1993
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/30/lesejuku/Somalia 1993/Content/Content.contentproj
r1344 r1366 1 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">1 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> 2 2 <PropertyGroup> 3 3 <ProjectGuid>2f5a2ec4-a623-4cb0-a6d1-0a389cadd6d8</ProjectGuid> … … 47 47 <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d" /> 48 48 </ItemGroup> 49 <ItemGroup> 50 <Compile Include="Black Hawk.png"> 51 <Name>Black Hawk</Name> 52 <Importer>TextureImporter</Importer> 53 <Processor>TextureProcessor</Processor> 54 </Compile> 55 </ItemGroup> 49 56 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 50 57 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2010/30/lesejuku/Somalia 1993/Peli.cs
r1344 r1366 3 3 using Jypeli.Widgets; 4 4 using Jypeli.Assets; 5 using Jypeli.Effects; 5 6 6 7 public class Tasohyppely : PhysicsGame 7 8 { 9 PhysicsObject helikopteri; 10 double helikopterinNopeus; 11 Image helikopterinKuva = LoadImage("Black Hawk"); 12 8 13 protected override void Begin() 9 14 { 15 LuoKentta(); 10 16 17 18 Gravity = new Vector( 23.0, -800.0 ); 19 20 Vector impulssi = new Vector(500.0, 0.0); 21 helikopteri.Hit(impulssi); 11 22 } 12 23 13 24 void LuoKentta() 14 25 { 26 helikopteri = new PhysicsObject(40.0, 40.0); 27 helikopteri.Shape = Shapes.Circle; 28 helikopteri.Mass = 10.0; 29 helikopteri.Image = helikopterinKuva; 30 helikopteri.Color = Color.Gray; 31 helikopteri.X = -200.0; 32 helikopteri.Y = 0.0; 33 helikopterinNopeus = 200; 34 helikopteri.Size = new Vector(55, 55); 35 Add(helikopteri); 36 37 AssaultRifle machinegun = new AssaultRifle(20, 20); 38 machinegun.Use(); 39 Keyboard.Listen( Key.Space, ButtonState.Down, machinegun.Use, "Ammu" ); 40 machinegun.Ammo.Value = int.MaxValue; 41 machinegun.BulletCollision = LuotiOsuu; 42 43 int pMaxMaara = 200; 44 45 //ExplosionSystem rajahdys = new ExplosionSystem(LoadImage("rajahdys_kuva"), pMaxMaara); 46 //double x = 0; 47 //double y = 0; 48 //int pMaara = 50; 49 //rajahdys.AddEffect(x, y, pMaara); 50 51 Level.BackgroundColor = Color.Blue; 52 Camera.ZoomToLevel(); 53 helikopteri.Restitution = 1.0; 54 55 56 } 57 const double pallonNopeus = 500; 58 59 void LuotiOsuu( PhysicsObject ammus, PhysicsObject kohde) 60 { 61 } 62 63 protected override void Update( Time time ) 64 { 65 if ( helikopteri != null && Math.Abs( helikopteri.Velocity.X ) < helikopterinNopeus ) 66 { 67 helikopteri.Velocity = new Vector( helikopteri.Velocity.X * 1.1, helikopteri.Velocity.Y ); 68 } 69 70 base.Update( time ); 15 71 } 16 72 }
Note: See TracChangeset
for help on using the changeset viewer.