mirror of
https://github.com/Noratrieb/Java2DGame.git
synced 2026-01-15 22:45:00 +01:00
no useless parameters
This commit is contained in:
parent
e841bb4188
commit
70610c7c53
18 changed files with 27 additions and 45 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue