Changeset 2082 for 2011/24


Ignore:
Timestamp:
2011-06-17 10:03:52 (12 years ago)
Author:
lavevake
Message:
 
Location:
2011/24/LauriK/Call of garden Modern carrotfare 2
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2011/24/LauriK/Call of garden Modern carrotfare 2/Call of garden Modern carrotfare 2/Peli.cs

    r2059 r2082  
    4343    Image maalinKuva = LoadImage("Avain"); 
    4444    Image RahanKuva = LoadImage("Raha"); 
     45    Image alustus1 = LoadImage("alustus1"); 
    4546 
    4647    ExplosionSystem rajahdys; 
     
    9899    void luoKentta1() 
    99100    { 
    100         TileMap kentta = TileMap.FromFile("kentta1.txt"); 
    101         kentta['#'] = lisaaTaso; 
    102         kentta['K'] = lisaaTaso2; 
    103         kentta['N'] = lisaaPelaaja; 
    104         kentta['E'] = lisaaTomaatti; 
    105         kentta['L'] = LuoLipas; 
    106         kentta['A'] = LuoKranaatti; 
    107         kentta['T'] = lisaaTomaatti2; 
    108         kentta['M'] = LuoMaali; 
    109         kentta['R'] = LuoRaha; 
    110         kentta.Insert(RUUDUN_KOKO, RUUDUN_KOKO); 
    111         Level.CreateBorders(); 
    112         Level.Background.CreateGradient(Color.Blue,Color.Black); 
     101        luoAlustus1();           
     102    } 
     103 
     104    private void luoAlustus1() 
     105    { 
     106        Level.Background.Image = alustus1; 
     107        Level.Background.FitToLevel(); 
     108 
     109        ClearControls(); 
     110 
     111        Keyboard.Listen(Key.Enter, ButtonState.Pressed, TeeKentta1, "Aloita kenttä"); 
     112 
     113        ControllerOne.Listen(Button.Start, ButtonState.Pressed, TeeKentta1,"Aloita kenttä"); 
    113114    } 
    114115 
     
    654655    } 
    655656 
    656     void LuoRaha() 
     657    PhysicsObject LuoRaha() 
    657658    { 
    658659        raha = new PhysicsObject(40, 40); 
     
    670671        } 
    671672    } 
     673 
     674    void TeeKentta1() 
     675    { 
     676        TileMap kentta = TileMap.FromFile("kentta1.txt"); 
     677        kentta['#'] = lisaaTaso; 
     678        kentta['K'] = lisaaTaso2; 
     679        kentta['N'] = lisaaPelaaja; 
     680        kentta['E'] = lisaaTomaatti; 
     681        kentta['L'] = LuoLipas; 
     682        kentta['A'] = LuoKranaatti; 
     683        kentta['T'] = lisaaTomaatti2; 
     684        kentta['M'] = LuoMaali; 
     685        kentta['R'] = LuoRaha; 
     686        kentta.Insert(RUUDUN_KOKO, RUUDUN_KOKO); 
     687        Level.CreateBorders(); 
     688        Level.Background.CreateGradient(Color.Blue, Color.Black); 
     689    } 
    672690}              
  • 2011/24/LauriK/Call of garden Modern carrotfare 2/Call of garden Modern carrotfare 2Content/Call of garden Modern carrotfare 2Content.contentproj

    r2059 r2082  
    147147    </Compile> 
    148148  </ItemGroup> 
     149  <ItemGroup> 
     150    <Compile Include="alustus1.png"> 
     151      <Name>alustus1</Name> 
     152      <Importer>TextureImporter</Importer> 
     153      <Processor>TextureProcessor</Processor> 
     154    </Compile> 
     155  </ItemGroup> 
    149156  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    150157  <!--  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.