Changeset 3672


Ignore:
Timestamp:
2012-07-06 12:47:18 (11 years ago)
Author:
janiemit
Message:
 
Location:
2012/27/JuhoK/Impossible/Impossible
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • 2012/27/JuhoK/Impossible/Impossible/Impossible/Impossible.cs

    r3619 r3672  
    2222    Image pelaajanKuva = LoadImage("cube"); 
    2323    Image maanKuva = LoadImage("viiva"); 
     24    Image gameoverKuva = LoadImage("gameover"); 
    2425 
    2526    Vector currPos; 
     
    3031    public override void Begin() 
    3132    { 
     33        Content.Load<Microsoft.Xna.Framework.Media.Song>("track1"); 
     34 
    3235        IsMouseVisible = true; 
    3336        Level.BackgroundColor = Color.Black; 
     
    8083            Keyboard.Listen(Key.Space, ButtonState.Down, jump, null); 
    8184            Keyboard.Listen(Key.Enter, ButtonState.Pressed, startGame, null); 
    82  
    83             Gravity = new Vector(0, -7500); 
     85            Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, null); 
     86 
     87            Gravity = new Vector(0, -5000); 
    8488 
    8589            Camera.Follow(pelaajanHaamu); 
     
    9094        } 
    9195        else { gameOver(); } 
    92  
    9396    } 
    9497 
     
    110113        maa.Shape = Shape.Rectangle; 
    111114        maa.Color = Color.Black; 
     115        maa.Restitution = 0.0; 
    112116        maa.IsVisible = false; 
    113117        Add(maa); 
     
    126130        palikka.Image = palikanKuva; 
    127131        palikka.Shape = Shape.Rectangle; 
     132        palikka.Restitution = 0.0; 
    128133        palikka.Color = Color.Gray; 
    129134        Add(palikka); 
     
    143148    void LuoPelaaja(Vector paikka, double leveys, double korkeus) 
    144149    { 
    145         cube = new PlatformCharacter(leveys, korkeus); 
     150        cube = new PlatformCharacter (leveys, korkeus); 
    146151        cube.Image = pelaajanKuva; 
    147152        cube.Shape = Shape.Rectangle; 
    148153        cube.Position = paikka; 
    149154        cube.CanRotate = false; 
     155        cube.Restitution = 0.0; 
    150156        cube.Y += 1; 
    151157        Add(cube, -1); 
     
    178184    void jump() 
    179185    { 
    180         cube.Jump(1250); 
     186        cube.Jump(2000); 
    181187    } 
    182188 
     
    205211    void gameOver() 
    206212    { 
    207         Level.BackgroundColor = Color.Pink; 
    208         MessageDisplay.Add("OutOfMemoryExeption; GAME ABORTED!"); 
     213        ClearAll(); 
     214        Widget gameover = new Widget(Screen.Width, Screen.Height); 
     215        gameover.Image = gameoverKuva; 
     216        Add(gameover); 
     217        //Keyboard.Listen(... 
    209218    } 
    210219} 
  • 2012/27/JuhoK/Impossible/Impossible/Impossible/Impossible.csproj.Debug.cachefile

    r3610 r3672  
    77Content\explosion.xnb 
    88Content\track1.xnb 
     9Content\gameover.xnb 
    910Content\track1.wma 
    1011Content\piikki.png 
  • 2012/27/JuhoK/Impossible/Impossible/ImpossibleContent/ImpossibleContent.contentproj

    r3590 r3672  
    101101    </Compile> 
    102102  </ItemGroup> 
     103  <ItemGroup> 
     104    <Compile Include="gameover.jpg"> 
     105      <Name>gameover</Name> 
     106      <Importer>TextureImporter</Importer> 
     107      <Processor>TextureProcessor</Processor> 
     108    </Compile> 
     109  </ItemGroup> 
    103110  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    104111  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2012/27/JuhoK/Impossible/Impossible/ImpossibleContent/kentta1.txt

    r3618 r3672  
     1 
     2                                                                                                    
     3               AAA                 QQQQQQQQQ     UUUUUUUU     UUUUUUUU           AAA                
     4              A:::A              QQ:::::::::QQ   U::::::U     U::::::U          A:::A               
     5             A:::::A           QQ:::::::::::::QQ U::::::U     U::::::U         A:::::A              
     6            A:::::::A         Q:::::::QQQ:::::::QUU:::::U     U:::::UU        A:::::::A             
     7           A:::::::::A        Q::::::O   Q::::::Q U:::::U     U:::::U        A:::::::::A            
     8          A:::::A:::::A       Q:::::O     Q:::::Q U:::::D     D:::::U       A:::::A:::::A           
     9         A:::::A A:::::A      Q:::::O     Q:::::Q U:::::D     D:::::U      A:::::A A:::::A          
     10        A:::::A   A:::::A     Q:::::O     Q:::::Q U:::::D     D:::::U     A:::::A   A:::::A         
     11       A:::::A     A:::::A    Q:::::O     Q:::::Q U:::::D     D:::::U    A:::::A     A:::::A        
     12      A:::::AAAAAAAAA:::::A   Q:::::O     Q:::::Q U:::::D     D:::::U   A:::::AAAAAAAAA:::::A       
     13     A:::::::::::::::::::::A  Q:::::O  QQQQ:::::Q U:::::D     D:::::U  A:::::::::::::::::::::A      
     14    A:::::AAAAAAAAAAAAA:::::A Q::::::O Q::::::::Q U::::::U   U::::::U A:::::AAAAAAAAAAAAA:::::A     
     15   A:::::A             A:::::AQ:::::::QQ::::::::Q U:::::::UUU:::::::UA:::::A             A:::::A    
     16  A:::::A               A:::::AQQ::::::::::::::Q   UU:::::::::::::UUA:::::A               A:::::A   
     17 A:::::A                 A:::::A QQ:::::::::::Q      UU:::::::::UU A:::::A                 A:::::A  
     18AAAAAAA                   AAAAAAA  QQQQQQQQ::::QQ      UUUUUUUUU  AAAAAAA                   AAAAAAA 
     19                                           Q:::::Q                                                  
     20                                            QQQQQQ                                                                                                                                                                             
    121 
    222 
     
    1030 
    1131 
    12  
    13  
    14  
    15  
    16  
    17  
    18  
    19  
    20  
    21  
    22  
    23  
    24  
    25  
    26  
    27 P               L       L       L       L       L       L       L       L                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 M 
    28 ______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ 
     32                                                                                                                                                                                              L                                
     33                                                                                                                                                                               LLL            =                   ==        =                                                       = 
     34                                                                                                                                                                          ============   ======   ================           =                                                                                                                                                                         = 
     35                                                                                                                                                                     =                                                       =   
     36                                                                                                                                                                =                                                            =        
     37                                                                                                                                                           =                                                                 =     
     38                                                                                                                                                      =                                                                      =   
     39                                                                                                                                                 =                                                                           =         
     40                                                                                                                                            =                                          ============================          =                             
     41                                                                                                                                       =                                              =                                      =    
     42                                                                                                                                  =                                                  =                                       =            
     43                                                                                                                             =                                                       =                                       =                 
     44                                                                                                                         ====                                                       =                                        =         
     45                                                                                                                     ====                                                           =                                        =            
     46                                                                                                                 ====                                 L                             =                                        =                 
     47                                                                                                             ====                                     =       L      L            = =                           LLLLLLLLLL  LLLLLLL       
     48                                                                                                         ====                              ===============================================================================  ========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== 
     49                                                                                           =====     ====                                =                                    
     50                                                                                       ====                                         =                                        = 
     51                                                                                   =====                             ================                                        = 
     52P              L       L      L       LL      L       L       L       L       =====                       L                               L     L     L     L     L        =                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          M 
     53_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ 
Note: See TracChangeset for help on using the changeset viewer.