Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

String asset name problem - help

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles