Maybe easy question, Extending SKSpriteNode and assign an image

I have

public class TestSprite : SKSpriteNode

    public TestSprite(CGPoint initialPosition, string name)

            var body = SKPhysicsBody.Create(Texture, Size);
        body.CategoryBitMask = Category.Ban;
        body.CollisionBitMask = Category.MouthContact | Category.Edge;
        body.ContactTestBitMask = body.CollisionBitMask;
        body.UsesPreciseCollisionDetection = true;
        PhysicsBody = body;


Except the FromImageNamed doesn't want to work.

It seems like I should be able to create the SKSpriteNode and bring in an image ?

Thanks for any pointers!



Sign In or Register to comment.