@@ -11,59 +11,59 @@ Example code that is taken from an actual project:
1111
1212``` java
1313public class MyGame extends Game {
14- public final static float WIDTH = 100 ;
15- public final static float HEIGHT = 16 * WIDTH / 9 ;
14+ public final static float WIDTH = 100 ;
15+ public final static float HEIGHT = 16 * WIDTH / 9 ;
1616
17- FitViewport viewport;
17+ FitViewport viewport;
1818 OrthographicCamera camera;
19- ShapeRenderer shape;
19+ ShapeRenderer shape;
2020
21- @Override
21+ @Override
2222 public void create () {
2323 shape = new ShapeRenderer ();
2424 camera = new OrthographicCamera ();
2525 viewport = new FitViewport (WIDTH , HEIGHT , camera);
26- ...
27- }
26+ ...
27+ }
2828
29- @Override
29+ @Override
3030 public void resize (int width , int height ) {
3131 viewport. update(width, height);
3232 }
3333
34- ...
34+ ...
3535}
3636
3737public class Box {
38- ...
38+ ...
3939}
4040
4141public class ScreenPlay implements Screen {
42- final Game g;
43- Array<Box > boxes;
44- ...
45-
46- @Override
42+ final Game g;
43+ Array<Box > boxes;
44+ ...
45+
46+ @Override
4747 public void render (float delta ) {
48- for (Box box : boxes) {
48+ for (Box box : boxes) {
4949 g. shape. setProjectionMatrix(g. camera. combined);
5050 g. shape. begin(ShapeType . Line );
5151 g. shape. setColor(Color . RED );
5252 g. shape. rect(box. x, box. y, box. width, box. height);
5353 g. shape. end();
54-
54+
5555 g. shape. setProjectionMatrix(g. camera. combined);
5656 g. shape. begin(ShapeType . Filled );
5757 g. shape. setColor(Color . BLUE );
5858 g. shape. ellipse(box. x, box. y, box. width, box. height);
5959 g. shape. end();
60- }
61- }
60+ }
61+ }
6262
63- ...
63+ ...
6464
6565}
66- ```
66+ ```
6767
6868### Alternatives
6969
@@ -79,4 +79,4 @@ shapeDrawer.line(0, 0, 100, 100);
7979shapeDrawer. setColor(Color . BLUE );
8080shapeDrawer. filledCircle(50 , 50 , 20 );
8181// batch drawing
82- ```
82+ ```
0 commit comments