applying build modifier in bge
How would I keep the animation and apply the modifier?


You can't.

Explanation

Applying a modifier means it converts your setup to a static mesh. 

In relation to the BGE there are three ways to it deals with modifiers:

Supported Modifier

The BGE can run that modifiers. E.g. the armature modifier.

Automatically Applied Modifier

The BGE applies the modifier when loading the scene into a static mesh. This is like the user presses the apply button.

Unsupported Modifier

These modifiers are simply ignored and have no effect (but might disturb the processing of other modifiers).

Conclusion

In difference to Blender the BGE is not build around Modifiers. To get the effect you want I suggest to look at Logic Bricks (Playing actions, hiding/showing objects, moving object, adding/removing objects).