All pastes #348266 Raw Edit

Xodus

public text v1 · immutable
·published 2007-02-10 01:13 UTC
rendered paste body
namespace pong
{
    class player
    {
        KeyboardState newState = Keyboard.GetState();
        public int playerPos;
        public void updatePos()
        {
            if(newState.IsKeyDown(Keys.A))
            {               
                playerPos = playerPos - 10;

            }
            if(newState.IsKeyDown(Keys.D))
            {
                playerPos = playerPos + 10;
                
            }
            
        }

    }
}