Changeset 1857 for 2011/23


Ignore:
Timestamp:
2011-06-10 10:01:55 (12 years ago)
Author:
tueesuih
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2011/23/tueesuih/Barricade/Barricade.cs

    r1849 r1857  
    1717    const int ruudunKorkeus = 2000; 
    1818    Timer aikaLaskuri; 
     19    Timer pisteLaskuri; 
    1920 
    2021    Image barricade = LoadImage("Barricade alus"); 
     
    7475        alus.Destroy(); 
    7576 
    76         Timer.SingleShot(2.5, TopIkkuna); 
    77  
    78  
     77        if (pisteLaskuri == null)  
     78        { 
     79            pisteLaskuri = new Timer(); 
     80            pisteLaskuri.Trigger += TopIkkuna; 
     81            pisteLaskuri.Interval = 2.5; 
     82        } 
     83          
     84        if (!pisteLaskuri.Enabled) 
     85        { 
     86            pisteLaskuri.Start(); 
     87        } 
     88        //Timer.SingleShot(2.5, TopIkkuna); 
     89 
     90 
     91 
     92 
     93    } 
     94 
     95    void pisteLaskuri_Trigger(Timer sender) 
     96    { 
     97        throw new NotImplementedException(); 
    7998    } 
    8099    void Restart() 
     
    154173        aikaNaytto.X = Screen.Right - 100; 
    155174        aikaNaytto.Y = Screen.Top - 50; 
     175 
     176 
    156177    } 
    157178 
     
    248269    } 
    249270 
    250     void TopIkkuna() 
    251     { 
    252         HighScoreWindow topIkkuna = new HighScoreWindow("barricade", 
     271    void TopIkkuna(Timer sender) 
     272    { 
     273       HighScoreWindow topIkkuna = new HighScoreWindow("barricade", 
    253274       "High scores", 
    254275       "CONGRATULATIONS, %p! type your name here:", 
     
    256277        topIkkuna.Closed += TallennaPisteet; 
    257278        Add(topIkkuna); 
     279        pisteLaskuri.Stop(); 
    258280    } 
    259281 
Note: See TracChangeset for help on using the changeset viewer.