Working with delta time and frames is kinda hard when there's only 2 different frames for each state, but this is an attempt to make it work