final with issues
This commit is contained in:
parent
ea1dd16b8e
commit
527adad2d5
124
.idea/uiDesigner.xml
generated
Normal file
124
.idea/uiDesigner.xml
generated
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
@ -37,7 +37,7 @@ public abstract class AbstractMap
|
||||
switch (direction)
|
||||
{
|
||||
case Up:
|
||||
enoughPlace = CheckEnoughPlace(0, _drawningObject.GetStep() * -1);
|
||||
enoughPlace = CheckEnoughPlace(0, (_drawningObject.GetStep() + 30) * -1);
|
||||
break;
|
||||
case Down:
|
||||
enoughPlace = CheckEnoughPlace(0, _drawningObject.GetStep());
|
||||
@ -63,10 +63,10 @@ public abstract class AbstractMap
|
||||
return false;
|
||||
}
|
||||
int x = _random.nextInt(10);
|
||||
int y = _random.nextInt(10);
|
||||
int y = _random.nextInt(50);
|
||||
_drawningObject.SetObject(x, y, _width, _height);
|
||||
|
||||
while (!CheckEnoughPlace(0, 0))
|
||||
while (!CheckEnoughPlace(0, -40))
|
||||
{
|
||||
x += 10;
|
||||
if (x >= _width)
|
||||
@ -91,6 +91,11 @@ public abstract class AbstractMap
|
||||
float left = (position[0] + x) / _size_x > 0 ? (position[0] + x) / _size_x : 0;
|
||||
float up = (position[1] + y) / _size_y > 0 ? (position[1] + y) / _size_y : 0;
|
||||
float down = (position[3] + y) / _size_y > 0 ? (position[3] + y) / _size_y : 0;
|
||||
/*float right = (_map[0].length * (position[2] + x)) / _width > 0 ? (_map[0].length * (position[2] + x)) / _width : 0;
|
||||
float left = (_map[0].length * (position[0] + x)) / _width > 0 ? (_map[0].length * (position[0] + x)) / _width : 0;
|
||||
float up = (_map.length * (position[1] + y)) / _height > 0 ? (_map.length * (position[1] + y)) / _height : 0;
|
||||
float down = (_map.length * (position[3] + y)) / _height > 0 ? (_map.length * (position[3] + y)) / _height : 0;*/
|
||||
|
||||
if (position[3] + y > _height || position[2] + x > _width || position[1] + y < 0 || position[0] + x < 0) return false;
|
||||
for (float i = left; i <= right; i+=0.5)
|
||||
{
|
||||
|
@ -136,8 +136,8 @@ public class ControllerBoat {
|
||||
IDrawningAdditionalElement newDrawningOars = switch (comboBoxOarsType.getValue())
|
||||
{
|
||||
case "None" -> new DrawningOars(_boat.GetBoat().GetBodyColor());
|
||||
case "Short" -> new DrawningShortOars(_boat.GetBoat().GetBodyColor());
|
||||
case "Long" -> new DrawningLongOars(_boat.GetBoat().GetBodyColor());
|
||||
case "Slim" -> new DrawningSlimOars(_boat.GetBoat().GetBodyColor());
|
||||
case "Large" -> new DrawningLargeOars(_boat.GetBoat().GetBodyColor());
|
||||
default -> null;
|
||||
};
|
||||
if (newDrawningOars != null)
|
||||
|
@ -2,13 +2,11 @@ package com.example.pibd22_kalyshev_y_v_motorboat_hard;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.canvas.Canvas;
|
||||
import javafx.scene.canvas.GraphicsContext;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ComboBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.Border;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.paint.Color;
|
||||
@ -125,8 +123,8 @@ public class ControllerMap
|
||||
IDrawningAdditionalElement newDrawningOars = switch (comboBoxOarsType.getValue())
|
||||
{
|
||||
case "None" -> new DrawningOars(boat.GetBoat().GetBodyColor());
|
||||
case "Short" -> new DrawningShortOars(boat.GetBoat().GetBodyColor());
|
||||
case "Long" -> new DrawningLongOars(boat.GetBoat().GetBodyColor());
|
||||
case "Slim" -> new DrawningSlimOars(boat.GetBoat().GetBodyColor());
|
||||
case "Large" -> new DrawningLargeOars(boat.GetBoat().GetBodyColor());
|
||||
default -> null;
|
||||
};
|
||||
if (newDrawningOars != null)
|
||||
|
@ -33,7 +33,6 @@ public class DrawningBoat
|
||||
public DrawningBoat(int speed, float weight, Color bodyColor)
|
||||
{
|
||||
_boat = new EntityBoat(speed, weight, bodyColor);
|
||||
|
||||
_drawningOars = new DrawningOars(bodyColor);
|
||||
}
|
||||
protected DrawningBoat(int speed, float weight, Color bodyColor, int boatWidth, int boatHeight)
|
||||
@ -48,7 +47,7 @@ public class DrawningBoat
|
||||
return;
|
||||
}
|
||||
|
||||
if (x + _boatWidth > width || y + _boatHeight > height) {
|
||||
if (x + _boatWidth > width || y + _drawningOars.deltaYdown + _boatHeight > height) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -67,7 +66,7 @@ public class DrawningBoat
|
||||
|
||||
switch (direction) {
|
||||
case Up:
|
||||
if (_startPosY - _boat.GetStep() > 0) {
|
||||
if (_startPosY - _boat.GetStep() - _drawningOars.deltaYup > 0) {
|
||||
_startPosY -= _boat.GetStep();
|
||||
}
|
||||
break;
|
||||
|
@ -0,0 +1,76 @@
|
||||
package com.example.pibd22_kalyshev_y_v_motorboat_hard;
|
||||
|
||||
import javafx.scene.canvas.GraphicsContext;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
public class DrawningLargeOars implements IDrawningAdditionalElement {
|
||||
private Color _OarsColor;
|
||||
private NumberOars _numOars;
|
||||
public void SetNumberOars(int numberOars)
|
||||
{
|
||||
_numOars = NumberOars.FromInteger(numberOars);
|
||||
}
|
||||
public int deltaYdown = 0;
|
||||
public int deltaYup = 0;
|
||||
public DrawningLargeOars(Color oarsColor)
|
||||
{
|
||||
_OarsColor = oarsColor;
|
||||
}
|
||||
public void DrawOars(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
if (_OarsColor == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
gc.setFill(_OarsColor);
|
||||
|
||||
switch (_numOars) {
|
||||
case One:
|
||||
DrawOar1(gc, startPosX, startPosY);
|
||||
deltaYup = 80;
|
||||
deltaYdown = 80;
|
||||
break;
|
||||
|
||||
case Two:
|
||||
DrawOar1(gc, startPosX, startPosY);
|
||||
DrawOar2(gc, startPosX, startPosY);
|
||||
deltaYup = 80;
|
||||
deltaYdown = 80;
|
||||
break;
|
||||
|
||||
case Three:
|
||||
DrawOar1(gc, startPosX, startPosY);
|
||||
DrawOar2(gc, startPosX, startPosY);
|
||||
DrawOar3(gc, startPosX, startPosY);
|
||||
deltaYup = 80;
|
||||
deltaYdown = 80;
|
||||
break;
|
||||
}
|
||||
}
|
||||
void DrawOar1(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
gc.setFill(_OarsColor);
|
||||
gc.setStroke(Color.BLACK);
|
||||
gc.setLineWidth(2);
|
||||
gc.strokePolyline(new double[]{startPosX + 50, startPosX + 70, startPosX + 60, startPosX + 60, startPosX + 90, startPosX + 90, startPosX + 80, startPosX + 60, startPosX + 50},
|
||||
new double[]{startPosY + 60, startPosY + 20, startPosY + 20, startPosY, startPosY, startPosY + 20, startPosY + 20, startPosY + 60, startPosY + 60}, 9);
|
||||
gc.fillPolygon(new double[]{startPosX + 50, startPosX + 70, startPosX + 60, startPosX + 60, startPosX + 90, startPosX + 90, startPosX + 80, startPosX + 60, startPosX + 50},
|
||||
new double[]{startPosY + 60, startPosY + 20, startPosY + 20, startPosY, startPosY, startPosY + 20, startPosY + 20, startPosY + 60, startPosY + 60}, 9);
|
||||
}
|
||||
void DrawOar2(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
gc.setFill(_OarsColor);
|
||||
gc.setStroke(Color.BLACK);
|
||||
gc.setLineWidth(2);
|
||||
gc.strokePolyline(new double[]{startPosX+50, startPosX+30, startPosX+20, startPosX+20, startPosX+50, startPosX+50, startPosX+40, startPosX+60, startPosX+50},
|
||||
new double[]{startPosY+80, startPosY+120, startPosY+120, startPosY+140, startPosY+140, startPosY+120, startPosY+120, startPosY+80, startPosY+80}, 9);
|
||||
gc.fillPolygon(new double[]{startPosX+50, startPosX+30, startPosX+20, startPosX+20, startPosX+50, startPosX+50, startPosX+40, startPosX+60, startPosX+50},
|
||||
new double[]{startPosY+80, startPosY+120, startPosY+120, startPosY+140, startPosY+140, startPosY+120, startPosY+120, startPosY+80, startPosY+80}, 9);
|
||||
}
|
||||
void DrawOar3(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
gc.setFill(_OarsColor);
|
||||
gc.setStroke(Color.BLACK);
|
||||
gc.setLineWidth(2);
|
||||
gc.strokePolyline(new double[]{startPosX+20, startPosX+20, startPosX+10, startPosX+10, startPosX+40, startPosX+40, startPosX+30, startPosX+30, startPosX+20},
|
||||
new double[]{startPosY+80, startPosY+30, startPosY+30, startPosY+10, startPosY+10, startPosY+30, startPosY+30, startPosY+80, startPosY+80}, 9);
|
||||
gc.fillPolygon(new double[]{startPosX+20, startPosX+20, startPosX+10, startPosX+10, startPosX+40, startPosX+40, startPosX+30, startPosX+30, startPosX+20},
|
||||
new double[]{startPosY+80, startPosY+30, startPosY+30, startPosY+10, startPosY+10, startPosY+30, startPosY+30, startPosY+80, startPosY+80}, 9);
|
||||
}
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
package com.example.pibd22_kalyshev_y_v_motorboat_hard;
|
||||
|
||||
import javafx.scene.canvas.GraphicsContext;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
public class DrawningLongOars implements IDrawningAdditionalElement {
|
||||
private Color _oarsColor;
|
||||
private NumberOars _numOars;
|
||||
|
||||
public void SetNumberOars(int numberOars) {
|
||||
_numOars = NumberOars.FromInteger(numberOars);
|
||||
}
|
||||
public DrawningLongOars(Color oarsColor) {
|
||||
_oarsColor = oarsColor;
|
||||
}
|
||||
public void DrawOars(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
if (_oarsColor == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(5.0 + startPosX, 36.0 + startPosY, 18.0, 18.0);
|
||||
gc.strokeOval(5.0 + startPosX, 36.0 + startPosY, 18.0, 18.0);
|
||||
gc.strokeOval(11.0 + startPosX, 42.0 + startPosY, 6.0, 6.0);
|
||||
|
||||
gc.fillOval(89.0 + startPosX, 36.0 + startPosY, 18.0, 18.0);
|
||||
gc.strokeOval(89.0 + startPosX, 36.0 + startPosY, 18.0, 18.0);
|
||||
gc.strokeOval(95.0 + startPosX, 42.0 + startPosY, 6.0, 6.0);
|
||||
|
||||
// Орнамент
|
||||
gc.strokeOval(8.0 + startPosX, 39.0 + startPosY, 12.0, 12.0);
|
||||
gc.strokeOval(92.0 + startPosX, 39.0 + startPosY, 12.0, 12.0);
|
||||
|
||||
switch (_numOars) {
|
||||
case One:
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(35.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(35.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(40.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(63.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(63.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(68.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
// Орнамент
|
||||
gc.strokeOval(38.0 + startPosX, 45.0 + startPosY, 8.0, 8.0);
|
||||
gc.strokeOval(66.0 + startPosX, 45.0 + startPosY, 8.0, 8.0);
|
||||
break;
|
||||
|
||||
case Two:
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(29.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(29.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(34.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(49.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(49.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(54.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(69.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(69.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(74.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
// Орнамент
|
||||
gc.strokeOval(32.0 + startPosX, 45.0 + startPosY, 8.0, 8.0);
|
||||
gc.strokeOval(52.0 + startPosX, 45.0 + startPosY, 8.0, 8.0);
|
||||
gc.strokeOval(72.0 + startPosX, 45.0 + startPosY, 8.0, 8.0);
|
||||
break;
|
||||
|
||||
case Three:
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(25.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(25.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(30.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(41.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(41.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(46.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(57.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(57.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(62.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(73.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(73.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(78.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
// Орнамент
|
||||
gc.strokeOval(28.0 + startPosX, 45.0 + startPosY, 8.0, 8.0);
|
||||
gc.strokeOval(44.0 + startPosX, 45.0 + startPosY, 8.0, 8.0);
|
||||
gc.strokeOval(60.0 + startPosX, 45.0 + startPosY, 8.0, 8.0);
|
||||
gc.strokeOval(76.0 + startPosX, 45.0 + startPosY, 8.0, 8.0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ public class DrawningOars implements IDrawningAdditionalElement{
|
||||
_numOars = NumberOars.FromInteger(numberOars);
|
||||
}
|
||||
public int deltaYdown = 0;
|
||||
public int deltaYup = 0;
|
||||
public DrawningOars(Color oarsColor)
|
||||
{
|
||||
_OarsColor = oarsColor;
|
||||
@ -25,12 +26,14 @@ public class DrawningOars implements IDrawningAdditionalElement{
|
||||
switch (_numOars) {
|
||||
case One:
|
||||
DrawOar1(gc, startPosX, startPosY);
|
||||
deltaYdown = 40;
|
||||
deltaYup = 80;
|
||||
deltaYdown = 80;
|
||||
break;
|
||||
|
||||
case Two:
|
||||
DrawOar1(gc, startPosX, startPosY);
|
||||
DrawOar2(gc, startPosX, startPosY);
|
||||
deltaYup = 80;
|
||||
deltaYdown = 80;
|
||||
break;
|
||||
|
||||
@ -38,6 +41,7 @@ public class DrawningOars implements IDrawningAdditionalElement{
|
||||
DrawOar1(gc, startPosX, startPosY);
|
||||
DrawOar2(gc, startPosX, startPosY);
|
||||
DrawOar3(gc, startPosX, startPosY);
|
||||
deltaYup = 80;
|
||||
deltaYdown = 80;
|
||||
break;
|
||||
}
|
||||
@ -46,9 +50,9 @@ public class DrawningOars implements IDrawningAdditionalElement{
|
||||
gc.setFill(_OarsColor);
|
||||
gc.setStroke(Color.BLACK);
|
||||
gc.setLineWidth(2);
|
||||
gc.strokePolyline(new double[]{startPosX + 60, startPosX + 80, startPosX + 80, startPosX + 90, startPosX + 100, startPosX + 90, startPosX + 70, startPosX + 60},
|
||||
gc.strokePolyline(new double[]{startPosX + 50, startPosX + 70, startPosX + 70, startPosX + 80, startPosX + 90, startPosX + 80, startPosX + 60, startPosX + 50},
|
||||
new double[]{startPosY + 60, startPosY + 20, startPosY + 10, startPosY, startPosY + 10, startPosY + 20, startPosY + 60, startPosY + 60}, 8);
|
||||
gc.fillPolygon(new double[]{startPosX + 60, startPosX + 80, startPosX + 80, startPosX + 90, startPosX + 100, startPosX + 90, startPosX + 70, startPosX + 60},
|
||||
gc.fillPolygon(new double[]{startPosX + 50, startPosX + 70, startPosX + 70, startPosX + 80, startPosX + 90, startPosX + 80, startPosX + 60, startPosX + 50},
|
||||
new double[]{startPosY + 60, startPosY + 20, startPosY + 10, startPosY, startPosY + 10, startPosY + 20, startPosY + 60, startPosY + 60}, 8);
|
||||
}
|
||||
void DrawOar2(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
|
@ -4,12 +4,11 @@ import javafx.scene.canvas.GraphicsContext;
|
||||
|
||||
public class DrawningObjectBoat implements IDrawningObject {
|
||||
private DrawningBoat _boat = null;
|
||||
|
||||
public DrawningObjectBoat(DrawningBoat boat)
|
||||
{
|
||||
_boat = boat;
|
||||
}
|
||||
|
||||
public IDrawningAdditionalElement GetDrawningOars() {return _boat.GetDrawningOars();}
|
||||
public float GetStep()
|
||||
{
|
||||
if (_boat != null && _boat.GetBoat() != null)
|
||||
@ -18,7 +17,6 @@ public class DrawningObjectBoat implements IDrawningObject {
|
||||
}
|
||||
return 0F;
|
||||
}
|
||||
|
||||
public float[] GetCurrentPosition()
|
||||
{
|
||||
if (_boat != null)
|
||||
@ -27,17 +25,14 @@ public class DrawningObjectBoat implements IDrawningObject {
|
||||
}
|
||||
return new float[4];
|
||||
}
|
||||
|
||||
public void MoveObject(Direction direction)
|
||||
{
|
||||
_boat.MoveTransport(direction);
|
||||
}
|
||||
|
||||
public void SetObject(int x, int y, int width, int height)
|
||||
{
|
||||
_boat.SetPosition(x, y, width, height);
|
||||
}
|
||||
|
||||
public void DrawningObject(GraphicsContext gc)
|
||||
{
|
||||
if (_boat != null)
|
||||
|
@ -1,166 +0,0 @@
|
||||
package com.example.pibd22_kalyshev_y_v_motorboat_hard;
|
||||
|
||||
import javafx.scene.canvas.GraphicsContext;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
public class DrawningShortOars implements IDrawningAdditionalElement {
|
||||
private Color _oarsColor;
|
||||
private NumberOars _numOars;
|
||||
|
||||
public void SetNumberOars(int numberOars) {
|
||||
_numOars = NumberOars.FromInteger(numberOars);
|
||||
}
|
||||
public DrawningShortOars(Color oarsColor) {
|
||||
_oarsColor = oarsColor;
|
||||
}
|
||||
|
||||
public void DrawOars(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
if (_oarsColor == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(5.0 + startPosX, 36.0 + startPosY, 18.0, 18.0);
|
||||
gc.strokeOval(5.0 + startPosX, 36.0 + startPosY, 18.0, 18.0);
|
||||
gc.strokeOval(11.0 + startPosX, 42.0 + startPosY, 6.0, 6.0);
|
||||
|
||||
gc.fillOval(89.0 + startPosX, 36.0 + startPosY, 18.0, 18.0);
|
||||
gc.strokeOval(89.0 + startPosX, 36.0 + startPosY, 18.0, 18.0);
|
||||
gc.strokeOval(95.0 + startPosX, 42.0 + startPosY, 6.0, 6.0);
|
||||
|
||||
// Орнамент
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(13.0 + startPosX, 38.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(13.0 + startPosX, 50.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(7.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(19.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
gc.fillOval(9.0 + startPosX, 40.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(9.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(17.0 + startPosX, 40.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(17.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
gc.fillOval(97.0 + startPosX, 38.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(97.0 + startPosX, 50.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(91.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(103.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
gc.fillOval(93.0 + startPosX, 40.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(93.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(101.0 + startPosX, 40.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(101.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
switch (_numOars) {
|
||||
case One:
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(35.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(35.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(40.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(63.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(63.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(68.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
// Орнамент
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(37.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(45.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(41.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(41.0 + startPosX, 52.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
gc.fillOval(65.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(73.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(69.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(69.0 + startPosX, 52.0 + startPosY, 2.0, 2.0);
|
||||
break;
|
||||
|
||||
case Two:
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(29.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(29.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(34.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(49.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(49.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(54.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(69.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(69.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(74.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
// Орнамент
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(31.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(39.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(35.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(35.0 + startPosX, 52.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
gc.fillOval(51.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(59.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(55.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(55.0 + startPosX, 52.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
gc.fillOval(71.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(79.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(75.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(75.0 + startPosX, 52.0 + startPosY, 2.0, 2.0);
|
||||
break;
|
||||
|
||||
case Three:
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(25.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(25.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(30.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(41.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(41.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(46.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(57.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(57.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(62.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
gc.setFill(_oarsColor);
|
||||
gc.fillOval(73.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.strokeOval(73.0 + startPosX, 42.0 + startPosY, 14.0, 14.0);
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(78.0 + startPosX, 47.0 + startPosY, 4.0, 4.0);
|
||||
|
||||
// Орнамент
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.fillOval(27.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(35.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(31.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(31.0 + startPosX, 52.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
gc.fillOval(43.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(51.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(47.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(47.0 + startPosX, 52.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
gc.fillOval(59.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(67.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(63.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(63.0 + startPosX, 52.0 + startPosY, 2.0, 2.0);
|
||||
|
||||
gc.fillOval(75.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(83.0 + startPosX, 48.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(79.0 + startPosX, 44.0 + startPosY, 2.0, 2.0);
|
||||
gc.fillOval(79.0 + startPosX, 52.0 + startPosY, 2.0, 2.0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.example.pibd22_kalyshev_y_v_motorboat_hard;
|
||||
|
||||
import javafx.scene.canvas.GraphicsContext;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
public class DrawningSlimOars implements IDrawningAdditionalElement {
|
||||
private Color _OarsColor;
|
||||
private NumberOars _numOars;
|
||||
public void SetNumberOars(int numberOars)
|
||||
{
|
||||
_numOars = NumberOars.FromInteger(numberOars);
|
||||
}
|
||||
public int deltaYdown = 0;
|
||||
public int deltaYup = 0;
|
||||
public DrawningSlimOars(Color oarsColor)
|
||||
{
|
||||
_OarsColor = oarsColor;
|
||||
}
|
||||
public void DrawOars(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
if (_OarsColor == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
gc.setFill(_OarsColor);
|
||||
|
||||
switch (_numOars) {
|
||||
case One:
|
||||
DrawOar1(gc, startPosX, startPosY);
|
||||
deltaYup = 80;
|
||||
deltaYdown = 80;
|
||||
break;
|
||||
|
||||
case Two:
|
||||
DrawOar1(gc, startPosX, startPosY);
|
||||
DrawOar2(gc, startPosX, startPosY);
|
||||
deltaYup = 80;
|
||||
deltaYdown = 80;
|
||||
break;
|
||||
|
||||
case Three:
|
||||
DrawOar1(gc, startPosX, startPosY);
|
||||
DrawOar2(gc, startPosX, startPosY);
|
||||
DrawOar3(gc, startPosX, startPosY);
|
||||
deltaYup = 80;
|
||||
deltaYdown = 80;
|
||||
break;
|
||||
}
|
||||
}
|
||||
void DrawOar1(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
gc.setFill(_OarsColor);
|
||||
gc.setStroke(Color.BLACK);
|
||||
gc.setLineWidth(2);
|
||||
gc.strokePolyline(new double[]{startPosX + 50, startPosX + 70, startPosX + 70, startPosX + 80, startPosX + 80, startPosX + 60, startPosX + 50},
|
||||
new double[]{startPosY + 60, startPosY + 20, startPosY, startPosY, startPosY + 20, startPosY + 60, startPosY + 60}, 7);
|
||||
gc.fillPolygon(new double[]{startPosX + 50, startPosX + 70, startPosX + 70, startPosX + 80, startPosX + 80, startPosX + 60, startPosX + 50},
|
||||
new double[]{startPosY + 60, startPosY + 20, startPosY, startPosY, startPosY + 20, startPosY + 60, startPosY + 60}, 7);
|
||||
}
|
||||
void DrawOar2(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
gc.setFill(_OarsColor);
|
||||
gc.setStroke(Color.BLACK);
|
||||
gc.setLineWidth(2);
|
||||
gc.strokePolyline(new double[]{startPosX+50, startPosX+30, startPosX+30, startPosX+40, startPosX+40, startPosX+60, startPosX+50},
|
||||
new double[]{startPosY+80, startPosY+120, startPosY+140, startPosY+140, startPosY+120, startPosY+80, startPosY+80}, 7);
|
||||
gc.fillPolygon(new double[]{startPosX+50, startPosX+30, startPosX+30, startPosX+40, startPosX+40, startPosX+60, startPosX+50},
|
||||
new double[]{startPosY+80, startPosY+120, startPosY+140, startPosY+140, startPosY+120, startPosY+80, startPosY+80}, 7);
|
||||
}
|
||||
void DrawOar3(GraphicsContext gc, float startPosX, float startPosY) {
|
||||
gc.setFill(_OarsColor);
|
||||
gc.setStroke(Color.BLACK);
|
||||
gc.setLineWidth(2);
|
||||
gc.strokePolyline(new double[]{startPosX+20, startPosX+20, startPosX+30, startPosX+30, startPosX+20},
|
||||
new double[]{startPosY+80, startPosY+10, startPosY+10, startPosY+80, startPosY+80}, 5);
|
||||
gc.fillPolygon(new double[]{startPosX+20, startPosX+20, startPosX+30, startPosX+30, startPosX+20},
|
||||
new double[]{startPosY+80, startPosY+10, startPosY+10, startPosY+80, startPosY+80}, 5);
|
||||
}
|
||||
}
|
@ -26,6 +26,7 @@ public class DrawningSpeedboat extends DrawningBoat
|
||||
super.DrawTransport(gc);
|
||||
_startPosX -= 25;
|
||||
_startPosY += 30;
|
||||
|
||||
if (speedboat.GetWing())
|
||||
{
|
||||
gc.setFill(speedboat.GetDopColor());
|
||||
|
@ -17,7 +17,7 @@ public class FormMap extends Application
|
||||
public void start(Stage stage) throws IOException
|
||||
{
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(FormMap.class.getResource("form-map-view.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load(), 400, 400);
|
||||
Scene scene = new Scene(fxmlLoader.load(), 800, 800);
|
||||
|
||||
stage.setTitle("Map");
|
||||
stage.setScene(scene);
|
||||
|
@ -5,6 +5,7 @@ import javafx.scene.canvas.GraphicsContext;
|
||||
public interface IDrawningAdditionalElement
|
||||
{
|
||||
public int deltaYdown = 0;
|
||||
public int deltaYup = 0;
|
||||
public void SetNumberOars(int numberOars);
|
||||
public void DrawOars(GraphicsContext gc, float startPosX, float startPosY);
|
||||
}
|
@ -5,12 +5,9 @@ import javafx.scene.canvas.GraphicsContext;
|
||||
public interface IDrawningObject
|
||||
{
|
||||
public float GetStep();
|
||||
|
||||
public IDrawningAdditionalElement GetDrawningOars();
|
||||
public void SetObject(int x, int y, int width, int height);
|
||||
|
||||
public void MoveObject(Direction direction);
|
||||
|
||||
public void DrawningObject(GraphicsContext gc);
|
||||
|
||||
public float[] GetCurrentPosition();
|
||||
}
|
||||
|
@ -53,8 +53,8 @@
|
||||
<items>
|
||||
<FXCollections fx:factory="observableArrayList">
|
||||
<String fx:value="None"/>
|
||||
<String fx:value="Short"/>
|
||||
<String fx:value="Long"/>
|
||||
<String fx:value="Slim"/>
|
||||
<String fx:value="Large"/>
|
||||
</FXCollections>
|
||||
</items>
|
||||
</ComboBox>
|
||||
|
@ -48,8 +48,8 @@
|
||||
<items>
|
||||
<FXCollections fx:factory="observableArrayList">
|
||||
<String fx:value="None" />
|
||||
<String fx:value="Short" />
|
||||
<String fx:value="Long" />
|
||||
<String fx:value="Slim" />
|
||||
<String fx:value="Large" />
|
||||
</FXCollections>
|
||||
</items>
|
||||
</ComboBox>
|
||||
|
Loading…
x
Reference in New Issue
Block a user