Changeset 4254 for 2013/26/MaxL


Ignore:
Timestamp:
2013-06-27 10:29:53 (6 years ago)
Author:
mitaivas
Message:

Talletus.

Location:
2013/26/MaxL/Keulaa2
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2013/26/MaxL/Keulaa2/Keulaa/Keulaa/Keulaa.cs

    r4252 r4254  
    1717    Image pilvenKuva = LoadImage("KeulaPilvet"); 
    1818    Image taustaKuva = LoadImage("KeulaTausta"); 
     19    Image kyparanKuva = LoadImage("Kypara"); 
    1920 
    2021    //PhysicsObject Vartalo; 
    21     PhysicsObject mopo; 
     22    PhysicsObject mopo = new PhysicsObject(250, 160); 
    2223    PhysicsObject Takarengas = new PhysicsObject(77, 77, Shape.Circle); 
    2324    PhysicsObject Eturengas = new PhysicsObject(80, 80, Shape.Circle); 
    2425    PhysicsObject Kasi = new PhysicsObject(10, 42); 
    2526    PhysicsObject Kasi2 = new PhysicsObject(44, 10); 
    26     PhysicsObject Vartalo = new PhysicsObject(30, 60); 
    27     PhysicsObject Kypara = new PhysicsObject(30, 30); 
     27    PhysicsObject Vartalo = new PhysicsObject(30, 80); 
     28    PhysicsObject Kypara = new PhysicsObject(50, 50); 
     29    PhysicsObject Palikka = new PhysicsObject(10, 10); 
    2830 
    2931    Vector eteen = new Vector(4500, 0); 
    30     Vector taakse = new Vector(-4500, 0); 
     32    Vector taakse = new Vector(-5500, 0); 
    3133    double kaasu2 = -50; 
    3234     
     
    8082    void LuoMopo(Vector paikka, double leveys, double korkeus) 
    8183    { 
    82         mopo = new PhysicsObject(250, 160); 
     84         
    8385        mopo.Shape = Shape.FromImage(moponRunko); 
    8486        //mopo.MomentOfInertia = 500; 
     
    125127        Vartalo.CollisionIgnoreGroup = 1; 
    126128        Vartalo.Color = Color.Yellow; 
    127         Vartalo.Y = mopo.Top; 
     129        Vartalo.Y = mopo.Top-10; 
    128130        Vartalo.X = -30; 
    129131        AxleJoint VartaloLiitos = new AxleJoint(mopo, Vartalo, new Vector(-30, Vartalo.Bottom)); 
     132        Vartalo.Mass = 2; 
    130133 
    131134        Kasi.CollisionIgnoreGroup = 1; 
     
    133136        Kasi.Y = Vartalo.Top - 22; 
    134137        Kasi.X = Vartalo.Left + 15; 
    135         AxleJoint KasiLiitos = new AxleJoint(Vartalo, Kasi, new Vector(Vartalo.Left + 15, Kasi.Top)); 
     138        AxleJoint KasiLiitos = new AxleJoint(Vartalo, Kasi, new Vector(Vartalo.Position.X, Kasi.Top)); 
    136139 
    137140        Kasi2.CollisionIgnoreGroup = 1; 
     
    143146 
    144147        Kypara.CollisionIgnoreGroup = 1; 
    145         Kypara.Y = Vartalo.Top; 
    146         Kypara.X = Vartalo.Left + 15; 
    147         AxleJoint KyparaLiitos = new AxleJoint(Vartalo, Kypara, new Vector(Vartalo.Left + 15, Kypara.Bottom)); 
     148        Kypara.Y = Vartalo.Top+10; 
     149        Kypara.X = Vartalo.Position.X; 
     150        AxleJoint KyparaLiitos = new AxleJoint(Vartalo, Kypara, new Vector(Vartalo.Position.X, Kypara.Bottom)); 
    148151        Kypara.CanRotate = false; 
    149  
    150         Add(Kypara); 
     152        Kypara.Image = kyparanKuva; 
     153        Kypara.Shape = Shape.FromImage(kyparanKuva); 
     154 
     155        Palikka.Mass = 1; 
     156        Palikka.Y = Kasi2.Position.Y; 
     157        Palikka.X = Eturengas.Left; 
     158        AxleJoint PalikkaLiitos = new AxleJoint(mopo, Palikka); 
     159 
     160        Add(Palikka); 
     161        Add(PalikkaLiitos); 
     162        Add(Kypara, 2); 
    151163        Add(KyparaLiitos); 
    152         Add(Kasi2, 2); 
     164        Add(Kasi2, 3); 
    153165        Add(Kasi2Liitos); 
    154166        Add(Ohjaus); 
    155         Add(Kasi, 2); 
     167        Add(Kasi, 3); 
    156168        Add(KasiLiitos); 
    157169        Add(Vartalo, 1); 
     
    166178        Keyboard.Listen(Key.Right, ButtonState.Down, Nojaus, "Nojaa eteen", Vartalo, eteen); 
    167179        Keyboard.Listen(Key.Left, ButtonState.Down, Nojaus, "Nojaa taakse", Vartalo, taakse); 
    168         //Keyboard.Listen(Key.Down, ButtonState.Down, Nojaus, "Jarru!", Kypara, taakse); 
     180 
     181        Keyboard.Listen(Key.Down, ButtonState.Pressed, Jarru, "Jarru!", Eturengas, 0.2); 
     182        Keyboard.Listen(Key.Down, ButtonState.Released, JarruPois, "Jarru!", Eturengas); 
     183        Keyboard.Listen(Key.Down, ButtonState.Pressed, Jarru, "Jarru!", Takarengas, 0.6); 
     184        Keyboard.Listen(Key.Down, ButtonState.Released, JarruPois, "Jarru!", Eturengas); 
     185 
    169186        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Lopeta"); 
    170187    } 
    171      
     188 
     189    void Jarru(PhysicsObject rengas, double jarru) 
     190    { 
     191        rengas.AngularDamping = jarru; 
     192    } 
     193    void JarruPois(PhysicsObject rengas) 
     194    { 
     195        rengas.AngularDamping = 1; 
     196    } 
     197 
    172198    void LuoTaso(Vector paikka, double leveys, double korkeus) 
    173199    { 
  • 2013/26/MaxL/Keulaa2/Keulaa/Keulaa/Keulaa.csproj.Debug.cachefile

    r4251 r4254  
    88Content\KeulaTausta.xnb 
    99Content\Frame2.xnb 
     10Content\Kypara.xnb 
  • 2013/26/MaxL/Keulaa2/Keulaa/Keulaa/obj/x86/Debug/Keulaa.csproj.FileListAbsolute.txt

    r4252 r4254  
    3333C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\obj\x86\Debug\Keulaa.exe 
    3434C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\obj\x86\Debug\Keulaa.pdb 
     35C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\Kypara.xnb 
  • 2013/26/MaxL/Keulaa2/Keulaa/Keulaa/obj/x86/Debug/cachefile-{716DCBB6-30E1-436E-8D82-85A469FEA5A5}-targetpath.txt

    r4251 r4254  
    88Content\KeulaTausta.xnb 
    99Content\Frame2.xnb 
     10Content\Kypara.xnb 
  • 2013/26/MaxL/Keulaa2/Keulaa/KeulaaContent/KeulaaContent.contentproj

    r4251 r4254  
    106106    </Compile> 
    107107  </ItemGroup> 
     108  <ItemGroup> 
     109    <Compile Include="Kypara.png"> 
     110      <Name>Kypara</Name> 
     111      <Importer>TextureImporter</Importer> 
     112      <Processor>TextureProcessor</Processor> 
     113    </Compile> 
     114  </ItemGroup> 
    108115  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    109116  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2013/26/MaxL/Keulaa2/Keulaa/KeulaaContent/obj/x86/Debug/ContentPipeline.xml

    r4252 r4254  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\RM125.xnb</Output> 
    11       <Time>2013-06-27T09:22:06.8742939+03:00</Time> 
     11      <Time>2013-06-27T09:40:28.4566222+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\Kentta.xnb</Output> 
    20       <Time>2013-06-27T09:22:06.8586938+03:00</Time> 
     20      <Time>2013-06-27T09:40:28.4410222+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2727      <Options>None</Options> 
    2828      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\Hyppy.xnb</Output> 
    29       <Time>2013-06-27T09:22:06.9210942+03:00</Time> 
     29      <Time>2013-06-27T09:40:28.5190222+03:00</Time> 
    3030    </Item> 
    3131    <Item> 
     
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\Frame.xnb</Output> 
    38       <Time>2013-06-27T09:22:06.9210942+03:00</Time> 
     38      <Time>2013-06-27T09:40:28.5190222+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    4545      <Options>None</Options> 
    4646      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\trengas.xnb</Output> 
    47       <Time>2013-06-27T09:22:06.7806933+03:00</Time> 
     47      <Time>2013-06-27T09:40:28.3786222+03:00</Time> 
    4848    </Item> 
    4949    <Item> 
     
    5454      <Options>None</Options> 
    5555      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\rengas.xnb</Output> 
    56       <Time>2013-06-27T09:22:06.7182929+03:00</Time> 
     56      <Time>2013-06-27T09:40:28.3318222+03:00</Time> 
    5757    </Item> 
    5858    <Item> 
     
    6363      <Options>None</Options> 
    6464      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\KeulaPilvet.xnb</Output> 
    65       <Time>2013-06-27T09:22:06.7806933+03:00</Time> 
     65      <Time>2013-06-27T09:40:28.3786222+03:00</Time> 
    6666    </Item> 
    6767    <Item> 
     
    7272      <Options>None</Options> 
    7373      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\KeulaTausta.xnb</Output> 
    74       <Time>2013-06-27T09:22:06.7806933+03:00</Time> 
     74      <Time>2013-06-27T09:40:28.3786222+03:00</Time> 
    7575    </Item> 
    7676    <Item> 
     
    8181      <Options>None</Options> 
    8282      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\Frame2.xnb</Output> 
    83       <Time>2013-06-27T09:22:06.7182929+03:00</Time> 
     83      <Time>2013-06-27T09:40:28.3318222+03:00</Time> 
     84    </Item> 
     85    <Item> 
     86      <Source>Kypara.png</Source> 
     87      <Name>Kypara</Name> 
     88      <Importer>TextureImporter</Importer> 
     89      <Processor>TextureProcessor</Processor> 
     90      <Options>None</Options> 
     91      <Output>C:\MyTemp\MaxL\Keulaa2\Keulaa\Keulaa\bin\x86\Debug\Content\Kypara.xnb</Output> 
     92      <Time>2013-06-27T09:59:53.3838222+03:00</Time> 
    8493    </Item> 
    8594    <BuildSuccessful>true</BuildSuccessful> 
     
    129138      <Assembly> 
    130139        <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> 
    131         <Value>2013-06-11T09:51:51.0124292+03:00</Value> 
     140        <Value>2013-06-11T09:31:58.0206076+03:00</Value> 
    132141      </Assembly> 
    133142    </Assemblies> 
Note: See TracChangeset for help on using the changeset viewer.