TraceRacer.PlayerObject.PlayerObject C# (CSharp) Method

PlayerObject() public method

Constructor initializes everything.
public PlayerObject ( Microsoft.Xna.Framework.Game game, SpriteBatch givenSpriteBatch, WorldObject world ) : System
game Microsoft.Xna.Framework.Game
givenSpriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
world WorldObject
return System
        public PlayerObject(Game game, SpriteBatch givenSpriteBatch, WorldObject world)
            : base(game)
        {
            World = world;
            mySpriteBatch = givenSpriteBatch;

            IsAlive = false;
            Texture = Game.Content.Load<Texture2D>("bike");

            Speed = new Vector2(Constants.NORMAL_SPEED, 0);
            Score = new TraceRacer.Score(game);
            //Position = new Vector2(Speed.X, -Texture.Height);
            Position = new Vector2(100, -Texture.Height);
            CurrentLine = world.getLine((int)Position.X);
        }