Friday 15 August 2014

C++ SFML - Render at Specific Coordinates -


I want to make my own game rendering style, but I want to know how to present a sprite on specific coordinates in SFML. I know that you can do things like sprite.setPositon (20, 56) , but I like it more like window.drawAt (mySprite, 20, 56) I want to do it, because it will be very easy.

Make a function that takes a window and sprite from context. {// set straight position, then grab it} / Pre>

Then you can call it like this:

  drawAt (window, image, 20, 56);   

which is as simple as:

  window.drawAt (mySprite, 20, 56);    

No comments:

Post a Comment