Changeset 5005


Ignore:
Timestamp:
2014-06-13 10:31:18 (9 years ago)
Author:
aldiskan
Message:
 
Location:
2014/24/AleksanteriS/Tasohyppelypeli1
Files:
4 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • 2014/24/AleksanteriS/Tasohyppelypeli1/Tasohyppelypeli1.sln

    r4980 r5005  
    22Microsoft Visual Studio Solution File, Format Version 11.00 
    33# Visual Studio 2010 
    4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tasohyppelypeli1", "Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1.csproj", "{DDCFF976-1518-473B-9F2F-DC97554D8978}" 
     4Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Derpal", "Tasohyppelypeli1\Tasohyppelypeli1\Derpal.csproj", "{DDCFF976-1518-473B-9F2F-DC97554D8978}" 
    55EndProject 
    6 Project("{96E2B04D-8817-42C6-938A-82C39BA4D311}") = "Tasohyppelypeli1Content", "Tasohyppelypeli1\Tasohyppelypeli1Content\Tasohyppelypeli1Content.contentproj", "{1D5EEC82-4D80-4E0C-B5E4-40943DA5A5A8}" 
     6Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tasohyppelypeli1Content", "Tasohyppelypeli1\Tasohyppelypeli1Content\Tasohyppelypeli1Content.contentproj", "{1D5EEC82-4D80-4E0C-B5E4-40943DA5A5A8}" 
    77EndProject 
    88Global 
  • 2014/24/AleksanteriS/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.cs

    r4980 r5005  
    1919    Image taustaKuva = LoadImage("Moon"); 
    2020 
     21 
     22    int kerattavienMaara; 
     23    IntMeter laskuri; 
     24 
    2125    SoundEffect maaliAani = LoadSoundEffect("IDHY"); 
    2226 
    2327    public override void Begin() 
    2428    { 
    25         MultiSelectWindow alkuValikko = new MultiSelectWindow("Derpal 2","Aloita peli", "Lopeta"); 
     29        MultiSelectWindow alkuValikko = new MultiSelectWindow("Derpal","Aloita peli", "Lopeta"); 
    2630        Add(alkuValikko); 
    2731        alkuValikko.Color = Color.White; 
     
    4347 
    4448        LuoKentta(); 
     49        LuoPistelaskuri(); 
    4550        LisaaNappaimet(); 
    4651 
     
    6166    } 
    6267 
     68    void LuoPistelaskuri() 
     69    { 
     70        laskuri = new IntMeter(0); 
     71 
     72        Label pisteNaytto = new Label(); 
     73        pisteNaytto.X = Screen.Left + 100; 
     74        pisteNaytto.Y = Screen.Top - 100; 
     75        pisteNaytto.Title = kerattavienMaara.ToString(); 
     76        pisteNaytto.TextColor = Color.Black; 
     77        pisteNaytto.Color = Color.White; 
     78 
     79        pisteNaytto.BindTo(laskuri); 
     80        Add(pisteNaytto); 
     81    } 
     82 
    6383    void LisaaTaso(Vector paikka, double leveys, double korkeus) 
    6484    { 
     
    7696        tahti.Tag = "tahti"; 
    7797        Add(tahti); 
     98        kerattavienMaara++; 
    7899    } 
    79100 
     
    118139    void TormaaTahteen(PhysicsObject hahmo, PhysicsObject tahti) 
    119140    { 
     141        laskuri.Value++; 
    120142        maaliAani.Play(); 
    121143        MessageDisplay.Add("Sait Companion Cuben!"); 
    122144        tahti.Destroy(); 
     145        if (laskuri.Value >= kerattavienMaara) Maali(); 
    123146    } 
     147 
     148    void Maali() 
     149    { 
     150        Label tekstikentta = new Label("Voitit!"); 
     151        tekstikentta.Position = pelaaja1.Position; 
     152        tekstikentta.Size = new Vector(200, 100); 
     153        Add(tekstikentta); 
     154    } 
     155 
     156 
    124157} 
  • 2014/24/AleksanteriS/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/ContentPipeline-{1D5EEC82-4D80-4E0C-B5E4-40943DA5A5A8}.xml

    r4980 r5005  
    5454      <Options>None</Options> 
    5555      <Output>C:\MyTemp\AleksanteriS\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta1.xnb</Output> 
    56       <Time>2014-06-12T13:32:34.6983665+03:00</Time> 
     56      <Time>2014-06-13T09:54:42.5291542+03:00</Time> 
    5757    </Item> 
    5858    <Item> 
  • 2014/24/AleksanteriS/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/kentta1.txt

    r4980 r5005  
    11                                                                                                                                                                      
    2                                                                         *                                                                                          
     2                                                                       **                                                                                          
    33                                                                       ##                                                                   #######################                               ############################################ 
    44                                                                       ##                       ######################                     #                      #                               #                                          # 
    55                                                                       ##                      ###########                             *  #                        #                              #                                          # 
    66      #####                                                          ####                      ###########    ##########               #                           #                              #                                          # 
    7       #####                       *   *             *                ##                        ########### *  ##########               #                           #                              #                                          # 
     7      #####                        * *              *                ##                        ########### *  ##########               #                           #                              #                                          # 
    88     *#####                     #########           #                ##                       ############  * ############             #                            #                             #                                          #  
    9      ########                   #########           #              ####                       ############ *  ############             #                            #                             #***************************************** # 
    10       #######                   #########           #              ##                         ############  * ############             #                                                          #***************************************** # 
    11       #######        N                      #       #   #          ##                        ############# *  #############            #                              #                        #**#***************************************** # 
     9     ########                   #########           #              ####                       ############ *  ############             #                            #                             #******************************************# 
     10      #######                   #########           #              ##                         ############  * ############             #                                                          #******************************************# 
     11      #######        N                      #       #   #          ##                        ############# *  #############           *#                              #                        #**#******************************************# 
    1212  ############################################################  #####  ###################################  * ###########################  #######################################  ######################################################   # 
    13                                                                *#                               #*                                          #                                    #                                   # *****                 # 
    14 #############################################################################################################################################                                    #################################  #################  #######  
    15                                                                                                                                                                                                                ###     * * * * * *     ####### 
    16                                                                                                                                                                                                                                                                                                                                                                                                                                 ############################## 
     13                                                               *#                               #*                                          #                                    #                                   # ******                # 
     14###################################################################################################################################################################################################################  #################  ####### 
     15###################################################################################################################################################################################################################                     ####### 
     16############################################################################################################################################################################################################################################## 
    1717##############################################################################################################################################################################################################################################                                                                                                                                                                                                                                                                                                                                                                                                                           
Note: See TracChangeset for help on using the changeset viewer.