Implemented computeNextFrame method in BaseState