Changeset 760 for 2010/23


Ignore:
Timestamp:
2010-06-11 13:18:34 (13 years ago)
Author:
rikaroih
Message:

valmis peli

Location:
2010/23/rikaroih/Autopeli1
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2010/23/rikaroih/Autopeli1/Content/Content.contentproj

    r738 r760  
    105105    </Compile> 
    106106  </ItemGroup> 
     107  <ItemGroup> 
     108    <Compile Include="terminator100.jpg"> 
     109      <Name>terminator100</Name> 
     110      <Importer>TextureImporter</Importer> 
     111      <Processor>TextureProcessor</Processor> 
     112    </Compile> 
     113  </ItemGroup> 
    107114  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    108115  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
  • 2010/23/rikaroih/Autopeli1/Peli.cs

    r738 r760  
    4343        { 
    4444            Timer ajastin = new Timer(); 
    45             ajastin.Interval = 20; 
     45            ajastin.Interval = 40; 
    4646            ajastin.Trigger += PeliVoitettu; 
    4747            Add(ajastin); 
     
    5656        { 
    5757            MessageDisplay.TextColor = Color.White; 
    58             Level.Background.Image = LoadImage("starwars2"); 
    59  
     58            if (TyyppejaHengissa > 0) 
     59            { 
     60                Level.Background.Image = LoadImage("starwars2"); 
     61            } 
     62            else 
     63            { 
     64                Level.Background.Image = LoadImage("terminator100");  
     65            } 
    6066        } 
    6167 
     
    198204        void collisionOfAuto(PhysicsObject auto, PhysicsObject target) 
    199205        { 
    200             if ( target.Equals(pallo) || target.Equals(pallo2) || target.Equals(pallo3) || target.Equals(pallo4)) 
     206            if (target.Equals(pallo) || target.Equals(pallo2) || target.Equals(pallo3) || target.Equals(pallo4)) 
    201207            { 
     208                TyyppejaHengissa -= 1; 
    202209                Explosion rajahdys = new Explosion(200); 
    203210                rajahdys.Position = auto.Position; 
    204                 TyyppejaHengissa -= 1; 
    205211                rajahdys.Force = 100; 
    206212                Add(rajahdys); 
    207  
    208                 auto.Destroy(); 
     213                auto.Destroy();  
     214                 
     215                if (TyyppejaHengissa == 0) 
     216                { 
     217                    PeliVoitettu(new Timer()); 
     218                    return; 
     219                } 
    209220            } 
    210221        } 
Note: See TracChangeset for help on using the changeset viewer.