Changeset 2219 for 2011


Ignore:
Timestamp:
2011-06-28 13:03:51 (8 years ago)
Author:
teeevasa
Message:

Talletus.

Location:
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372
Files:
2 edited

Legend:

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

    r2217 r2219  
    2929    } 
    3030 
     31    // Players and enemies have different ways of attacking 
     32    private abstract void attack(); 
     33 
    3134    // A particlular method for reducing hit points. It also handles death, when it  
    3235    private void reduceHitPointsBy(int reduction) 
  • 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Player.cs

    r2218 r2219  
    99{ 
    1010    const int speed = 200; 
     11    const int jumpSpeed = 1000; 
     12    Image portrait = LoadImage(""); 
    1113 
    1214        public Player(double width, double height, Shape shape) 
     
    1921    public void addControls() 
    2022    { 
    21         //Keyboard.Listen(Key.Right, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 
    2223        Game.Keyboard.Listen(Key.Right, ButtonState.Down, moveRight, "Moves right", speed); 
     24        Game.Keyboard.Listen(Key.Left, ButtonState.Down, moveLeft, "Moves left", speed); 
     25        Game.Keyboard.Listen(Key.Up, ButtonState.Down, jump, "Jumps", jumpSpeed); 
    2326    } 
    2427 
     
    3336    } 
    3437 
     38    public void jump(int jumpSpeed) 
     39    { 
     40        this.Jump(jumpSpeed); 
     41    } 
     42 
    3543} 
Note: See TracChangeset for help on using the changeset viewer.