Fixed the animation class, now handles animations on input as well
instead of being just timerbased.