src/main/java/com/spinyowl/legui/animation/AnimatorImpl.java
public void runAnimations() {
    double currentTime = GLFW.glfwGetTime();
    double delta = currentTime - previousTime;

    List<Animation> initializeList = new ArrayList<>(animationsToInitialize);
    for (Animation animation : initializeList) {
      animation.beforeAnimation();
      animationsToInitialize.remove(animation);
      animations.add(animation);
    }

    List<Animation> processList = new ArrayList<>(animations);
    for (Animation animation : processList) {
      if (animationsToRemove.contains(animation)) {
        animationsToRemove.remove(animation);
        animations.remove(animation);
        animationsToDestroy.add(animation);
      } else if (animation.animate(delta)) {
        animations.remove(animation);
        animationsToDestroy.add(animation);
      }
    }

    List<Animation> destroyList = new ArrayList<>(animationsToDestroy);
    for (Animation animation : destroyList) {
      animation.afterAnimation();
      animationsToDestroy.remove(animation);
    }

    previousTime = currentTime;
  }
/**
   * This method used to process animations.
   */
This method used to process animations.
This method used to process animations .
public void runAnimations() {
    double currentTime = GLFW.glfwGetTime();
    double delta = currentTime - previousTime;
    List<Animation> initializeList = new ArrayList<>(animationsToInitialize);
    for (Animation animation : initializeList) {
      animation.beforeAnimation();
      animationsToInitialize.remove(animation);
      animations.add(animation);
    }
    List<Animation> processList = new ArrayList<>(animations);
    for (Animation animation : processList) {
      if (animationsToRemove.contains(animation)) {
        animationsToRemove.remove(animation);
        animations.remove(animation);
        animationsToDestroy.add(animation);
      } else if (animation.animate(delta)) {
        animations.remove(animation);
        animationsToDestroy.add(animation);
      }
    }
    List<Animation> destroyList = new ArrayList<>(animationsToDestroy);
    for (Animation animation : destroyList) {
      animation.afterAnimation();
      animationsToDestroy.remove(animation);
    }
    previousTime = currentTime;
  }
public void runAnimations ( ) { double currentTime = GLFW . glfwGetTime ( ) ; double delta = currentTime - previousTime ; List < Animation > initializeList = new ArrayList < > ( animationsToInitialize ) ; for ( Animation animation : initializeList ) { animation . beforeAnimation ( ) ; animationsToInitialize . remove ( animation ) ; animations . add ( animation ) ; } List < Animation > processList = new ArrayList < > ( animations ) ; for ( Animation animation : processList ) { if ( animationsToRemove . contains ( animation ) ) { animationsToRemove . remove ( animation ) ; animations . remove ( animation ) ; animationsToDestroy . add ( animation ) ; } else if ( animation . animate ( delta ) ) { animations . remove ( animation ) ; animationsToDestroy . add ( animation ) ; } } List < Animation > destroyList = new ArrayList < > ( animationsToDestroy ) ; for ( Animation animation : destroyList ) { animation . afterAnimation ( ) ; animationsToDestroy . remove ( animation ) ; } previousTime = currentTime ; }
This method used to process animations.
This method used to process animations .