Changeset 1858 for 2011/23


Ignore:
Timestamp:
2011-06-10 10:02:16 (12 years ago)
Author:
ookantol
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2011/23/ookantol/Haamuongelma/Haamuongelma/Peli.cs

    r1847 r1858  
    3636    { 
    3737        aloitusvalikko(); 
    38         MediaPlayer.Play("MTA"); 
    39         MediaPlayer.IsRepeating = true; 
     38        //MediaPlayer.Play("MTA"); 
     39        //MediaPlayer.IsRepeating = true; 
    4040    } 
    4141 
     
    309309 
    310310        Label kohta1 = new Label("Start Game"); 
    311         kohta1.Position = new Vector(0, 60); 
     311        kohta1.Position = new Vector(0, 80); 
    312312        Valikonkohdat.Add(kohta1); 
    313313 
    314314        Label kohta2 = new Label("Exit"); 
    315         kohta2.Position = new Vector(0, -60); 
     315        kohta2.Position = new Vector(0, -80); 
    316316        Valikonkohdat.Add(kohta2); 
    317317 
    318318        Label kohta3 = new Label("Fields"); 
    319         kohta3.Position = new Vector(0, 10); 
     319        kohta3.Position = new Vector(0, 30); 
    320320        Valikonkohdat.Add(kohta3); 
    321321 
     322        Label kohta4 = new Label("Instructions"); 
     323        kohta4.Position = new Vector(0, - 20); 
     324        Valikonkohdat.Add(kohta4); 
     325 
    322326 
    323327        foreach (Label Valikonkohta in Valikonkohdat) 
     328        { 
     329            Valikonkohta.TextColor = Color.White; 
    324330            Add(Valikonkohta); 
     331        } 
    325332 
    326333        Mouse.ListenOn(kohta1, MouseButton.Left, ButtonState.Pressed, Start, null); 
    327334        Mouse.ListenOn(kohta2, MouseButton.Left, ButtonState.Pressed, Lopeta, null); 
    328335        Mouse.ListenOn(kohta3, MouseButton.Left, ButtonState.Pressed, kentat, null); 
     336        Mouse.ListenOn(kohta4, MouseButton.Left, ButtonState.Pressed, ohjeet, null); 
     337 
     338        Keyboard.Listen(Key.Enter, ButtonState.Pressed, Start, null); 
    329339 
    330340        Mouse.IsCursorVisible = true; 
     
    340350        Level.Background.CreateGradient(Color.Orange, Color.White); 
    341351 
    342         Label kohta3 = new Label(" Just a normal day. Buddy is on his way home, when he sees mean ghosts. Lots of them. He tries to avoid them,    but then he meets dying flowers, which were dying     because of the ghosts took all the energy out of the air.   To help them, Buddy must destroy all the ghosts and                  collect clocks, that reverse time..."); 
     352        Label kohta3 = new Label(" Just a normal day. Buddy is on his way home, when he sees mean ghosts. Lots of them. He tries to avoid them,       but then he meets dying flowers, which are dying     because the ghosts took all the good energy out of the air. To help them, Buddy must destroy all the ghosts and                     collect clocks, that reverse time..."); 
    343353        kohta3.Size = new Vector(600, 130); 
    344354        kohta3.SizeMode = TextSizeMode.Wrapped; 
     
    353363 
    354364        foreach (Label Valikonkohta in Valikonkohdat) 
     365        { 
     366            Valikonkohta.TextColor = Color.White; 
    355367            Add(Valikonkohta); 
     368        } 
    356369 
    357370        Mouse.ListenOn(kohta4, MouseButton.Left, ButtonState.Pressed, Aloita, null); 
     
    371384 
    372385        Label kohta1 = new Label("Field 1"); 
    373         kohta1.Position = new Vector(0, 60); 
     386        kohta1.Position = new Vector(0, 80); 
    374387        Valikonkohdat.Add(kohta1); 
    375388 
    376389        Label kohta2 = new Label("Field 2"); 
    377         kohta2.Position = new Vector(0, 0); 
     390        kohta2.Position = new Vector(0, 20); 
    378391        Valikonkohdat.Add(kohta2); 
    379392 
    380393        Label kohta3 = new Label("Field 3"); 
    381         kohta3.Position = new Vector(0, - 60); 
     394        kohta3.Position = new Vector(0, - 40); 
    382395        Valikonkohdat.Add(kohta3); 
    383396 
     
    385398 
    386399        foreach (Label Valikonkohta in Valikonkohdat) 
     400        { 
     401            Valikonkohta.TextColor = Color.White; 
    387402            Add(Valikonkohta); 
     403        } 
    388404 
    389405        Mouse.ListenOn(kohta1, MouseButton.Left, ButtonState.Pressed, Aloita, null); 
     
    397413 
    398414    } 
     415 
     416    void ohjeet() 
     417    { 
     418        ClearAll(); 
     419        Valikonkohdat = new List<Label>(); 
     420        Level.Background.CreateGradient(Color.Orange, Color.White); 
     421 
     422        Label kohta1 = new Label("    Move Buddy with the arrow keys or with A, D and W         keys. Collect clocks, and destroy all the ghosts by                                    jumping on them."); 
     423        kohta1.Size = new Vector(600, 130);  
     424        kohta1.SizeMode = TextSizeMode.Wrapped; 
     425        kohta1.Position = new Vector(0, 100); 
     426        kohta1.TextColor = Color.Orange; 
     427        Add(kohta1); 
     428 
     429        Label kohta2 = new Label("Back"); 
     430        kohta2.Position = new Vector(0, -20); 
     431        kohta2.TextColor = Color.White; 
     432        Valikonkohdat.Add(kohta2); 
     433 
     434        foreach (Label Valikonkohta in Valikonkohdat) 
     435        { 
     436            Valikonkohta.TextColor = Color.White; 
     437            Add(Valikonkohta); 
     438        } 
     439 
     440        Mouse.ListenOn(kohta2, MouseButton.Left, ButtonState.Pressed, aloitusvalikko, null); 
     441        Keyboard.Listen(Key.Escape, ButtonState.Pressed, aloitusvalikko, null); 
     442 
     443        Mouse.ListenMovement(1.0, ValikossaLiikkuminen2, null); 
     444 
     445        Mouse.IsCursorVisible = true; 
     446    }    
    399447    void Lopeta() 
    400448    { 
Note: See TracChangeset for help on using the changeset viewer.