Changeset 5150 for 2014/26


Ignore:
Timestamp:
2014-06-27 11:51:07 (5 years ago)
Author:
pypelli
Message:
 
Location:
2014/26/Pyry-PetteriP
Files:
4 added
12 edited

Legend:

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

    r5120 r5150  
    99public class Motopeli : PhysicsGame 
    1010{ 
     11 
    1112    Image autoKuva = LoadImage("auto2"); 
    1213    Auto auto1; 
     
    7172    { 
    7273        ClearAll(); 
     74 
     75        //Level.BackgroundColor = Color.Snow; 
     76       // Level.Background.CreateStars(); 
     77 
    7378        autot.Clear(); 
    7479        MultiSelectWindow alkuValikko = new MultiSelectWindow("Pelin alkuvalikko", "Aloita peli", "Multplayer", "Parhaat pisteet", "Lopeta"); 
     
    133138        tie.Insert(); 
    134139 
     140       // Level.Background.CreateStars(); 
    135141        Level.Background.Color = Color.Green; 
    136142        Level.Size = Screen.Size; 
     
    146152        auto.Image = autoKuva; 
    147153        auto.AngularDamping = 0.95; 
    148         //moottoripyora.MomentOfInertia = 400; 
     154        //auto.MomentOfInertia = 400; 
    149155        auto.TopSpeed = 10; 
    150156        auto.Acceleration = 200; 
     157        auto.BrakeDeceleration = 600; 
    151158 
    152159        AddCollisionHandler<Auto, PhysicsObject>(auto, "maali", TuliMaaliin); 
     
    168175        Keyboard.Listen(Key.R, ButtonState.Pressed, AloitaAlusta, "Aloittaa Pelin Alusta", pelaajienMaara); 
    169176 
     177        ControllerOne.ListenAnalog(AnalogControl.LeftStick, 0.1, LiikutaPelaajaa, null); 
     178        //ControllerOne.ListenAnalog(AnalogControl.RightTrigger, 0.1, KaasutaAutolla, "Käytä oikeaa liipasinta kaasupolkimen tavoin."); 
     179 
     180        ControllerOne.Listen(Button.DPadLeft, ButtonState.Down, KaannaPelaajaa, null, auto1, 2000.0); 
     181        ControllerOne.Listen(Button.DPadRight, ButtonState.Down, KaannaPelaajaa, null, auto1, -2000.0); 
     182        ControllerOne.Listen(Button.A, ButtonState.Down, KaasutaPelaajaa, null, auto1); 
     183        ControllerOne.Listen(Button.X, ButtonState.Down, TaaksepainPelaajaa, null, auto1); 
     184 
     185 
     186 
    170187        if (pelaajienMaara == 1) return; 
    171188 
     
    196213    { 
    197214        auto.Brake(); 
    198     } 
     215        
     216    } 
     217 
    199218 
    200219    void LuoMerkki(Vector paikka) 
     
    306325        Alkuvalikko(); 
    307326    } 
     327     
     328     
     329    void LiikutaPelaajaa(AnalogState tatinTila) 
     330    { 
     331        Vector tatinAsento = tatinTila.StateVector; 
     332        if (tatinAsento.X < 0) auto1.ApplyTorque(1500); 
     333        else auto1.ApplyTorque(-1500); 
     334     
     335    } 
     336 
     337    //void KaasutaAutolla(AnalogState liipasimenTila) 
     338    //{ 
     339    //    double liipasimenAsento = liipasimenTila.State; 
     340 
     341    //} 
     342 
     343    void LiikutaPelaajaa(Vector vektori, PhysicsObject pelaaja) 
     344    { 
     345        pelaaja.Push(vektori); 
     346    } 
     347 
     348 
     349 
    308350} 
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/Motopeli/Motopeli.csproj.Debug.cachefile

    r5094 r5150  
    11Content\auto.xnb 
    22Content\auto2.xnb 
     3Content\ruutulippu.xnb 
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/Motopeli/bin/x86/Debug/Data/pisteet.xml

    r5120 r5150  
    1717          </Field> 
    1818          <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    19             <Value>8.57999999999986</Value> 
     19            <Value>8.42999999999986</Value> 
    2020          </Field> 
    2121        </Item> 
     
    2525          </Field> 
    2626          <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    27             <Value>9.72999999999984</Value> 
     27            <Value>8.57999999999986</Value> 
    2828          </Field> 
    2929        </Item> 
     
    3333          </Field> 
    3434          <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
     35            <Value>9.72999999999984</Value> 
     36          </Field> 
     37        </Item> 
     38        <Item Index="4" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
     39          <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
     40            <Value>minäaawddddddddddddddddddddddddddddddd</Value> 
     41          </Field> 
     42          <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    3543            <Value>9.80999999999984</Value> 
    3644          </Field> 
    3745        </Item> 
    38         <Item Index="4" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
     46        <Item Index="5" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
     47          <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
     48            <Value>minä</Value> 
     49          </Field> 
     50          <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
     51            <Value>12.3099999999998</Value> 
     52          </Field> 
     53        </Item> 
     54        <Item Index="6" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
     55          <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
     56            <Value>minä</Value> 
     57          </Field> 
     58          <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
     59            <Value>12.6099999999998</Value> 
     60          </Field> 
     61        </Item> 
     62        <Item Index="7" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
    3963          <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    4064            <Value>minä</Value> 
     
    4468          </Field> 
    4569        </Item> 
    46         <Item Index="5" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
     70        <Item Index="8" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
    4771          <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    4872            <Value>minäaawddddddddddddddddddddddddddddddd</Value> 
     
    5276          </Field> 
    5377        </Item> 
    54         <Item Index="6" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
     78        <Item Index="9" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
    5579          <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    5680            <Value>minä</Value> 
     
    6084          </Field> 
    6185        </Item> 
    62         <Item Index="7" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
    63           <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    64             <Value>minä</Value> 
    65           </Field> 
    66           <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    67             <Value>13.0499999999998</Value> 
    68           </Field> 
    69         </Item> 
    70         <Item Index="8" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
    71           <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    72             <Value>minä</Value> 
    73           </Field> 
    74           <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    75             <Value>13.3799999999998</Value> 
    76           </Field> 
    77         </Item> 
    78         <Item Index="9" Type="Jypeli.ScoreItem, Jypeli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"> 
    79           <Field Name="Name" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    80             <Value>minäaa</Value> 
    81           </Field> 
    82           <Field Name="Score" Type="System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    83             <Value>13.4999999999998</Value> 
    84           </Field> 
    85         </Item> 
    8686      </Array> 
    8787    </Field> 
    8888    <Field Name="LastEnteredName" Type="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
    89       <Value>minäaawddddddddddddddddddddddddddddddd</Value> 
     89      <Value>minä</Value> 
    9090    </Field> 
    9191  </Object> 
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/Motopeli/obj/x86/Debug/ContentPipeline-{49BD7CC0-449A-44E6-A07A-3F90AE280C94}.xml

    r5094 r5150  
    1919      <Output>C:\MyTemp\Pyry-PetteriP\Motopeli\Motopeli\Motopeli\bin\x86\Debug\Content\auto2.xnb</Output> 
    2020      <Time>2014-06-25T10:15:52.0418827+03:00</Time> 
     21    </Item> 
     22    <Item> 
     23      <Source>ruutulippu.jpg</Source> 
     24      <Name>ruutulippu</Name> 
     25      <Importer>TextureImporter</Importer> 
     26      <Processor>TextureProcessor</Processor> 
     27      <Options>None</Options> 
     28      <Output>C:\MyTemp\Pyry-PetteriP\Motopeli\Motopeli\Motopeli\bin\x86\Debug\Content\ruutulippu.xnb</Output> 
     29      <Time>2014-06-27T09:42:34.2242225+03:00</Time> 
    2130    </Item> 
    2231    <BuildSuccessful>true</BuildSuccessful> 
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/Motopeli/obj/x86/Debug/Motopeli.csproj.FileListAbsolute.txt

    r5094 r5150  
    99C:\MyTemp\Pyry-PetteriP\Motopeli\Motopeli\Motopeli\bin\x86\Debug\Content\auto.xnb 
    1010C:\MyTemp\Pyry-PetteriP\Motopeli\Motopeli\Motopeli\bin\x86\Debug\Content\auto2.xnb 
     11C:\MyTemp\Pyry-PetteriP\Motopeli\Motopeli\Motopeli\bin\x86\Debug\Content\ruutulippu.xnb 
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/Motopeli/obj/x86/Debug/cachefile-{49BD7CC0-449A-44E6-A07A-3F90AE280C94}-targetpath.txt

    r5094 r5150  
    11Content\auto.xnb 
    22Content\auto2.xnb 
     3Content\ruutulippu.xnb 
  • 2014/26/Pyry-PetteriP/Motopeli/Motopeli/MotopeliContent/MotopeliContent.contentproj

    r5094 r5150  
    5959    </Compile> 
    6060  </ItemGroup> 
     61  <ItemGroup> 
     62    <Compile Include="ruutulippu.jpg"> 
     63      <Name>ruutulippu</Name> 
     64      <Importer>TextureImporter</Importer> 
     65      <Processor>TextureProcessor</Processor> 
     66    </Compile> 
     67  </ItemGroup> 
    6168  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    6269  <!--  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.