Building a weapon animation state machine