Hello Guest

Author Topic: api to select a different anim lib at runtime  (Read 4666 times)

fabrejean

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
api to select a different anim lib at runtime
« on: February 08, 2013, 08:14:23 am »
Hello,

 following a request on a playmaker User, I'd like to know how to select a different collection on a animated sprite. Currently I can select the clip fine, but I can't find a convenient runtime api to select a collection by its name.

 Is it possible?

bye,

 Jean

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: api to select a different anim lib at runtime
« Reply #1 on: February 08, 2013, 02:42:10 pm »
I don't know much about Playmaker, don't use it or have a license, but a bit of googling has brought me to this page:
https://hutonggames.fogbugz.com/default.asp?W104

So similarly to that, can't you simply store a reference to an tk2dSpriteAnimation, and a string name? Then you can pull the clip from that name. You can do the same with sprites from differrent sprite collections (store a tk2dSpriteCollectionData, and a name).

Wouldn't that work for you?