Compare commits
No commits in common. "master" and "346581751dc479a23e8388666fb8bc31c5757214" have entirely different histories.
master
...
346581751d
@ -17,8 +17,7 @@ public class DrawingArtillery {
|
||||
public void Init(int speed, float weight, Color bodyColor, int rollersCount) {
|
||||
artillery = new EntityArtillery();
|
||||
artillery.Init(speed, weight, bodyColor);
|
||||
drawingRollers = new DrawingRollers();
|
||||
drawingRollers.Init(rollersCount, bodyColor);
|
||||
drawingRollers = new DrawingRollers(rollersCount, bodyColor);
|
||||
}
|
||||
|
||||
public void SetPosition(int x, int y, int width, int height) {
|
||||
|
@ -4,9 +4,9 @@ public class DrawingRollers {
|
||||
private RollersCount rollersCount;
|
||||
private Color color;
|
||||
|
||||
public void Init(int rollersCount, Color bodyColor) {
|
||||
public DrawingRollers(int rollersCount, Color rollersColor) {
|
||||
setRollersCount(rollersCount);
|
||||
color = bodyColor;
|
||||
color = rollersColor;
|
||||
}
|
||||
|
||||
public void setRollersCount(int num) {
|
||||
|
@ -42,7 +42,7 @@ public class FormArtillery extends JFrame {
|
||||
pictureBox.addComponentListener(new ComponentAdapter() {
|
||||
@Override
|
||||
public void componentResized(ComponentEvent e) {
|
||||
if (_artillery != null) _artillery.changeBorders(pictureBox.getWidth(), pictureBox.getHeight());
|
||||
if (_artillery != null) _artillery.changeBorders(e.getComponent().getWidth(), e.getComponent().getHeight());
|
||||
repaint();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user