Changeset 5066


Ignore:
Timestamp:
2014-06-24 14:54:31 (9 years ago)
Author:
tihaapas
Message:

??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Location:
2014/26/TimoH
Files:
50 added
17 edited

Legend:

Unmodified
Added
Removed
  • 2014/26/TimoH/AutoPeli/AutoPeli/AutoPeli/AutoPeli.cs

    r5045 r5066  
    99public class AutoPeli : PhysicsGame 
    1010{ 
     11 
     12    Vector[] reittiPisteet = new Vector[] 
     13    { 
     14        new Vector( -255.0, -124.0 ),  
     15        new Vector( -252.0, -131.0 ),  
     16        new Vector( -201.0, -214.0 ), 
     17        new Vector( -100.0, -214.0 ), 
     18        new Vector( 150.0, -214.0 ), 
     19        new Vector( 190.0, -190.0 ), 
     20        new Vector( 220.0, -170.0 ), 
     21        new Vector( 230.0, -150.0 ), 
     22        new Vector( 240.0, -100.0 ), 
     23        new Vector( 240.0, -50.0 ), 
     24        new Vector( 230.0, 0 ), 
     25        new Vector( 220.0, 0 ), 
     26        new Vector( -270, 0 ), 
     27        new Vector( -270, -50 ), 
     28        new Vector( -255, -124 ), 
     29        new Vector( -252, -131 ), 
     30         
     31    }; 
     32 
     33 
     34    Vector aloitusPaikka = new Vector(-255.0, -124.0); 
     35 
     36    Automobile auto; 
     37    Automobile vihuAuto; 
     38 
    1139    public override void Begin() 
    1240    { 
    1341        LuoAlkuvalikko(); 
    14          
    1542    } 
    1643 
    1744    void LuoAlkuvalikko() 
    1845    { 
    19         MultiSelectWindow alkuValikko = new MultiSelectWindow("Pelin alkuvalikko","Aloita peli", "Lopeta"); 
     46        MultiSelectWindow alkuValikko = new MultiSelectWindow("Pelin alkuvalikko", "Aloita peli", "Lopeta"); 
    2047        Add(alkuValikko); 
    2148 
     
    2754    { 
    2855        LuoKentta(); 
     56        LuoAuto(); 
     57        LuoVihollinen(); 
    2958        LisaaOhjaimet(); 
    3059    } 
    3160 
    3261    void LuoKentta() 
    33     {  
    34      
     62    { 
     63        LuoRata(); 
     64        Level.CreateBorders(); 
     65    } 
     66 
     67 
     68    void LuoRata() 
     69    { 
     70        RoadMap tie = new RoadMap(reittiPisteet); 
     71        tie.DefaultWidth = 100.0; 
     72        tie.Insert(); 
     73 
     74        /* 
     75        foreach (Vector paikka in reittiPisteet) 
     76        { 
     77            LuoPallo(paikka); 
     78        } 
     79         */ 
     80         
     81    } 
     82 
     83    void LuoAuto() 
     84    { 
     85        auto = new Automobile(50, 50); 
     86        auto.Position = aloitusPaikka; 
     87        auto.Acceleration = 1000; 
     88        Add(auto); 
     89    } 
     90 
     91 
     92    void LuoPallo(Vector paikka) 
     93    { 
     94        PhysicsObject pallo = new PhysicsObject(10.0, 10.0); 
     95        pallo.Color = Color.Gold; 
     96        pallo.Position = paikka; 
     97        Add(pallo); 
     98             
    3599    } 
    36100 
    37101    void LisaaOhjaimet() 
    38102    { 
     103        Keyboard.Listen(Key.Up, ButtonState.Down, KiihdytaAutoa, "Kiihdyttää autoa"); 
     104        Keyboard.Listen(Key.Down, ButtonState.Down, HidastaAutoa, "hidastaa autoa"); 
     105        Keyboard.Listen(Key.Left, ButtonState.Down, KaannaAutoa, "kääntää autoa vasemmalle", 1); 
     106        Keyboard.Listen(Key.Right, ButtonState.Down,KaannaAutoa, "kääntää autoa oikealle", -1); 
    39107        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    40108        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     109        Keyboard.Listen(Key.R, ButtonState.Pressed, AloitaPeliAlusta, "Aloittaa alusta"); 
     110    } 
     111 
     112 
     113    void KiihdytaAutoa() 
     114    { 
     115        auto.Accelerate(); 
     116    } 
     117 
     118    void HidastaAutoa() 
     119    { 
     120        auto.Brake(); 
     121    } 
     122 
     123    void KaannaAutoa(int kulma) 
     124    { 
     125        auto.Turn(Angle.FromDegrees(kulma), 2); 
     126    } 
     127 
     128    void AloitaPeliAlusta() 
     129    { 
     130        ClearAll(); 
     131        AloitaPeli(); 
     132    } 
     133 
     134    void LuoVihollinen() 
     135    { 
     136        vihuAuto = new Automobile(200, 200); 
     137        vihuAuto.Position = new Vector(220.0, 0); 
     138        vihuAuto.Image = LoadImage("jonne"); 
     139        vihuAuto.Acceleration = 100; 
     140        Add(vihuAuto); 
     141 
     142        FollowerBrain seuraajanAivot = new FollowerBrain(auto); 
     143        seuraajanAivot.Speed = 100; 
     144        vihuAuto.Brain = seuraajanAivot; 
    41145    } 
    42146} 
  • 2014/26/TimoH/AutoPeli/AutoPeli/AutoPeli/obj/x86/Debug/AutoPeli.csproj.FileListAbsolute.txt

    r5045 r5066  
    77C:\MyTemp\TimoH\AutoPeli\AutoPeli\AutoPeli\obj\x86\Debug\AutoPeli.exe 
    88C:\MyTemp\TimoH\AutoPeli\AutoPeli\AutoPeli\obj\x86\Debug\AutoPeli.pdb 
     9C:\MyTemp\TimoH\AutoPeli\AutoPeli\AutoPeli\bin\x86\Debug\Content\es.xnb 
     10C:\MyTemp\TimoH\AutoPeli\AutoPeli\AutoPeli\bin\x86\Debug\Content\images.xnb 
     11C:\MyTemp\TimoH\AutoPeli\AutoPeli\AutoPeli\bin\x86\Debug\Content\jonne.xnb 
  • 2014/26/TimoH/AutoPeli/AutoPeli/AutoPeli/obj/x86/Debug/ContentPipeline-{731B0E0A-C994-42D7-8D80-D3EB50051D83}.xml

    r5045 r5066  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
     4    <Item> 
     5      <Source>es.jpg</Source> 
     6      <Name>es</Name> 
     7      <Importer>TextureImporter</Importer> 
     8      <Processor>TextureProcessor</Processor> 
     9      <Options>None</Options> 
     10      <Output>C:\MyTemp\TimoH\AutoPeli\AutoPeli\AutoPeli\bin\x86\Debug\Content\es.xnb</Output> 
     11      <Time>2014-06-24T13:44:22.5350627+03:00</Time> 
     12    </Item> 
     13    <Item> 
     14      <Source>images.jpg</Source> 
     15      <Name>images</Name> 
     16      <Importer>TextureImporter</Importer> 
     17      <Processor>TextureProcessor</Processor> 
     18      <Options>None</Options> 
     19      <Output>C:\MyTemp\TimoH\AutoPeli\AutoPeli\AutoPeli\bin\x86\Debug\Content\images.xnb</Output> 
     20      <Time>2014-06-24T13:51:00.5044542+03:00</Time> 
     21    </Item> 
     22    <Item> 
     23      <Source>jonne.png</Source> 
     24      <Name>jonne</Name> 
     25      <Importer>TextureImporter</Importer> 
     26      <Processor>TextureProcessor</Processor> 
     27      <Options>None</Options> 
     28      <Output>C:\MyTemp\TimoH\AutoPeli\AutoPeli\AutoPeli\bin\x86\Debug\Content\jonne.xnb</Output> 
     29      <Time>2014-06-24T13:56:22.8541166+03:00</Time> 
     30    </Item> 
    431    <BuildSuccessful>true</BuildSuccessful> 
    532    <Settings> 
     
    1643    <Assemblies> 
    1744      <Assembly> 
     45        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     46        <Value>2013-09-06T09:39:14+03:00</Value> 
     47      </Assembly> 
     48      <Assembly> 
     49        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
     50        <Value>2011-09-01T16:22:30+03:00</Value> 
     51      </Assembly> 
     52      <Assembly> 
     53        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
     54        <Value>2011-09-01T16:22:30+03:00</Value> 
     55      </Assembly> 
     56      <Assembly> 
     57        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
     58        <Value>2011-09-01T16:22:30+03:00</Value> 
     59      </Assembly> 
     60      <Assembly> 
     61        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
     62        <Value>2011-09-01T16:22:30+03:00</Value> 
     63      </Assembly> 
     64      <Assembly> 
     65        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
     66        <Value>2011-09-01T16:22:30+03:00</Value> 
     67      </Assembly> 
     68      <Assembly> 
     69        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
     70        <Value>2011-09-01T16:22:30+03:00</Value> 
     71      </Assembly> 
     72      <Assembly> 
     73        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
     74        <Value>2013-09-06T09:39:16+03:00</Value> 
     75      </Assembly> 
     76      <Assembly> 
    1877        <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> 
    1978        <Value>2014-04-22T21:49:25.309997+03:00</Value> 
  • 2014/26/TimoH/AutoPeli/AutoPeli/AutoPeliContent/AutoPeliContent.contentproj

    r5045 r5066  
    4545    <Reference Include="AnimationExtension" /> 
    4646  </ItemGroup> 
     47  <ItemGroup> 
     48    <Compile Include="es.jpg"> 
     49      <Name>es</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52    </Compile> 
     53  </ItemGroup> 
     54  <ItemGroup> 
     55    <Compile Include="images.jpg"> 
     56      <Name>images</Name> 
     57      <Importer>TextureImporter</Importer> 
     58      <Processor>TextureProcessor</Processor> 
     59    </Compile> 
     60  </ItemGroup> 
     61  <ItemGroup> 
     62    <Compile Include="jonne.png"> 
     63      <Name>jonne</Name> 
     64      <Importer>TextureImporter</Importer> 
     65      <Processor>TextureProcessor</Processor> 
     66    </Compile> 
     67  </ItemGroup> 
    4768  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4869  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2014/26/TimoH/toinen_pong_peli/toinen_pong_peli/toinen_pong_peli/obj/x86/Debug/toinen_pong_peli.csproj.FileListAbsolute.txt

    r5045 r5066  
    66C:\MyTemp\TimoH\toinen_pong_peli\toinen_pong_peli\toinen_pong_peli\obj\x86\Debug\toinen_pong_peli.exe 
    77C:\MyTemp\TimoH\toinen_pong_peli\toinen_pong_peli\toinen_pong_peli\obj\x86\Debug\toinen_pong_peli.pdb 
     8C:\MyTemp\TimoH\toinen_pong_peli\toinen_pong_peli\toinen_pong_peli\obj\x86\Debug\toinen_pong_peli.csprojResolveAssemblyReference.cache 
  • 2014/26/TimoH/toinen_pong_peli/toinen_pong_peli/toinen_pong_peli/toinen_pong_peli.cs

    r5045 r5066  
    3434    void LuoKentta() 
    3535    { 
    36         pallo = new PhysicsObject(700.0, 700.0); 
     36        pallo = new PhysicsObject(150150.0, 0.1); 
    3737        pallo.Shape = Shape.Circle; 
    3838        pallo.Color = Color.Gold; 
Note: See TracChangeset for help on using the changeset viewer.