Changeset 3015 for 2012/24


Ignore:
Timestamp:
2012-06-14 09:46:35 (11 years ago)
Author:
sijoseha
Message:

Talletus.

Location:
2012/24/TatuS/Tasohyppelypeli1
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 2012/24/TatuS/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Stickman Fight.cs

    r3004 r3015  
    2323    Image pojankuva = LoadImage("poika"); 
    2424    List<Label> valikonKohdat; 
     25 
     26    int kenttanro = 1; 
    2527    public override void Begin() 
    2628    { 
     29        seuraavaKentta(kenttanro); 
    2730        Valikko(); 
    2831 
     
    4245 
    4346    } 
     47    void seuraavaKentta() 
     48    { 
     49        ClearAll(); 
     50        vasenreuna = Level.CreateLeftBorder(); 
     51        Level.CreateRightBorder(); 
     52        alaReuna = Level.CreateBottomBorder(); 
     53        Level.CreateTopBorder(); 
     54 
     55        maali = new PhysicsObject(40, 20); 
     56        maali.Shape = Shape.Rectangle; 
     57        maali.mass(10.0); 
     58        AddCollisionHandler(maali, maaliTormasi); 
     59        Add(maali); 
     60 
     61        if (kentanNro == 1) LuoKentta("kentta1"); 
     62        else if (kentanNro == 2) LuoKentta("kentta2"); 
     63        else if (kentanNro > 2) Exit(); 
     64 
     65 
     66    } 
     67 
    4468    void Valikko() 
    4569    { 
     
    112136        Level.CreateBorders(); 
    113137        Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     138        TileMap ruudut = TileMap.FromFile(kentta2); 
    114139    } 
    115140 
  • 2012/24/TatuS/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/Tasohyppelypeli1Content.contentproj

    r3004 r3015  
    8383    </Compile> 
    8484  </ItemGroup> 
     85  <ItemGroup> 
     86    <Compile Include="kentta2.txt"> 
     87      <Name>kentta2</Name> 
     88      <Importer>TextFileImporter</Importer> 
     89      <Processor>TextFileContentProcessor</Processor> 
     90    </Compile> 
     91  </ItemGroup> 
    8592  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    8693  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
Note: See TracChangeset for help on using the changeset viewer.