Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Need clarification...  (Read 1529 times)

0 Members and 1 Guest are viewing this topic.

David

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Need clarification...
« on: May 23, 2011, 02:37:55 am »
I'm still confused about the sprite class (I'm use to actionscript)

How do you change from one picture to another, like in a walk cycle?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Need clarification...
« Reply #1 on: May 23, 2011, 07:41:34 am »
Either SetImage or SetSubRect, depending if your animation frames are in separate images or all in the same one.
Laurent Gomila - SFML developer

AdventWolf

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Need clarification...
« Reply #2 on: May 25, 2011, 08:32:12 pm »
There is an example in the wiki that I used called "Frame, Anim, Animated."
Basically you have a image file that has multiple character movement actions and based on which buttons your are pressing, your character will display that movement. It should help you out.

 

anything