0

Well, I have a character with several CCB's files for each part that have some animation, so I want to know how can I access to each file, because with getChildByName or if I implemented it, I'm only getting the message: CCBReader: Couldn't find member variable.

The structure is:

-Scene
--Character / catarinaCuerpo.ccb / _catarina with Doc root var
---Head / catarinaCabeza.ccb / _catarinaCabeza with Doc root var
----Eyes / catarinaOjo.ccb / _catarinaOjo with Doc root var / the name of the timeline that I want to access is "parpadeo"
---Wings / catarinaAla.ccb / _catarinaAla with Doc root var / the name of the timeline that I want to access is "aleteo"

So, what is the way to access to this two animations with:

CCBAnimationManager* animationManagerSomething = someNode.userObject
[animationManagerSomething runAnimationsForSequenceNamed:@"animationName"];
Gergo Erdosi
  • 40,904
  • 21
  • 118
  • 94
  • 1.Scene / 1.1Character / 1.1.1.Head / 1.1.1.1. Eyes (Access to its animation)/ 1.1.2. Wings (Access to its animation). – user3739270 Jul 05 '14 at 00:20
  • doc root vars are assigned to the corresponding ccb's root node (its custom class to be precise). If the ccb is a sub file in another ccb it will not assign the ivar to the container ccb root node. You have to use getchildbyname in that case, if that's not working post your code. make sure the node's name property (not its timeline name) is set and unique. – CodeSmile Jul 05 '14 at 06:58
  • I figured out some solution but isn't satisfactory :/ http://forum.spritebuilder.com/t/access-to-a-ccb-inside-other-ccb/1419/3 – user3739270 Jul 08 '14 at 19:21

0 Answers0