Changeset 563


Ignore:
Timestamp:
2010-06-08 14:59:39 (13 years ago)
Author:
rikaroih
Message:

Meteor Rain Peli

Location:
2010/23/rikaroih
Files:
19 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2010/23/rikaroih/Autopeli1/Autopeli1.sln

    r535 r563  
    22Microsoft Visual Studio Solution File, Format Version 10.00 
    33# Visual Studio 2008 
    4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Autopeli1", "Autopeli1.csproj", "{A5AF9338-6690-4549-82E1-F61F06945F4C}" 
     4Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Meteor Rain", "Meteor Rain.csproj", "{A5AF9338-6690-4549-82E1-F61F06945F4C}" 
    55EndProject 
    66Global 
  • 2010/23/rikaroih/Autopeli1/Content/Content.contentproj

    r535 r563  
    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"> 
    22  <PropertyGroup> 
    33    <ProjectGuid>cbfe7994-de02-4d27-a69c-d2c17b2fd2ef</ProjectGuid> 
     
    2828    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d" /> 
    2929  </ItemGroup> 
     30  <ItemGroup> 
     31    <Compile Include="UFO.png"> 
     32      <Name>UFO</Name> 
     33      <Importer>TextureImporter</Importer> 
     34      <Processor>TextureProcessor</Processor> 
     35    </Compile> 
     36  </ItemGroup> 
     37  <ItemGroup> 
     38    <Compile Include="UFO2.png"> 
     39      <Name>UFO2</Name> 
     40      <Importer>TextureImporter</Importer> 
     41      <Processor>TextureProcessor</Processor> 
     42    </Compile> 
     43  </ItemGroup> 
     44  <ItemGroup> 
     45    <Compile Include="UFO3.png"> 
     46      <Name>UFO3</Name> 
     47      <Importer>TextureImporter</Importer> 
     48      <Processor>TextureProcessor</Processor> 
     49    </Compile> 
     50  </ItemGroup> 
     51  <ItemGroup> 
     52    <Compile Include="UFO4.png"> 
     53      <Name>UFO4</Name> 
     54      <Importer>TextureImporter</Importer> 
     55      <Processor>TextureProcessor</Processor> 
     56    </Compile> 
     57  </ItemGroup> 
     58  <ItemGroup> 
     59    <Compile Include="UFO2000.png"> 
     60      <Name>UFO2000</Name> 
     61      <Importer>TextureImporter</Importer> 
     62      <Processor>TextureProcessor</Processor> 
     63    </Compile> 
     64  </ItemGroup> 
     65  <ItemGroup> 
     66    <Compile Include="UFO3000.png"> 
     67      <Name>UFO3000</Name> 
     68      <Importer>TextureImporter</Importer> 
     69      <Processor>TextureProcessor</Processor> 
     70    </Compile> 
     71  </ItemGroup> 
     72  <ItemGroup> 
     73    <Compile Include="UFO4000.png"> 
     74      <Name>UFO4000</Name> 
     75      <Importer>TextureImporter</Importer> 
     76      <Processor>TextureProcessor</Processor> 
     77    </Compile> 
     78  </ItemGroup> 
    3079  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    3180  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
  • 2010/23/rikaroih/Autopeli1/Peli.cs

    r535 r563  
    44using Jypeli.Assets; 
    55 
    6 namespace Autopeli1 
     6namespace Meteor Rain 
    77{ 
    88    public class Peli : TopDownPhysicsGame 
     
    1616            PhysicsObject pallo3; 
    1717 
    18             pallo = new PhysicsObject(150.0, 100.0); 
    19             pallo.Shape = Shapes.Triangle; 
     18            pallo = new PhysicsObject(150.0, 150.0); 
     19            pallo.Shape = Shapes.Circle; 
     20            pallo.Color = Color.Pink; 
    2021            pallo.X = -200.0; 
    2122            pallo.Y = 0.0; 
    2223            pallo.Restitution = 1.0; 
     24            Vector impulssi = new Vector(-50.0, -50.0); 
     25            pallo.Hit(impulssi); 
    2326            Add(pallo); 
    2427 
    25             pallo2 = new PhysicsObject(200.0, 100.0); 
    26             pallo2.Shape = Shapes.Rectangle; 
     28            pallo2 = new PhysicsObject(200.0, 150.0); 
     29            pallo2.Shape = Shapes.Circle; 
     30            pallo2.Color = Color.Violet; 
    2731            pallo2.X = -200.0; 
    2832            pallo2.Y = 200.0; 
    2933            pallo2.Restitution = 1.0; 
     34            Vector impulssi2 = new Vector(50.0, 50.0); 
     35            pallo2.Hit(impulssi2); 
    3036            Add(pallo2); 
    3137 
    32             pallo3 = new PhysicsObject(200.0, 100.0); 
     38            pallo3 = new PhysicsObject(200.0, 150.0); 
    3339            pallo3.Shape = Shapes.Circle; 
    3440            pallo3.X = -200.0; 
     41            pallo3.Color = Color.Red; 
    3542            pallo3.Y = -200.0; 
    3643            pallo3.Restitution = 1.0; 
    37             Color vari = RandomGen.NextColor(); 
     44            Vector impulssi3 = new Vector(50.0, -50.0); 
     45            pallo3.Hit(impulssi3); 
    3846            Add(pallo3); 
    3947 
    40             Automobile auto2 = new Automobile(50, 40); 
     48            Automobile auto2 = new Automobile(100, 100); 
     49            auto2.Image = LoadImage("UFO4000"); 
    4150            auto2.Mass = 2.0; 
    4251            auto2.Color = new Color(192, 192, 255); 
    4352            Add(auto2); 
    4453 
    45             Automobile auto = new Automobile(50, 40); 
     54            Automobile auto = new Automobile(100, 100); 
     55            auto.Image = LoadImage("UFO3000"); 
    4656            auto.Mass = 2.0; 
    4757            auto.Color = new Color(192, 192, 255); 
    4858            Add(auto); 
    4959 
    50             Level.CreateBorders(1.2,false); 
    51             Level.BackgroundColor = Color.Green; 
     60            Automobile auto3 = new Automobile(100, 100); 
     61            auto3.Image = LoadImage("UFO2000"); 
     62            auto3.Mass = 2.0; 
     63            auto3.Color = new Color(192, 192, 255); 
     64            Add(auto3); 
     65 
     66            Level.CreateBorders(1.0,false); 
     67            Level.BackgroundColor = Color.Black; 
    5268 
    5369            Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 
     
    5672            Keyboard.Listen(Key.Left, ButtonState.Down, kaanny, "Käänny vasemmalle", auto, Angle.Degrees(1)); 
    5773            Keyboard.Listen(Key.Right, ButtonState.Down, kaanny, "Käänny oikealle", auto, Angle.Degrees(-1)); 
     74            Keyboard.Listen(Key.Down, ButtonState.Down, jarruta, "Jarruta", auto); 
    5875            Keyboard.Listen(Key.W, ButtonState.Down, kiihdyta, "Kiihdytä", auto2); 
    5976            Keyboard.Listen(Key.A, ButtonState.Down, kaanny, "Käänny vasemmalle", auto2, Angle.Degrees(1)); 
    6077            Keyboard.Listen(Key.D, ButtonState.Down, kaanny, "Käänny oikealle", auto2, Angle.Degrees(-1)); 
    61  
    62             ShowControlHelp(); 
     78            Keyboard.Listen(Key.S, ButtonState.Down, jarruta, "Jarruta", auto2); 
     79            ControllerOne.Listen(Button.RightTrigger, ButtonState.Down, kiihdyta, "kiihdyta", auto3); 
     80            ControllerOne.Listen(Button.DPadLeft, ButtonState.Down, kaanny, "Käänny vasemmalle", auto3, Angle.Degrees(1)); 
     81            ControllerOne.Listen(Button.DPadRight, ButtonState.Down, kaanny, "Käänny oikealle", auto3, Angle.Degrees(-1)); 
     82            ControllerOne.Listen(Button.LeftTrigger, ButtonState.Down, jarruta, "Jarruta", auto3); 
     83             
    6384        } 
    6485 
Note: See TracChangeset for help on using the changeset viewer.