void removeActorImmediate(Actor act) {
        if ( Thread.currentThread() != this )
            throw new RuntimeException("wrong thread");
        Actor newAct[] = new Actor[actors.length-1];
        int idx = 0;
        for (int i = 0; i < actors.length; i++) {
            Actor actor = actors[i];
            if ( actor != act)
                newAct[idx++] = actor;
        }
        if ( idx != newAct.length )
            throw new RuntimeException("could not remove actor");
        actors = newAct;
    }
void removeActorImmediate ( Actor act ) { if ( Thread . currentThread ( ) != this ) throw new RuntimeException ( "wrong thread" ) ; Actor newAct [ ] = new Actor [ actors . length - 1 ] ; int idx = 0 ; for ( int i = 0 ; i < actors . length ; i ++ ) { Actor actor = actors [ i ] ; if ( actor != act ) newAct [ idx ++ ] = actor ; } if ( idx != newAct . length ) throw new RuntimeException ( "could not remove actor" ) ; actors = newAct ; }
removes immediate must be called from this thread