Changeset 4261 for 2013/26


Ignore:
Timestamp:
2013-06-27 14:18:32 (10 years ago)
Author:
miktiili
Message:

Talletus.

Location:
2013/26/MikkoTi/Tasohyppelypeli3
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3.cs

    r4236 r4261  
    2323 
    2424    public override void Begin() 
     25     
    2526    { 
    26         SeuraavaKentta();   
     27        SeuraavaKentta(); 
     28        Camera.Zoom(0.8); 
    2729    } 
    2830 
     
    3638        else if (kenttaNro == 2) LuoKentta("Kentta2"); 
    3739        else if (kenttaNro == 3) LuoKentta("Kentta3"); 
    38         else if (kenttaNro > 3) Exit(); 
     40        else if (kenttaNro == 4) LuoKentta("Kentta4"); 
     41        else if (kenttaNro == 5) LuoKentta("Kentta5"); 
     42        else if (kenttaNro == 6) LuoKentta("Kentta6"); 
     43        else if (kenttaNro > 6) Exit(); 
    3944 
     45        LuoAikaLaskuri(); 
    4046        LisaaNappaimet(); 
    4147 
     
    4955        kentta.SetTileMethod('N', LisaaPelaaja); 
    5056        kentta.SetTileMethod('M', LisaaMaali); 
    51         kentta.SetTileMethod('E', LisaaEste); 
    5257        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    53         Level.CreateBorders(); 
     58        Level.CreateBorders(false); 
    5459        Level.Background.CreateGradient(Color.Black, Color.Purple); 
    5560    } 
     
    7176        maali.Tag = "maali"; 
    7277        Add(maali); 
    73     } 
    74  
    75     void LisaaEste(Vector paikka, double leveys, double korkeus) 
    76     { 
    77         PhysicsObject este = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    78         este.IgnoresCollisionResponse = true; 
    79         este.Position = paikka; 
    80         este.Image = esteenKuva; 
    81         este.Tag = "Este"; 
    82         Add(este); 
    8378    } 
    8479 
     
    129124    } 
    130125 
     126    void LuoAikaLaskuri() 
     127    { 
     128        Timer aikaLaskuri = new Timer(); 
     129        aikaLaskuri.Start(); 
     130 
     131        Label aikaNaytto = new Label(); 
     132        aikaNaytto.TextColor = Color.White; 
     133        aikaNaytto.DecimalPlaces = 1; 
     134        aikaNaytto.BindTo(aikaLaskuri.SecondCounter); 
     135        Add(aikaNaytto); 
     136    } 
     137     
    131138    void Liikuta(PlatformCharacter hahmo, double nopeus) 
    132139    { 
  • 2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/Tasohyppelypeli3Content.contentproj

    r4236 r4261  
    4646  </ItemGroup> 
    4747  <ItemGroup> 
     48    <Compile Include="Kentta5.txt"> 
     49      <Name>Kentta5</Name> 
     50      <Importer>TextFileImporter</Importer> 
     51      <Processor>TextFileContentProcessor</Processor> 
     52    </Compile> 
    4853    <Compile Include="norsu.png"> 
    4954      <Name>norsu</Name> 
     
    111116    </Compile> 
    112117  </ItemGroup> 
     118  <ItemGroup> 
     119    <Compile Include="Kentta4.txt"> 
     120      <Name>Kentta4</Name> 
     121      <Importer>TextFileImporter</Importer> 
     122      <Processor>TextFileContentProcessor</Processor> 
     123    </Compile> 
     124  </ItemGroup> 
     125  <ItemGroup> 
     126    <Compile Include="Kentta6.txt"> 
     127      <Name>Kentta6</Name> 
     128      <Importer>TextFileImporter</Importer> 
     129      <Processor>TextFileContentProcessor</Processor> 
     130    </Compile> 
     131  </ItemGroup> 
    113132  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    114133  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/kentta1.txt

    r4236 r4261  
    1414 ##  ##  ##  ##  ## 
    1515 
    16         N 
     16        N   E 
    1717###################### 
Note: See TracChangeset for help on using the changeset viewer.