Animation State

Managing animation states is important in battle simulations.

Like, idle to running status when start moving.

Or, changing from moving animation to attack animation if collided with enemy object.

So, we need to manage those animations properly.

First, we need to load and store various animations first.

Since I using 5 kinds of animations, so I created 5 vectors per animation model.

The vectors for Idle animations, Attack animations, Pain animations, Death animations, Running animations.

These vectors will contain all datas for simulate animations.

Like, bone transformations data, interpolation shader…

Now, we need to give random animation indices to billboard objects in order to set different animations to each object.

Animation State enum.

Random animation index setting.

Use random index above, get random animation datas to desired state.

Now, animation states were on set, we need to simulate animations using this state.

Simulation gonna explained on Battle Simulation parts.