Ignore:
Timestamp:
2016-06-07 19:48:34 (3 years ago)
Author:
sieerinn
Message:

Varjostinohjelmakikkailua

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2016/23/ohjaajat/Punasininen/Punasininen/Punasininen/Punasininen.cs

    r7197 r7198  
    1818    private Image bluepic; 
    1919    private Image redpic; 
     20    DoubleMeter percentageTracker; 
    2021 
    21     DoubleMeter percentageTracker; 
     22    private Shader shader; 
    2223 
    2324    public override void Begin() 
    2425    { 
     26        IsMouseVisible = true; // <- voi ottaa pois 
     27        shader = new Shader(GraphicsDevice, Content, Camera); 
     28 
    2529        //Gravity = new Vector(0, -1000); 
    2630        CreateLevel(); 
     
    139143        Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Ohjeet"); 
    140144        Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Lopeta"); 
     145 
     146        Mouse.Listen(MouseButton.Left, ButtonState.Pressed, () => shader.NewWave(Mouse.PositionOnWorld), null); 
    141147    } 
    142148 
     
    159165    } 
    160166 
     167    protected override void Draw(Microsoft.Xna.Framework.GameTime gameTime) 
     168    { 
     169        //shader.Draw(gameTime, base.Draw); 
    161170 
     171        shader.Draw(gameTime); 
     172        base.Draw(gameTime); 
     173        shader.DrawEnd(gameTime); 
     174    } 
    162175} 
Note: See TracChangeset for help on using the changeset viewer.