no useless parameters

This commit is contained in:
nora 2020-12-13 12:23:02 +01:00
parent e841bb4188
commit 70610c7c53
18 changed files with 27 additions and 45 deletions

View file

@ -1,7 +1,10 @@
package core;
import java.awt.*;
import java.awt.Graphics2D;
/**
* This interface has to be implemented by every
*/
public interface Drawable {
/**
@ -12,8 +15,6 @@ public interface Drawable {
* <p>This function is <i>NOT</i> intended to be called manually.</p>
*
* @param g2d The {@code Graphics2D} object given by the master
* @param w The width of the screen
* @param master The master object itself
*/
void draw(Graphics2D g2d, int w, Master master);
void draw(Graphics2D g2d);
}

View file

@ -111,7 +111,7 @@ public class Master extends JPanel {
Graphics2D g2d = (Graphics2D) g.create();
drawables.forEach(o -> o.draw(g2d, w, this));
drawables.forEach(o -> o.draw(g2d));
}

View file

@ -149,7 +149,7 @@ public class RectHitBox extends Hitbox {
}
@Override
public void draw(Graphics2D g2d, int w, Master master) {
public void draw(Graphics2D g2d) {
this.w = w;
int h = (int) (w / Master.SCREEN_RATIO);