Changeset 2737 for 2012/JAO/John/rally


Ignore:
Timestamp:
2012-04-20 12:56:49 (10 years ago)
Author:
anonymous
Message:
 
Location:
2012/JAO/John/rally
Files:
6 added
9 edited

Legend:

Unmodified
Added
Removed
  • 2012/JAO/John/rally/rally/rally/obj/x86/Debug/rally.csproj.FileListAbsolute.txt

    r2729 r2737  
    77D:\John\rally\rally\rally\obj\x86\Debug\rally.exe 
    88D:\John\rally\rally\rally\obj\x86\Debug\rally.pdb 
     9D:\John\rally\rally\rally\bin\x86\Debug\Content\auto.xnb 
  • 2012/JAO/John/rally/rally/rally/rally.cs

    r2729 r2737  
    77using Jypeli.Widgets; 
    88 
    9 public class rally : PhysicsGame 
     9public class rally : TopDownPhysicsGame 
    1010{ 
     11    Image olionKuva = LoadImage("auto"); 
     12 
     13    Automobile rally3d; 
    1114    public override void Begin() 
    1215    { 
    1316        // TODO: Kirjoita ohjelmakoodisi tähän 
    14         Automobile rally3d = new Automobile(100,100); 
     17        Gravity = 50.0; 
     18         
     19        rally3d= new Automobile(100, 100); 
     20        //rally3d. 
    1521        Add(rally3d); 
     22        rally3d.Acceleration = 500.0; 
     23        rally3d.Image = Image.Mirror( olionKuva); 
     24        rally3d.MomentOfInertia = 1.0; 
     25        rally3d.Restitution = 0.1; 
     26        rally3d.AngularDamping = 0.9; 
     27      
     28 
     29        asetaohjain(); 
     30        Luorata(); 
     31        Level.CreateBorders(); 
     32       
     33 
    1634        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    1735        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    1836    } 
     37    void asetaohjain() 
     38    { 
     39 
     40        Keyboard.Listen(Key.Up, ButtonState.Down, 
     41            kiihdyttaa, null, 100000000.0); 
     42        Keyboard.Listen(Key.Down, ButtonState.Down, 
     43            jarruta, null, 1.0); 
     44        Keyboard.Listen(Key.Left, ButtonState.Down, 
     45            kaanny, null, 10.0); 
     46        Keyboard.Listen(Key.Right, ButtonState.Down, 
     47            kaanny, null, -10.0); 
     48    } 
     49 
     50    void kaanny(double suunta) 
     51    { 
     52        rally3d.Turn(Angle.FromDegrees(suunta), 0.1); 
     53//        rally3d.Angle += Angle.FromDegrees(suunta); 
     54    } 
     55 
     56    void kiihdyttaa(double nopeus) 
     57    { 
     58        rally3d.Accelerate(); 
     59    } 
     60 
     61    void jarruta(double nopeus) 
     62    { 
     63        rally3d.Brake(); 
     64    } 
     65    void Luorata() 
     66    { 
     67        Vector[] reittiPisteet = new Vector[] 
     68{ 
     69    new Vector( Level.Left, Level.Top ), 
     70    new Vector( Level.Left, Level.Bottom ), 
     71    new Vector( Level.Right, Level.Bottom ), 
     72    new Vector( Level.Right, Level.Top ), 
     73    new Vector( Level.Left-75, Level.Top ), 
     74   
     75    // ... 
     76}; 
     77 
     78        RoadMap tie = new RoadMap(reittiPisteet); 
     79        tie.DefaultWidth = 150.0; 
     80        tie.DefaultFriction = 1.0; 
     81        tie.Insert(); 
     82    } 
    1983} 
  • 2012/JAO/John/rally/rally/rallyContent/obj/x86/Debug/ContentPipeline.xml

    r2729 r2737  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
     4    <Item> 
     5      <Source>auto.png</Source> 
     6      <Name>auto</Name> 
     7      <Importer>TextureImporter</Importer> 
     8      <Processor>TextureProcessor</Processor> 
     9      <Options>None</Options> 
     10      <Output>D:\John\rally\rally\rally\bin\x86\Debug\Content\auto.xnb</Output> 
     11      <Time>2012-04-20T11:57:44.1913353+03:00</Time> 
     12    </Item> 
    413    <BuildSuccessful>true</BuildSuccessful> 
    514    <Settings> 
     
    1524    <Assemblies> 
    1625      <Assembly> 
     26        <Key>C:\Program Files\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     27        <Value>2012-03-15T10:46:56+02:00</Value> 
     28      </Assembly> 
     29      <Assembly> 
     30        <Key>C:\Program Files\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\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\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\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\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\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> 
    1754        <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> 
    1855        <Value>2012-04-02T16:44:17.671875+03:00</Value> 
  • 2012/JAO/John/rally/rally/rallyContent/rallyContent.contentproj

    r2729 r2737  
    4444    <Reference Include="TextFileContentExtension" /> 
    4545  </ItemGroup> 
     46  <ItemGroup> 
     47    <Compile Include="auto.png"> 
     48      <Name>auto</Name> 
     49      <Importer>TextureImporter</Importer> 
     50      <Processor>TextureProcessor</Processor> 
     51    </Compile> 
     52  </ItemGroup> 
    4653  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4754  <!--  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.