Added doEveryFrame method.