private void update ( Collision collision , double x , double y , int width , int height , Map < Collision , Rectangle > cacheRectRender ) { if ( boxs . containsKey ( collision ) ) { final Rectangle rectangle = boxs . get ( collision ) ; rectangle . set ( x , y , width , height ) ; cacheRectRender . get ( collision ) . set ( x , y , width , height ) ; } else { final Rectangle rectangle = new Rectangle ( x , y , width , height ) ; cacheColls . add ( collision ) ; cacheRect . add ( rectangle ) ; cacheRectRender . put ( collision , new Rectangle ( x , y , width , height ) ) ; boxs . put ( collision , rectangle ) ; } }
Update the collision box .