mirror of
https://github.com/Stefan-5422/School-Programming-Projekt-022022.git
synced 2026-09-04 00:46:01 +02:00
Add destroy mashine
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
package com.yes.yes.behaviours;public class DestroyBehaviour {
|
||||||
|
}
|
||||||
+7
-6
@@ -7,6 +7,7 @@ import com.yes.yes.behaviours.TestBehaviour;
|
|||||||
import com.yes.yes.utils.BlockContainer;
|
import com.yes.yes.utils.BlockContainer;
|
||||||
import com.yes.yes.utils.Direction;
|
import com.yes.yes.utils.Direction;
|
||||||
import com.yes.yes.utils.Entity;
|
import com.yes.yes.utils.Entity;
|
||||||
|
import com.yes.yes.world.Chunk;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.shape.Circle;
|
import javafx.scene.shape.Circle;
|
||||||
import javafx.scene.shape.Polygon;
|
import javafx.scene.shape.Polygon;
|
||||||
@@ -14,15 +15,15 @@ import javafx.scene.shape.Polygon;
|
|||||||
public class TestMachine extends Entity {
|
public class TestMachine extends Entity {
|
||||||
public TestMachine() {
|
public TestMachine() {
|
||||||
super();
|
super();
|
||||||
Circle c = new Circle(25);
|
Circle c = new Circle(Chunk.ENTITY_SIZE / 2);
|
||||||
c.setCenterX(25);
|
c.setCenterX(Chunk.ENTITY_SIZE / 2);
|
||||||
c.setCenterY(25);
|
c.setCenterY(Chunk.ENTITY_SIZE / 2);
|
||||||
|
|
||||||
Polygon t = new Polygon();
|
Polygon t = new Polygon();
|
||||||
t.getPoints().addAll(
|
t.getPoints().addAll(
|
||||||
25.0, 0.0,
|
Chunk.ENTITY_SIZE / 2d, 0.0,
|
||||||
0.0, 50.0,
|
0.0, (double) Chunk.ENTITY_SIZE,
|
||||||
50.0, 50.0);
|
(double) Chunk.ENTITY_SIZE, (double) Chunk.ENTITY_SIZE);
|
||||||
t.setFill(new Color(1, 1, 1, 0.5));
|
t.setFill(new Color(1, 1, 1, 0.5));
|
||||||
|
|
||||||
this.getChildren().addAll(c, t);
|
this.getChildren().addAll(c, t);
|
||||||
Reference in New Issue
Block a user