Hello Guest

Author Topic: Static/Animated Sprites together?  (Read 3858 times)

Mikael1987

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Static/Animated Sprites together?
« on: July 22, 2013, 11:48:22 am »
I'm not able to test this right now because I'm not home,so just thinking if it's possible:
I'm trying to make some kind of "inventory" in which when You first open it,the sprites are not animated,and when you hover over them,the animation starts,Is it possible to have
a "mixed" sprite that is both static and animated?,I mean I know I could just use animated sprites and set an animation to only 1 frame/image to be the static one and have it as default,and then on hover play the animation. Maybe I should just do this instead? Im just worried about performance.On the other hand I wont be having hundreds of these,maybe 20-30 tops. Thanks in advanced.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Static/Animated Sprites together?
« Reply #1 on: July 22, 2013, 12:09:36 pm »
In tk2d 2.0, the animator is separate to the sprite component. You can disable the animator component when you don't need it to be animated, and you're just dealing with a regular sprite then. When you need to animate, enable the animator and Play, when you don't need it to play, stop & disable. You get the best of both worlds that way.

Mikael1987

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Static/Animated Sprites together?
« Reply #2 on: July 22, 2013, 12:16:39 pm »
Awesome thanks,I'm not home right now so I couldn't test it before asking,was only doing some thinking here ;),thanks again.