Hello Guest

Author Topic: How change one Anim Lib to another  (Read 4059 times)

echeg

  • Newbie
  • *
  • Posts: 5
    • View Profile
How change one Anim Lib to another
« on: April 01, 2013, 06:30:06 pm »
Hi.
I have 2 monsters Red and Blue. For each monster made ​​separate atlas and sprite animation. (red_sprite_collection, red_sprite_animation and blue_sprite_collection, blue_sprite_animation)
Some game logic should change the color of the monster.
Is there a method that allows to change red_sprite_collection to blue_sprite_collection?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How change one Anim Lib to another
« Reply #1 on: April 01, 2013, 08:12:42 pm »
sprite.anim = newAnimationLib;
sprite.Play( "clipName" ); // will now play from the new library.