Jadwiga Śmiarowska
Jadwiga Śmiarowska

Reputation: 67

SFML C++ getSize() and sprite.move() in SFML.net

My first question is if C++:

pTexture.getSize().x

equals C# (because this is no result for me using this):

pTexture.Size().X

Second question is about C++ code (how to write in SFML.net this line).

pImage.move(0,-1)

pImage is Sprite and pTexture is Texture of course.

Upvotes: 1

Views: 1403

Answers (1)

Maxime Alvarez
Maxime Alvarez

Reputation: 180

In SFML.NET there is no getter/setter methods for properties, so in order to get/set the size you have to :

texture.Size = // ...
myfunction(texture.Size);

As there is no setter method, you have to use += on the Position property to simulate the move method.

Upvotes: 1

Related Questions