Changeset 1093 for 2010


Ignore:
Timestamp:
2010-07-06 14:53:06 (10 years ago)
Author:
paaaanro
Message:

hAXX

Location:
2010/27/juliuski/pong
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 2010/27/juliuski/pong/Content/Content.contentproj

    r1063 r1093  
    1 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> 
     1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> 
    22  <PropertyGroup> 
    33    <ProjectGuid>f9c780b3-7d12-46e1-a31f-6304b90aa913</ProjectGuid> 
     
    3434    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d" /> 
    3535  </ItemGroup> 
     36  <ItemGroup> 
     37    <Compile Include="Pong.PNG"> 
     38      <Name>Pong</Name> 
     39      <Importer>TextureImporter</Importer> 
     40      <Processor>TextureProcessor</Processor> 
     41    </Compile> 
     42  </ItemGroup> 
    3643</Project> 
  • 2010/27/juliuski/pong/Ohjelma.cs

    r1063 r1093  
    88        { 
    99#if !DEBUG 
    10             game.IsFullScreen = true; 
     10                  SetWindowSize( 600,600,false);  
     11 
     12            
    1113#endif 
    1214            game.Run(); 
    1315        } 
     16 
    1417    } 
     18     
     19         
     20     
    1521} 
    1622 
  • 2010/27/juliuski/pong/Peli.cs

    r1063 r1093  
    66public class Peli : PhysicsGame 
    77{ 
    8     Vector nopeusYlos = new Vector(0, 200); 
    9     Vector nopeusAlas = new Vector(0, -200); 
    10  
     8    Vector nopeusYlos = new Vector(0, 700); 
     9    Vector nopeusAlas = new Vector(0, -700); 
     10    PhysicsObject pallo2; 
    1111    PhysicsObject pallo; 
    1212    PhysicsObject maila1; 
     
    2525    protected override void Begin() 
    2626    { 
     27         
    2728        luokentta(); 
    2829        AsetaOhjaimet(); 
    2930        aloitapeli(); 
    3031        LisaaLaskurit(); 
     32        
    3133 
    3234 
     
    3739    void luokentta() 
    3840    { 
    39         pallo = new PhysicsObject(40.0, 40.0); 
     41 
     42        pallo = new PhysicsObject(20.0, 20.0); 
    4043        Add(pallo); 
    41         pallo.Shape = Shapes.Triangle; 
    42         pallo.Color = Color.Pink; 
     44        pallo.Shape = Shapes.Rectangle; 
     45        pallo.Color = Color.White; 
    4346        pallo.X = -200.0; 
    4447        pallo.Y = 0.0; 
    45         pallo.Restitution = 1.1; 
    46         Level.BackgroundColor = Color.Green; 
     48        pallo.Restitution = 1; 
     49        pallo2 = new PhysicsObject(20.0, 20.0); 
     50        Add(pallo2); 
     51        pallo2.Shape = Shapes.Rectangle; 
     52        pallo2.Color = Color.White; 
     53        pallo2.X = -220.0; 
     54        pallo2.Y = 0.0; 
     55        pallo2.Restitution = 1; 
     56 
     57        Level.BackgroundColor = Color.Black; 
    4758        Camera.ZoomToLevel(); 
    4859        vasenReuna = Level.CreateLeftBorder(); 
    49         vasenReuna.Restitution = 1.0; 
     60        vasenReuna.Restitution = 1; 
    5061        vasenReuna.IsVisible = false; 
    5162        oikeaReuna = Level.CreateRightBorder(); 
    52         oikeaReuna.Restitution = 1.0; 
     63        oikeaReuna.Restitution = 1; 
    5364        oikeaReuna.IsVisible = false; 
    5465        alaReuna = Level.CreateBottomBorder(); 
    55         alaReuna.Restitution = 1.0; 
     66        alaReuna.Restitution = 1; 
    5667        alaReuna.IsVisible = false; 
    5768        ylaReuna = Level.CreateTopBorder(); 
    58         ylaReuna.Restitution = 1.0; 
     69        ylaReuna.Restitution = 1; 
    5970        ylaReuna.IsVisible = false; 
    6071        maila1 = LuoMaila(Level.Left + 20.0, 0.0); 
    6172        maila2 = LuoMaila(Level.Right - 20.0, 0.0); 
    6273        AddCollisionHandler(pallo, KasittelePallonTormays); 
    63  
     74        AddCollisionHandler(pallo2, KasittelePallonTormays); 
    6475 
    6576    } 
     
    6980        pallo.Hit(impulssi); 
    7081 
     82        pallo2.Hit(impulssi); 
    7183 
    7284 
     
    7587    { 
    7688        PhysicsObject maila = PhysicsObject.CreateStaticObject(20.0, 100.0); 
    77         maila.Shape = Shapes.Circle; 
     89        maila.Shape = Shapes.Rectangle; 
     90 
    7891        maila.X = x; 
    7992        maila.Y = y; 
    80         maila.Restitution = 1.001; 
     93        maila.Restitution = 1.0; 
    8194        Add(maila); 
    8295 
     
    95108        Keyboard.Listen(Key.Down, ButtonState.Down, AsetaNopeus, "Pelaaja 2: Liikuta mailaa alas", maila2, nopeusAlas); 
    96109        Keyboard.Listen(Key.Down, ButtonState.Released, AsetaNopeus, null, maila2, Vector.Zero); 
    97  
     110        
    98111        Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 
    99112        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Poistu"); 
     
    132145    { 
    133146        IntMeter laskuri = new IntMeter(0); 
    134         laskuri.MaxValue = 10; 
     147        laskuri.MaxValue = 9; 
    135148        Label naytto = new Label(); 
    136149        naytto.BindTo(laskuri); 
     
    144157 
    145158 
    146     void KasittelePallonTormays(PhysicsObject pallo, PhysicsObject kohde) 
     159    void KasittelePallonTormays(PhysicsObject erkki, PhysicsObject kohde) 
    147160    { 
    148161        if (kohde == oikeaReuna) 
     
    155168        } 
    156169    } 
    157  
    158  
    159170} 
    160  
  • 2010/27/juliuski/pong/pong.csproj

    r1063 r1093  
    8989    <Content Include="Game.ico" /> 
    9090    <Content Include="GameThumbnail.png" /> 
     91    <Content Include="Pong.ico" /> 
     92    <Content Include="Pong.PNG" /> 
    9193  </ItemGroup> 
    9294  <ItemGroup> 
  • 2010/27/juliuski/pong/pong.sln

    r1063 r1093  
    66Global 
    77        GlobalSection(SolutionConfigurationPlatforms) = preSolution 
     8                Debug|Mixed Platforms = Debug|Mixed Platforms 
    89                Debug|x86 = Debug|x86 
     10                Debug|Xbox 360 = Debug|Xbox 360 
     11                Release|Mixed Platforms = Release|Mixed Platforms 
    912                Release|x86 = Release|x86 
     13                Release|Xbox 360 = Release|Xbox 360 
    1014        EndGlobalSection 
    1115        GlobalSection(ProjectConfigurationPlatforms) = postSolution 
     16                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 
     17                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Debug|Mixed Platforms.Build.0 = Debug|x86 
    1218                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Debug|x86.ActiveCfg = Debug|x86 
    1319                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Debug|x86.Build.0 = Debug|x86 
     20                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Debug|Xbox 360.ActiveCfg = Debug|x86 
     21                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Release|Mixed Platforms.ActiveCfg = Release|x86 
     22                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Release|Mixed Platforms.Build.0 = Release|x86 
    1423                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Release|x86.ActiveCfg = Release|x86 
    1524                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Release|x86.Build.0 = Release|x86 
     25                {B4190151-FC24-49BF-9FDE-91A528B40C64}.Release|Xbox 360.ActiveCfg = Release|x86 
     26                {F9C780B3-7D12-46E1-A31F-6304B90AA913}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 
    1627                {F9C780B3-7D12-46E1-A31F-6304B90AA913}.Debug|x86.ActiveCfg = Debug|x86 
     28                {F9C780B3-7D12-46E1-A31F-6304B90AA913}.Debug|Xbox 360.ActiveCfg = Debug|x86 
     29                {F9C780B3-7D12-46E1-A31F-6304B90AA913}.Release|Mixed Platforms.ActiveCfg = Release|x86 
    1730                {F9C780B3-7D12-46E1-A31F-6304B90AA913}.Release|x86.ActiveCfg = Release|x86 
     31                {F9C780B3-7D12-46E1-A31F-6304B90AA913}.Release|Xbox 360.ActiveCfg = Release|x86 
    1832        EndGlobalSection 
    1933        GlobalSection(SolutionProperties) = preSolution 
Note: See TracChangeset for help on using the changeset viewer.