Changeset 6288 for 2015/26


Ignore:
Timestamp:
2015-06-24 20:27:27 (4 years ago)
Author:
sieerinn
Message:

F12-näppäimellä siirtyy seuraavaan kenttään.

Location:
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs

    r6287 r6288  
    122122 
    123123    # region Images 
    124     private Image[] groundImages = LoadImages("ground");    //Näitä ei tosin kaikkia kenties jaksa tehdä erilaisiksi levelistä riippuen 
    125     private Image[] groundTopImages = LoadImages("ground_top"); 
    126     private Image[] foregroundDecorations = LoadImages("viljaa"); 
    127     private Image[] blockImages = LoadImages("box2"); 
     124    private Image[] groundImages = LoadImages("ground", "ground");    //Näitä ei tosin kaikkia kenties jaksa tehdä erilaisiksi levelistä riippuen 
     125    private Image[] groundTopImages = LoadImages("ground_top", "ground_top"); 
     126    private Image[] foregroundDecorations = LoadImages("viljaa", "grass"); 
     127    private Image[] blockImages = LoadImages("box2", "box"); 
    128128 
    129129    private Image[] houseImages = LoadImages("house", "houseburned"); 
     
    162162    public override void Begin() 
    163163    { 
     164        Initializing(); 
    164165        //IntroSequence(); 
    165166        //MainMenu(); 
     
    287288    void StartGame() 
    288289    { 
    289         Initializing(); 
     290        ClearAll(); 
    290291        CreateLevel(); 
    291292        ScreenSettings(); 
     293        SetControls(); 
     294    } 
     295 
     296    public void NextLevel() 
     297    { 
     298        levelNumber++; 
     299        StartGame(); 
    292300    } 
    293301 
     
    326334        cameraTimer.Start(); 
    327335 
    328  
    329336        //Background 
    330337        GameObject forestBackground = new GameObject(Level.Width, Level.Height); 
     
    339346    void CreateLevel() 
    340347    { 
     348        startingPlayers.Clear(); 
     349        players.Clear(); 
    341350        Gravity = new Vector(0, -1000); 
    342351 
     
    360369        level.Optimize(Color.Black, Color.Brown); 
    361370        level.Execute(TILE_SIZE, TILE_SIZE); 
    362  
    363         SetControls(); 
    364371    } 
    365372 
     
    671678        Keyboard.Listen(Key.RightShift, ButtonState.Pressed, UseImprovement, "Player 2 uses their tools", startingPlayers[1]); 
    672679 
     680        Keyboard.Listen(Key.F12, ButtonState.Pressed, NextLevel, null); 
     681 
    673682        Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Show help"); 
    674683        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Exit game"); 
  • 2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRunContent/HillbillyRunContent.contentproj

    r6284 r6288  
    233233    </Compile> 
    234234  </ItemGroup> 
     235  <ItemGroup> 
     236    <Compile Include="level1.png"> 
     237      <Name>level1</Name> 
     238      <Importer>TextureImporter</Importer> 
     239      <Processor>TextureProcessor</Processor> 
     240    </Compile> 
     241  </ItemGroup> 
     242  <ItemGroup> 
     243    <Compile Include="grass.png"> 
     244      <Name>grass</Name> 
     245      <Importer>TextureImporter</Importer> 
     246      <Processor>TextureProcessor</Processor> 
     247    </Compile> 
     248  </ItemGroup> 
    235249  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    236250  <!--  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.