Changeset 6506 for 2015


Ignore:
Timestamp:
2015-06-29 12:33:59 (8 years ago)
Author:
misakana
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/JaakkoS/Pong/Pong/Pong/Pong.cs

    r6492 r6506  
    1515        Luokentta(); 
    1616        AloitaPeli(); 
     17        AsetaOhjaimet(); 
    1718 
    18         PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    19         Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    2019 
    2120    } 
     
    5756        Add(maila); 
    5857    } 
     58    void AsetaOhjaimet() 
     59    { 
     60        Keyboard.Listen(Key.A, ButtonState.Down, LiikutaMaila1Ylos, "Pelaaja 1: Liikuta mailaasi ylös"); 
     61        Keyboard.Listen(Key.A, ButtonState.Released, PysaytaMaila1, null); 
     62 
     63        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     64    } 
     65    void AsetaNopeus(PhysicsObject maila, Vector nopeus) 
     66    { 
     67        maila.Velocity = nopeus; 
     68    } 
    5969} 
    6070 
Note: See TracChangeset for help on using the changeset viewer.