Vector2 position; Vector2 speed; Rectangle screenRectangle; Vector2 direction;
all have the same error, "is never assigned to and will always have its default value". But I do think I am assigning them each in my classes.
//This is My Computer Class Constructor Which Inherits from the BasePaddle Class
public ComputerPaddle(Texture2D texture, Rectangle screenBounds, Vector2 direction, Vector2 position, SpriteManager spriteManager)
: base(texture, screenBounds, direction, position)
{
this.texture = texture;
this.screenBounds = screenBounds;
this.direction = direction;
this.position = position;
this.spriteManager = spriteManager;
}
//This is my Player Paddle Class Constructor Which Inherits from the BasePaddle Class
public PlayerPaddle(Texture2D texture, Rectangle screenBounds, Vector2 direction, Vector2 position)
: base(texture, screenBounds, direction, position)
{
this.texture = texture;
this.screenBounds = screenBounds;
this.direction = direction;
this.position = position;
}
So what I am i doing wrong? I don't know why my SpriteManager has null fields when I (I think) i am assigning them, I am sorry that I am asking so many questions, I don't have anyone other than you to ask.
So my question is why are my SpriteManager fields null? I don't understand what I am doing wrong/ I don't know what I didn't do.
Edited by mistervirtue, 25 October 2012 - 04:20 PM.






