Changeset 6727 for 2015/27


Ignore:
Timestamp:
2015-07-02 11:08:58 (8 years ago)
Author:
jivesuor
Message:

Tasohyppelyyn lisätty räjähdykset kolikoiden keräämiseen.

Location:
2015/27/JimiS
Files:
5 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/hyppely.cs

    r6678 r6727  
    1717    const int RUUDUN_KOKO = 40; 
    1818 
     19    int pMaxMaara = 200; 
     20 
    1921    PhysicsObject alaReuna; 
    2022    PhysicsObject vasenReuna; 
    2123    PhysicsObject oikeaReuna; 
    22     PhysicsObject ylaReuna; 
     24  //  PhysicsObject ylaReuna; 
     25 
     26    PhysicsObject kolikko; 
     27 
     28    EasyHighScore toplista = new EasyHighScore(); 
    2329 
    2430 
     
    3339    Image tasokuva = LoadImage("tasokuva"); 
    3440    Image PaaVihu = LoadImage("Päävihollinen"); 
     41    Image rajahdyskuva = LoadImage("rajahdys"); 
    3542 
    3643    SoundEffect osuma = LoadSoundEffect("osuma"); 
     
    4653    public override void Begin() 
    4754    { 
     55        aloitusValikko();  
     56 
     57 
     58       
     59    } 
     60 
     61    void aloitusValikko() 
     62    { 
     63        MultiSelectWindow alkuValikko = new MultiSelectWindow("Pelin alkuvalikko", 
     64            "Aloita peli", "Parhaat pisteet", "Lopeta"); 
     65        Add(alkuValikko); 
     66        alkuValikko.AddItemHandler(0, PeliAlkaa); 
     67        alkuValikko.AddItemHandler(1, toplista.Show); 
     68        toplista.HighScoreWindow.Closed += toplistapois; 
     69        alkuValikko.AddItemHandler(2, Exit); 
     70        alkuValikko.DefaultCancel = 3; 
     71        alkuValikko.Color = Color.Green; 
     72    } 
     73 
     74    public void toplistapois(Window Sender) 
     75    { 
     76        AloitaAlusta(); 
     77    } 
     78 
     79    void PeliAlkaa() 
     80    { 
    4881        Gravity = new Vector(0, -1000); 
    4982 
     
    5386        AddCollisionHandler(pelaaja1, alaReuna, KasittelePelaajanPutoaminen); 
    5487 
    55         IsFullScreen = true; 
     88        IsFullScreen = false; 
    5689 
    5790        Camera.Follow(pelaaja1); 
     
    86119        oikeaReuna.IsVisible = false; 
    87120 
    88         ylaReuna = Level.CreateTopBorder(); 
    89         ylaReuna.Restitution = 1.0; 
    90         ylaReuna.IsVisible = false; 
     121        //ylaReuna = Level.CreateTopBorder(); 
     122        //ylaReuna.Restitution = 1.0; 
     123        //ylaReuna.IsVisible = false; 
     124 
     125     
    91126 
    92127 
     
    171206    void LisaaKolikko(Vector paikka, double leveys, double korkeus) 
    172207    { 
    173         PhysicsObject kolikko = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     208        kolikko = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    174209        kolikko.IgnoresCollisionResponse = true; 
    175210        kolikko.Position = paikka; 
     
    178213        Add(kolikko); 
    179214    } 
     215 
     216    //void LisaaRajahdys() 
     217    //{ 
     218      
     219    //} 
    180220 
    181221    void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 
     
    234274            pelaaja1.Destroy(); 
    235275            MessageDisplay.Add("Pelaaja 1 hävisi pelin."); 
    236             Timer.SingleShot(3.0, Exit); 
     276            toplista.EnterAndShow(pelaajan1Tahdet.Value); 
     277            toplista.HighScoreWindow.Closed += toplistapois; 
     278 
    237279        } 
    238280    } 
     
    254296            pelaaja1.Destroy(); 
    255297            MessageDisplay.Add("Pelaaja 1 hävisi pelin."); 
    256             Timer.SingleShot(3.0, Exit); 
     298            toplista.EnterAndShow(pelaajan1Tahdet.Value); 
     299            toplista.HighScoreWindow.Closed += toplistapois; 
    257300        } 
    258301 
     
    303346        maaliAani.Play(); 
    304347        MessageDisplay.Add("Keräsit kolikon!"); 
     348 
     349         
     350 
     351        ExplosionSystem rajahdys = new ExplosionSystem(Kolikko, pMaxMaara); 
     352         
     353        double x = tahti.X; 
     354        double y = tahti.Y;  
     355        int pMaara = 10; 
     356 
     357        rajahdys.AddEffect(x, y, pMaara); 
     358 
     359        Add(rajahdys, 1); 
     360 
    305361        tahti.Destroy(); 
     362      
    306363 
    307364        if (pelaajan1Tahdet == 51) 
    308365        { 
    309366            MessageDisplay.Add("Voitit pelin!"); 
    310             Timer.SingleShot(3.0, Exit); 
     367            toplista.EnterAndShow(pelaajan1Tahdet.Value); 
     368            toplista.HighScoreWindow.Closed += toplistapois; 
    311369        } 
    312370    } 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/hyppely.csproj.Debug.cachefile

    r6678 r6727  
    11Content\maali.xnb 
     2Content\hyppyaani.xnb 
     3Content\osuma.xnb 
    24Content\norsu.xnb 
    35Content\tahti.xnb 
     
    68Content\vihu.xnb 
    79Content\kolikko.xnb 
    8 Content\kentta1.xnb 
    910Content\maapalikka.xnb 
    1011Content\putoamatonvihu.xnb 
    1112Content\tasokuva.xnb 
    1213Content\PÀÀvihollinen.xnb 
    13 Content\hyppyaani.xnb 
    14 Content\osuma.xnb 
     14Content\kentta1.xnb 
     15Content\rajahdys.xnb 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/obj/x86/Debug/ContentPipeline-{9937689A-33E5-40B9-A7B6-3F1206C3B37D}.xml

    r6678 r6727  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\maali.xnb</Output> 
    11       <Time>2015-07-01T09:51:43.9403447+03:00</Time> 
     11      <Time>2015-07-02T09:27:13.5460735+03:00</Time> 
     12    </Item> 
     13    <Item> 
     14      <Source>hyppyaani.wav</Source> 
     15      <Name>hyppyaani</Name> 
     16      <Importer>WavImporter</Importer> 
     17      <Processor>SoundEffectProcessor</Processor> 
     18      <Options>None</Options> 
     19      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\hyppyaani.xnb</Output> 
     20      <Time>2015-07-02T09:27:13.5928735+03:00</Time> 
     21    </Item> 
     22    <Item> 
     23      <Source>osuma.wav</Source> 
     24      <Name>osuma</Name> 
     25      <Importer>WavImporter</Importer> 
     26      <Processor>SoundEffectProcessor</Processor> 
     27      <Options>None</Options> 
     28      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\osuma.xnb</Output> 
     29      <Time>2015-07-02T09:27:13.5460735+03:00</Time> 
    1230    </Item> 
    1331    <Item> 
     
    1836      <Options>None</Options> 
    1937      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\norsu.xnb</Output> 
    20       <Time>2015-07-01T09:51:44.0183442+03:00</Time> 
     38      <Time>2015-07-02T09:27:13.5772735+03:00</Time> 
    2139    </Item> 
    2240    <Item> 
     
    2745      <Options>None</Options> 
    2846      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\tahti.xnb</Output> 
    29       <Time>2015-07-01T09:51:44.0807438+03:00</Time> 
     47      <Time>2015-07-02T09:27:13.5772735+03:00</Time> 
    3048    </Item> 
    3149    <Item> 
     
    3654      <Options>None</Options> 
    3755      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\pelaaja.xnb</Output> 
    38       <Time>2015-07-01T09:51:43.9403447+03:00</Time> 
     56      <Time>2015-07-02T09:27:13.5460735+03:00</Time> 
    3957    </Item> 
    4058    <Item> 
     
    4563      <Options>None</Options> 
    4664      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\pelaajahahmo.xnb</Output> 
    47       <Time>2015-07-01T09:51:44.0963437+03:00</Time> 
     65      <Time>2015-07-02T09:27:13.5772735+03:00</Time> 
    4866    </Item> 
    4967    <Item> 
     
    5472      <Options>None</Options> 
    5573      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\vihu.xnb</Output> 
    56       <Time>2015-07-01T09:51:44.0963437+03:00</Time> 
     74      <Time>2015-07-02T09:27:13.5772735+03:00</Time> 
    5775    </Item> 
    5876    <Item> 
     
    6381      <Options>None</Options> 
    6482      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\kolikko.xnb</Output> 
    65       <Time>2015-07-01T09:54:49.5588237+03:00</Time> 
     83      <Time>2015-07-02T09:27:13.5616735+03:00</Time> 
     84    </Item> 
     85    <Item> 
     86      <Source>maapalikka.png</Source> 
     87      <Name>maapalikka</Name> 
     88      <Importer>TextureImporter</Importer> 
     89      <Processor>TextureProcessor</Processor> 
     90      <Options>None</Options> 
     91      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\maapalikka.xnb</Output> 
     92      <Time>2015-07-02T09:27:13.6708735+03:00</Time> 
     93    </Item> 
     94    <Item> 
     95      <Source>putoamatonvihu.png</Source> 
     96      <Name>putoamatonvihu</Name> 
     97      <Importer>TextureImporter</Importer> 
     98      <Processor>TextureProcessor</Processor> 
     99      <Options>None</Options> 
     100      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\putoamatonvihu.xnb</Output> 
     101      <Time>2015-07-02T09:27:13.5928735+03:00</Time> 
     102    </Item> 
     103    <Item> 
     104      <Source>tasokuva.png</Source> 
     105      <Name>tasokuva</Name> 
     106      <Importer>TextureImporter</Importer> 
     107      <Processor>TextureProcessor</Processor> 
     108      <Options>None</Options> 
     109      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\tasokuva.xnb</Output> 
     110      <Time>2015-07-02T09:27:13.5616735+03:00</Time> 
     111    </Item> 
     112    <Item> 
     113      <Source>Päävihollinen.png</Source> 
     114      <Name>Päävihollinen</Name> 
     115      <Importer>TextureImporter</Importer> 
     116      <Processor>TextureProcessor</Processor> 
     117      <Options>None</Options> 
     118      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\Päävihollinen.xnb</Output> 
     119      <Time>2015-07-02T09:27:13.5616735+03:00</Time> 
    66120    </Item> 
    67121    <Item> 
     
    72126      <Options>None</Options> 
    73127      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\kentta1.xnb</Output> 
    74       <Time>2015-07-01T14:05:18.6738008+03:00</Time> 
     128      <Time>2015-07-02T11:00:06.5675735+03:00</Time> 
    75129    </Item> 
    76130    <Item> 
    77       <Source>maapalikka.png</Source> 
    78       <Name>maapalikka</Name> 
     131      <Source>rajahdys.png</Source> 
     132      <Name>rajahdys</Name> 
    79133      <Importer>TextureImporter</Importer> 
    80134      <Processor>TextureProcessor</Processor> 
    81135      <Options>None</Options> 
    82       <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\maapalikka.xnb</Output> 
    83       <Time>2015-07-01T10:36:59.7174521+03:00</Time> 
    84     </Item> 
    85     <Item> 
    86       <Source>putoamatonvihu.png</Source> 
    87       <Name>putoamatonvihu</Name> 
    88       <Importer>TextureImporter</Importer> 
    89       <Processor>TextureProcessor</Processor> 
    90       <Options>None</Options> 
    91       <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\putoamatonvihu.xnb</Output> 
    92       <Time>2015-07-01T10:42:37.015131+03:00</Time> 
    93     </Item> 
    94     <Item> 
    95       <Source>tasokuva.png</Source> 
    96       <Name>tasokuva</Name> 
    97       <Importer>TextureImporter</Importer> 
    98       <Processor>TextureProcessor</Processor> 
    99       <Options>None</Options> 
    100       <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\tasokuva.xnb</Output> 
    101       <Time>2015-07-01T11:27:24.0315682+03:00</Time> 
    102     </Item> 
    103     <Item> 
    104       <Source>Päävihollinen.png</Source> 
    105       <Name>Päävihollinen</Name> 
    106       <Importer>TextureImporter</Importer> 
    107       <Processor>TextureProcessor</Processor> 
    108       <Options>None</Options> 
    109       <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\Päävihollinen.xnb</Output> 
    110       <Time>2015-07-01T12:53:30.0756631+03:00</Time> 
    111     </Item> 
    112     <Item> 
    113       <Source>hyppyaani.wav</Source> 
    114       <Name>hyppyaani</Name> 
    115       <Importer>WavImporter</Importer> 
    116       <Processor>SoundEffectProcessor</Processor> 
    117       <Options>None</Options> 
    118       <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\hyppyaani.xnb</Output> 
    119       <Time>2015-07-01T14:22:21.5389795+03:00</Time> 
    120     </Item> 
    121     <Item> 
    122       <Source>osuma.wav</Source> 
    123       <Name>osuma</Name> 
    124       <Importer>WavImporter</Importer> 
    125       <Processor>SoundEffectProcessor</Processor> 
    126       <Options>None</Options> 
    127       <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\osuma.xnb</Output> 
    128       <Time>2015-07-01T14:25:59.6976239+03:00</Time> 
     136      <Output>C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\rajahdys.xnb</Output> 
     137      <Time>2015-07-02T10:32:37.9543735+03:00</Time> 
    129138    </Item> 
    130139    <BuildSuccessful>true</BuildSuccessful> 
     
    175184      <Assembly> 
    176185        <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> 
    177         <Value>2014-04-23T00:53:38.0521963+03:00</Value> 
     186        <Value>2014-04-23T00:22:29.3372049+03:00</Value> 
    178187      </Assembly> 
    179188    </Assemblies> 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/obj/x86/Debug/cachefile-{9937689A-33E5-40B9-A7B6-3F1206C3B37D}-targetpath.txt

    r6678 r6727  
    11Content\maali.xnb 
     2Content\hyppyaani.xnb 
     3Content\osuma.xnb 
    24Content\norsu.xnb 
    35Content\tahti.xnb 
     
    68Content\vihu.xnb 
    79Content\kolikko.xnb 
    8 Content\kentta1.xnb 
    910Content\maapalikka.xnb 
    1011Content\putoamatonvihu.xnb 
    1112Content\tasokuva.xnb 
    1213Content\PÀÀvihollinen.xnb 
    13 Content\hyppyaani.xnb 
    14 Content\osuma.xnb 
     14Content\kentta1.xnb 
     15Content\rajahdys.xnb 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/obj/x86/Debug/hyppely.csproj.FileListAbsolute.txt

    r6678 r6727  
    2121C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\hyppyaani.xnb 
    2222C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\osuma.xnb 
     23C:\MyTemp\JimiS\tasohyppely\hyppely\hyppely\hyppely\bin\x86\Debug\Content\rajahdys.xnb 
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppelyContent/hyppelyContent.contentproj

    r6678 r6727  
    137137    </Compile> 
    138138  </ItemGroup> 
     139  <ItemGroup> 
     140    <Compile Include="rajahdys.png"> 
     141      <Name>rajahdys</Name> 
     142      <Importer>TextureImporter</Importer> 
     143      <Processor>TextureProcessor</Processor> 
     144    </Compile> 
     145  </ItemGroup> 
    139146  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    140147  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppelyContent/kentta1.txt

    r6674 r6727  
    1515...............#...######...........V...............................##############.......###...............AAAAA...*......................####......................P..........................*P...####...............................*......................####......................*......#####............*.........*.....##............. 
    1616...............................AAAAAAAAAAAAA....AAAAAAAA......................................###.................###.........P................####................#####...................P...###.........P.*.........................#####.........*....P................P..*.......######.................P.....P.....####.................. 
    17 ...N....V.....................................................................................................###...........AAAAA*..........AA.....V......V......PP.........*.......P....####.............#####..................P..................#########...........########.............................########.......................................**M 
    18 .......................................................................V.......................................................................................................P....................*............P.........P..#######*...................*.............P...........P........P..........................*.............B...........B..........**M 
     17...N..........................................................................................................###...........AAAAA*..........AA.....V......V.................*............####.............#####..................P..................#########...........########.............................########.......................................**M 
     18.......................................................................V............................................................................................................................*.........................#######*...................*.............................................................*.............B...........B..........**M 
    1919MMMMMMMMMMMMMMMMMM...MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM........MMMMMMMMMMMMMMMMMMMMMMMMMM.......MMMMMMMMMM....MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM.........##..........MMMMMMMMMMMMMMMMMMMMMMMMMMMMM 
Note: See TracChangeset for help on using the changeset viewer.