Ignore:
Timestamp:
2011-07-25 14:36:10 (8 years ago)
Author:
anlakane
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2011/23/anlakane/SpeedKing/SpeedKing/SpeedKing/Peli.cs

    r2014 r2453  
    3939    public override void Begin() 
    4040    { 
     41        ClearAll(); 
    4142        Phone.DisplayResolution = DisplayResolution.Large; 
    42         //Phone.DisplayResolution = DisplayResolution.Small; 
    43         topten.Text = ""; 
     43        topten.Text = "SpeedKing Hall of Fame"; 
    4444        painikkeet = new List<GameObject>(); 
    4545        painamattomat = new List<GameObject>(); 
     
    4848        Level.Width = 800; 
    4949        Level.Height = 480; 
     50 
     51        Level.Background.Image = LoadImage("alkukuva"); 
     52        Level.Background.Size = new Vector(Level.Width, Level.Height); 
     53        TouchPanel.Listen(ButtonState.Pressed, delegate(Touch t) { AlustaPeli(); }, null); 
     54        PhoneBackButton.Listen(Exit, ""); 
     55 
     56    } 
     57 
     58    void AlustaPeli() 
     59    { 
    5060        Level.Background.Image = LoadImage("tausta"); 
    5161        Level.Background.Size = new Vector(Level.Width, Level.Height); 
     
    6474 
    6575        LisaaPistenaytto(); 
    66         AloitaPeli(); 
    67  
     76        AloitaPeliJaResetoiKosketus(); 
     77    } 
     78 
     79    public override void Continue() 
     80    { 
     81        Begin(); 
    6882    } 
    6983 
     
    141155 
    142156        TouchPanel.Listen(ButtonState.Pressed, NayttoaPainettu, null); 
    143  
    144         //Keyboard.Listen(Key.J, ButtonState.Pressed, NappainPainettu, null, 4); 
    145         //Keyboard.Listen(Key.K, ButtonState.Pressed, NappainPainettu, null, 5); 
    146         //Keyboard.Listen(Key.L, ButtonState.Pressed, NappainPainettu, null, 6); 
    147         //Keyboard.Listen(Key., ButtonState.Pressed, NappainPainettu, null, 7); 
     157        PhoneBackButton.Listen(Begin, ""); 
    148158 
    149159        #region debug 
     
    210220        topten.EnterAndShow(montakoPainikettaPainettu); 
    211221        Keyboard.Listen(Key.Enter, ButtonState.Pressed, AloitaPeli, null); 
    212         TouchPanel.Listen(ButtonState.Pressed, AloitaPeliJaResetoiKosketus, null); 
    213     } 
    214  
    215     void AloitaPeliJaResetoiKosketus(Touch touch) 
     222        TouchPanel.Listen(ButtonState.Pressed, delegate { AloitaPeliJaResetoiKosketus(); }, null); 
     223    } 
     224 
     225    void AloitaPeliJaResetoiKosketus() 
    216226    { 
    217227        ClearControls(); 
Note: See TracChangeset for help on using the changeset viewer.