source: 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Player.cs @ 2217

Revision 2217, 680 bytes checked in by teeevasa, 8 years ago (diff)

Talletus.

Line 
1using System;
2using Jypeli;
3using Jypeli.Assets;
4using Jypeli.Controls;
5using Jypeli.Effects;
6using Jypeli.Widgets;
7
8public class Player : GenCharacter
9{
10    const int speed = 200;
11
12        public Player(double width, double height, Shape shape)
13        : base(width, height, shape)
14        {
15        hitPoints = 100;
16        addControls();
17        }
18
19    public void addControls()
20    {
21        //Keyboard.Listen(Key.Right, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus);
22        Game.Keyboard.Listen(Key.Right, ButtonState.Down, moveRight, "Moves right", speed);
23    }
24
25    public void moveRight(int speed)
26    {
27        this.Walk(speed);
28    }
29}
Note: See TracBrowser for help on using the repository browser.