All pastes #348220 Raw Edit

Xodus

public text v1 · immutable
·published 2007-02-10 00:37 UTC
rendered paste body
#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
#endregion

namespace pong
{
    class player
    {
        int playerPos;
        public int updatePos(int playerPos)
        {
            int aiPos;

            //if (GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X == ButtonState.Pressed)
            //{
            //    //DO this.
            //}

            KeyboardState newState = new KeyboardState();

            if(newState.IsKeyDown(Keys.A))
            {
                get{ return playerPos; }
                playerPos = playerPos++;
            }
             //public int MyInt { get { return myInt; } }
            if(newState.IsKeyDown(Keys.D))
            {
                playerPos++;
                
            }
            if(newState.IsKeyDown(Keys.Escape))
            {
                this.Exit();
            }
            
        }

    }
}