Ignore:
Timestamp:
2011-07-01 11:44:52 (12 years ago)
Author:
jokrhiet
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/JoelH/THPeli/THPeli/Peli.cs

    r2381 r2404  
    99public class Peli : PhysicsGame 
    1010{ 
     11    IntMeter pisteLaskuri; 
    1112    int pMaxMaara = 200; 
    1213    ExplosionSystem rajahdys = new ExplosionSystem(LoadImage("explosio"), 500); 
     
    1516    const double nopeus = 300; 
    1617    const double hyppyNopeus = 1000; 
    17     const int RUUDUN_KOKO = 40; 
     18    const int RUUDUN_KOKO = 41; 
    1819    PlatformCharacter pelaaja1; 
    1920 
     
    4546        luoKentta(); 
    4647        lisaaNappaimet(); 
     48        LuoLaskuri(); 
     49        LuopisteLaskuri(); 
     50 
    4751 
    4852        Camera.Follow(pelaaja1); 
     
    5660        ClearAll(); 
    5761        valikonKohdat = new List<Label>(); 
     62 
     63        Level.BackgroundColor = Color.Black; 
    5864        Level.Background.Image = splashscreen; 
    5965        Level.BackgroundColor = Color.Black; 
     
    94100        } 
    95101    } 
     102        void LuopisteLaskuri() 
     103    { 
     104        pisteLaskuri = new IntMeter(0); 
     105 
     106        Label pisteNaytto = new Label(); 
     107        pisteNaytto.BindTo(pisteLaskuri); 
     108        pisteNaytto.X = Screen.Left + 50; 
     109        Add(pisteNaytto); 
     110    } 
     111 
     112    void LuoLaskuri() 
     113    { 
     114        Label pisteNaytto = new Label(); 
     115        pisteNaytto.X = Screen.Left + 150; 
     116        pisteNaytto.TextColor = Color.Red; 
     117 
     118        Add(pisteNaytto); 
     119 
     120        Label pisteTeksti = new Label("pistettä"); 
     121        pisteTeksti.X = Screen.Left +130; 
     122        pisteTeksti.TextColor = Color.Red; 
     123        Add(pisteTeksti); 
     124    } 
     125 
    96126 
    97127    void luoKentta() 
     
    162192        { 
    163193            Add(rajahdys); 
    164             //double X = 0; 
    165             //double Y = 0; 
    166             int pMaara = 600; 
    167             rajahdys.MaxScale = 6; 
     194            int pMaara = 500000; 
     195            rajahdys.MaxScale = 3; 
    168196            rajahdys.MinScale = 1; 
    169197            rajahdys.MinLifetime = 0.1; 
    170198            rajahdys.MaxLifetime = 0.5; 
    171199            rajahdys.AddEffect( kohde.Position, pMaara ); 
     200            pisteLaskuri.Value++; 
     201 
    172202 
    173203            kohde.Destroy(); 
    174             MessageDisplay.Add("Keräsit kristallin!!"); 
    175             MessageDisplay.TextColor = Color.White; 
    176204        } 
    177205    } 
Note: See TracChangeset for help on using the changeset viewer.