Hello, I am using dragonbones armature for my game's simple avatars. Before my question, I will try to explain my situation...
I created an empty armature and named it "avatar". In "avatar" armature I created 2 slots, one for the characters named "picou" and the other for the mounts, named "bird".
For the "picou" slot I will put 12 characters, each one a separate armature with 5 animations:
idle, idle_blink, happy, happy_blink, sad, and hit. In all animations, the characters' hair are waving with frame-by-frame tradigital animation. The idle, happy, sad and hit animations I only change the mouth (one frame each). The idle_blink and happy_blink additionally have the eyes blinking once with frame-by-frame tradigital animation, randomly occurring and dispatching event when finished so from idle_blink and happy_blink to return to idle and happy respectively.
For the "bird" slot, I will put 10 birds, each one a separate armature, with only one animation:
fly. The head,body and tail is a single mesh with deformations. The leg another mesh with deformations, and finally the wing (only one side visible), is frame-by-frame tradigital animation.
All animations of the characters and the birds are 16 frames long, at frame rate of 30.
I cannot find any tutorials or documentation how to use dragonbones API, so I am relying to its lite and brief //comments in Chinese with the help of google translate.
So far I only put 2 characters and 2 birds in order to figure out how to implement the avatar, switching each character and bird with all possible combinations (any character can ride any bird).
Firstly I put/created the 5 animations I mentioned earlier for the 2 testing characters and the fly animation to the 2 testing birds.
....... -- picou (slot)
................. -- black (armature)
................. -- blue (armature)
....... -- bird (slot)
................. -- blue_macaw (armature)
................. -- cockatiel (armature)
I did not know how to access each character's animation from "avatar" armature, so please if you know DO TELL ME!!!
So, I tried and declared inside dragonbones program each animation again. So the black picou character's animation inside its "black" armature called "idle", became "black_idle" inside the "avatar" animation. Programmatically, I can switch between the two characters, but I cannot switch the birds unless I declare each animation with different bird and then the "black_idle" becomes "black_idle_blue_macaw" and "black_idle_cockatiel".
And at the end I am using:
_avatar.animation.fadeIn(currentPicou + "idle"+ currentBird, -1, 1);
Concluding, using this way I will have 12 characters * 5 animations * 10 birds = 600 combinations. I was hopping to only have 12 characters * 5 animations = 60 combinations which I could combine programmatically with each bird with only one "fly" animation each.
Can you enlighten me and suggest me how to achieve it?
Also any suggestion is more than welcome!
Thank you for your time!