public void update ( float deltaTime ) { if ( updating ) { throw new IllegalStateException ( "Cannot call update() on an Engine that is already updating." ) ; } updating = true ; ImmutableArray < EntitySystem > systems = systemManager . getSystems ( ) ; try { for ( int i = 0 ; i < systems . size ( ) ; ++ i ) { EntitySystem system = systems . get ( i ) ; if ( system . checkProcessing ( ) ) { system . update ( deltaTime ) ; } while ( componentOperationHandler . hasOperationsToProcess ( ) || entityManager . hasPendingOperations ( ) ) { componentOperationHandler . processOperations ( ) ; entityManager . processPendingOperations ( ) ; } } } finally { updating = false ; } }
Updates all the systems in this Engine .