I am writing a turn based rpg game, the fighting process is sent by server which can not change by player. The data of fighting process is an array of round info. Each round info contain what happens in this round in order such as unit A attack unit B.
When client get fighting process data, it needs play animation according to this data. I am try use "action sequence"(a concept in cocos2d, which put all actions in an array, so actions will be executed in their order in that array) to implement this, for example, I make a action let unit move to a point, add it to array, then make a action of target unit be attack, add it to array... after the sequence construct complete, run it. But I found generate the action sequence code is too complex and hard to maintain.
So I want ask is there better way to do this? I also consider add timer in each unit, but it seems hard to calculate the time point of each animation playing.