Changeset 5074


Ignore:
Timestamp:
2014-06-24 14:59:46 (9 years ago)
Author:
pypelli
Message:
 
Location:
2014/26/Pyry-PetteriP
Files:
8 added
9 edited

Legend:

Unmodified
Added
Removed
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/Motopeli/Motopeli.cs

    r5063 r5074  
    99public class Motopeli : PhysicsGame 
    1010{ 
     11    Image autoKuva = LoadImage("auto"); 
     12    Automobile moottoripyora; 
     13 
     14    Vector[] reittiPisteet = new Vector[] 
     15{   new Vector( -255.0, -124.0 ), 
     16    new Vector( -252.0, -131.0 ), 
     17    new Vector( -201.0, -214.0 ), 
     18 
     19 
     20 
     21 
     22};   
     23 
     24 
    1125    public override void Begin() 
    1226    { 
     27        SmoothTextures = false; 
    1328        Luokentta(); 
    14         Camera.Zoom(1.0); 
     29        Camera.ZoomToLevel(); 
     30        Moottoripyora(); 
     31        AsetaOhjaimet(); 
     32 
     33 
     34    } 
     35 
     36 
     37    void Luokentta() 
     38    { 
     39        RoadMap tie = new RoadMap(reittiPisteet); 
     40        tie.DefaultWidth = 200.0; 
     41        tie.Insert(); 
     42 
     43 
     44 
     45    } 
     46 
     47 
     48    void Moottoripyora() 
     49    { 
     50        moottoripyora = new Automobile(55.0, 55.0); 
     51        Add(moottoripyora); 
     52        moottoripyora.Image = autoKuva; 
     53    } 
     54 
     55 
     56    void AsetaOhjaimet() 
     57    { 
     58        Keyboard.Listen(Key.Left, ButtonState.Down, KaannaPelaajaa, null, Angle.FromDegrees(-1)); 
     59        Keyboard.Listen(Key.Right, ButtonState.Down, KaannaPelaajaa, null, Angle.FromDegrees(1)); 
     60        Keyboard.Listen(Key.Up, ButtonState.Down, KaasutaPelaajaa, null); 
     61        Keyboard.Listen(Key.Down, ButtonState.Down, TaaksepainPelaajaa, null); 
    1562        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    1663        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    1764    } 
    18     void Luokentta() 
     65 
     66 
     67    void LiikutaPelaajaa(Vector vektori) 
    1968    { 
    20         Surface alaReuna = Surface.CreateBottom(Level, 30, 200, 20, 140); 
    21         Add(alaReuna); 
    22        
     69        moottoripyora.Push(vektori); 
    2370    } 
    24     void moottoripyora 
    25     { PhysicsObject moottoripyora = new PhysicsObject (80.0, 75.0) 
     71    void KaannaPelaajaa(Angle kulma) 
     72    { 
     73        moottoripyora.Angle += kulma; 
    2674 
    27      Add (moottoripyora); 
    28      
    29      
     75 
    3076    } 
    3177 
     78    void KaasutaPelaajaa() 
     79    { 
     80        moottoripyora.Accelerate(); 
     81    } 
     82    void TaaksepainPelaajaa() 
     83    { 
     84        moottoripyora.Brake(); 
     85    } 
     86} 
     87    
    3288 
    33 } 
    34    
    35   
     89 
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/Motopeli/obj/x86/Debug/ContentPipeline-{49BD7CC0-449A-44E6-A07A-3F90AE280C94}.xml

    r5063 r5074  
    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>C:\MyTemp\Pyry-PetteriP\Motopeli\Motopeli\Motopeli\bin\x86\Debug\Content\auto.xnb</Output> 
     11      <Time>2014-06-24T14:30:54.1764027+03:00</Time> 
     12    </Item> 
    413    <BuildSuccessful>true</BuildSuccessful> 
    514    <Settings> 
     
    1625    <Assemblies> 
    1726      <Assembly> 
     27        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     28        <Value>2013-09-06T09:39:14+03: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>2013-09-06T09:39:16+03:00</Value> 
     57      </Assembly> 
     58      <Assembly> 
    1859        <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> 
    1960        <Value>2014-04-22T21:32:12.354917+03:00</Value> 
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/Motopeli/obj/x86/Debug/Motopeli.csproj.FileListAbsolute.txt

    r5063 r5074  
    77C:\MyTemp\Pyry-PetteriP\Motopeli\Motopeli\Motopeli\obj\x86\Debug\Motopeli.exe 
    88C:\MyTemp\Pyry-PetteriP\Motopeli\Motopeli\Motopeli\obj\x86\Debug\Motopeli.pdb 
     9C:\MyTemp\Pyry-PetteriP\Motopeli\Motopeli\Motopeli\bin\x86\Debug\Content\auto.xnb 
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/MotopeliContent/MotopeliContent.contentproj

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