Ignore:
Timestamp:
2011-06-29 14:46:44 (8 years ago)
Author:
teeevasa
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Player.cs

    r2286 r2300  
    99{ 
    1010    const int speed = 200; 
    11     const int jumpSpeed = 1000; 
     11    const int jumpSpeed = 500; 
    1212    const int mass = 10; 
    1313    Image portrait = Game.LoadImage("Images/character"); 
     
    1515 
    1616    Timer walker; 
    17      
    1817 
    1918        public Player(double width, double height, Shape shape) 
     
    2524 
    2625        walker = new Timer(); 
    27         walker.Interval = 1.0; 
     26        walker.Interval = 0.7; 
    2827        walker.Trigger += playWalkingSound; 
    2928 
     29        this.Weapon = new Pistol(20.0, 10.0); 
    3030        } 
    3131 
     
    3535        Game.Keyboard.Listen(Key.Left, ButtonState.Down, moveLeft, "Moves left", speed); 
    3636        Game.Keyboard.Listen(Key.Up, ButtonState.Down, jump, "Jumps", jumpSpeed); 
     37        Game.Keyboard.Listen(Key.Space, ButtonState.Pressed, shoot, "Shoots"); 
     38    } 
     39 
     40    private void shoot() 
     41    { 
     42        this.Weapon.Shoot(); 
    3743    } 
    3844 
Note: See TracChangeset for help on using the changeset viewer.