Changeset 7598 for 2016


Ignore:
Timestamp:
2016-06-30 14:58:51 (3 years ago)
Author:
hesipone
Message:
 
Location:
2016/26/HennaS/Hyppelypeli/Hyppelypeli
Files:
5 added
12 edited

Legend:

Unmodified
Added
Removed
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/Hyppelypeli.cs

    r7595 r7598  
    2020    Image timanttiKuva = LoadImage("animatedDogbone"); 
    2121 
     22    EasyHighScore topLista = new EasyHighScore(); 
     23 
    2224    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     25    IntMeter pisteLaskuri; 
    2326 
    2427    public override void Begin() 
    2528    { 
     29        MediaPlayer.Play("musa"); 
     30 
     31        topLista.HighScoreWindow.Closed += LoppuValikko; 
     32        AloitaPeli(); 
     33    } 
     34 
     35    void AloitaPeli() 
     36    { 
     37        ClearAll(); 
    2638        Gravity = new Vector(0, -1000); 
    2739 
    2840        LuoKentta(); 
    2941        LisaaNappaimet(); 
     42        LuoPistelaskuri(); 
    3043 
    3144        Camera.Follow(pelaaja1); 
     
    3346        Camera.StayInLevel = true; 
    3447    } 
     48 
     49    void LuoPistelaskuri() 
     50    { 
     51        pisteLaskuri = new IntMeter(0); 
     52 
     53        Label pisteNaytto = new Label(); 
     54        pisteNaytto.X = Screen.Left + 100; 
     55        pisteNaytto.Y = Screen.Top - 100; 
     56        pisteNaytto.TextColor = Color.Black; 
     57        pisteNaytto.Color = Color.White; 
     58        pisteNaytto.Title = "Points"; 
     59 
     60        pisteNaytto.BindTo(pisteLaskuri); 
     61        Add(pisteNaytto); 
     62    } 
     63 
     64     
    3565 
    3666    void LuoKentta() 
     
    122152    void Hyppaa(PlatformCharacter hahmo, double nopeus) 
    123153    { 
    124         //hahmo.Velocity = new Vector(0, nopeus); 
    125154        hahmo.Jump(nopeus); 
    126155    } 
     
    128157    void TormaaTimanttiin(PhysicsObject hahmo, PhysicsObject tahti) 
    129158    { 
    130         maaliAani.Play(); 
    131         MessageDisplay.Add("Keräsit Luun!"); 
     159        MessageDisplay.Add("You Collected A Bone!"); 
     160        pisteLaskuri.Value += 1; 
    132161        tahti.Destroy(); 
    133162    } 
    134163    void TormaaVaaralliseen(PhysicsObject hahmo, PhysicsObject tahti) 
    135164    { 
     165        pelaaja1.Destroy(); 
     166 
    136167        ClearAll(); 
    137         Begin(); 
     168 
     169        topLista.EnterAndShow(pisteLaskuri.Value); 
     170    } 
     171 
     172    void LoppuValikko(Window sender) 
     173    {  
     174        MultiSelectWindow alkuValikko = new MultiSelectWindow("Game Over", "Play Again", "High Score", "Quit"); 
     175        Add(alkuValikko); 
     176        alkuValikko.AddItemHandler(0, AloitaPeli); 
     177        alkuValikko.AddItemHandler(1, ParhaatPisteet); 
     178        alkuValikko.AddItemHandler(2, Exit); 
     179    } 
     180 
     181    void ParhaatPisteet() 
     182    { 
     183        topLista.Show(); 
    138184    } 
    139185 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/Hyppelypeli.csproj.Debug.cachefile

    r7595 r7598  
    1414Content\kuva9.xnb 
    1515Content\animatedDogbone.xnb 
     16Content\musa.xnb 
     17Content\musa.wma 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r7595 r7598  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2016-06-30T12:41:57.9013946+03:00</Time> 
     38      <Time>2016-06-30T14:54:03.7354972+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    136136      <Output>C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\animatedDogbone.xnb</Output> 
    137137      <Time>2016-06-30T12:30:21.9335228+03:00</Time> 
     138    </Item> 
     139    <Item> 
     140      <Source>musa.mp3</Source> 
     141      <Name>musa</Name> 
     142      <Importer>Mp3Importer</Importer> 
     143      <Processor>SongProcessor</Processor> 
     144      <Options>None</Options> 
     145      <Output>C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\musa.xnb</Output> 
     146      <Extra>C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\musa.wma</Extra> 
     147      <Time>2016-06-30T14:48:57.1649013+03:00</Time> 
    138148    </Item> 
    139149    <BuildSuccessful>true</BuildSuccessful> 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/obj/x86/Debug/Hyppelypeli.csproj.FileListAbsolute.txt

    r7595 r7598  
    2222C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\kuva9.xnb 
    2323C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\animatedDogbone.xnb 
     24C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\musa.xnb 
     25C:\MyTemp\HennaS\Hyppelypeli\Hyppelypeli\Hyppelypeli\bin\x86\Debug\Content\musa.wma 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/Hyppelypeli/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r7595 r7598  
    1414Content\kuva9.xnb 
    1515Content\animatedDogbone.xnb 
     16Content\musa.xnb 
     17Content\musa.wma 
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/HyppelypeliContent/HyppelypeliContent.contentproj

    r7595 r7598  
    128128    </Compile> 
    129129  </ItemGroup> 
     130  <ItemGroup> 
     131    <Compile Include="musa.mp3"> 
     132      <Name>musa</Name> 
     133      <Importer>Mp3Importer</Importer> 
     134      <Processor>SongProcessor</Processor> 
     135    </Compile> 
     136  </ItemGroup> 
    130137  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    131138  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2016/26/HennaS/Hyppelypeli/Hyppelypeli/HyppelypeliContent/kentta1.txt

    r7595 r7598  
    1 .......................................................................................................................................................................................................................................................................... 
    2 .......................................................................................................................................................................................................................................................................... 
    3 .......................................................................................................................................................................................................................................................................... 
    4 ........................................................................................................................................................................................###..................................................................................... 
    5 ....................................................................................................................................................###....###....@............................................................................................................. 
    6 ...................................................................................................................@..........................###................###.@@...........###.........@................................................................................. 
    7 .................................................................................................................####..........####.....@.........................#####..@@@@................###....@@................................................................................... 
    8 .........................................................................................................................###............###............................########.....................###.@@................................................................................ 
    9 ...................................................................................###.....................######......................................................................................#####.@@..................................................................... 
    10 ..........................................................................................................#######...........................................................................................####................................................................. 
    11 ..............@....###..........###.....@....................@............@...###..........###..........##########........................................................................................................................................................... 
    12 .N..........###...........###..........###................#####...................................###........................................................................................................................................................................ 
    13 #########......................................###.......................###.......................######.................................................................................................................................................................... 
    14 .....................................................###...........###.............................######.................................................................................................................................................................... 
    15 ...................................................................................................######.................................................................................................................................................................... 
    16 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 
     1......................................................................................................................................................................................................................................................................................................................................................... 
     2......................................................................................................................................................................................................................................................................................................................................................... 
     3......................................................................................................................................................................................................................................................................................................................................................... 
     4........................................................................................................................................................................................###..................................................@..........................###.............................................................................. 
     5....................................................................................................................................................###....###....@.........................................................................###....###...............@........###........................................................................... 
     6...................................................................................................................@..........................###................###.@@...........###.........@..........................###.............................###........###..............@@.................................................................... 
     7.................................................................................................................####..........####.....@.........................#####..@@@@................###....@@.........................###....###.....................###....................###.................................................................... 
     8.........................................................................................................................###............###............................########.....................###.@@.........###................................................................................................................................... 
     9...................................................................................###.....................######......................................................................................#####.@@.......................................................................................................................................... 
     10..........................................................................................................#######...........................................................................................####............................................................................###............................................................. 
     11..............@....###..........###.....@....................@............@...###..........###..........##########....................................................................................................................................................................................................................................... 
     12.N..........###...........###..........###................#####...................................###.................................................................................................................................................................................................................................................... 
     13#########......................................###.......................###.......................######................................................................................................................................................................................................................................................ 
     14.....................................................###...........###.............................######................................................................................................................................................................................................................................................ 
     15...................................................................................................######................................................................................................................................................................................................................................................ 
     16VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 
Note: See TracChangeset for help on using the changeset viewer.