@Shadow_23 wrote:
So i'm learning to do 2D games with a book and i have some problem here
public class TexturedPrimitive
{
protected Texture2D mImage;
protected Vector2 mPosition;
protected Vector2 mSize;public TexturedPrimitive(string imageName, Vector2 position, Vector2 size) { mImage = Game1.sContent.Load<Texture2D>(imageName); mPosition = position; mSize = size; }
the problem is with imageName:Object reference not set to an instance of an object.
Posts: 4
Participants: 2