Add destroy mashine

This commit is contained in:
Stone_Red
2022-05-13 11:25:00 +02:00
parent e14e973295
commit 40b58a42ef
2 changed files with 9 additions and 6 deletions
@@ -0,0 +1,2 @@
package com.yes.yes.behaviours;public class DestroyBehaviour {
}
@@ -7,6 +7,7 @@ import com.yes.yes.behaviours.TestBehaviour;
import com.yes.yes.utils.BlockContainer;
import com.yes.yes.utils.Direction;
import com.yes.yes.utils.Entity;
import com.yes.yes.world.Chunk;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Polygon;
@@ -14,15 +15,15 @@ import javafx.scene.shape.Polygon;
public class TestMachine extends Entity {
public TestMachine() {
super();
Circle c = new Circle(25);
c.setCenterX(25);
c.setCenterY(25);
Circle c = new Circle(Chunk.ENTITY_SIZE / 2);
c.setCenterX(Chunk.ENTITY_SIZE / 2);
c.setCenterY(Chunk.ENTITY_SIZE / 2);
Polygon t = new Polygon();
t.getPoints().addAll(
25.0, 0.0,
0.0, 50.0,
50.0, 50.0);
Chunk.ENTITY_SIZE / 2d, 0.0,
0.0, (double) Chunk.ENTITY_SIZE,
(double) Chunk.ENTITY_SIZE, (double) Chunk.ENTITY_SIZE);
t.setFill(new Color(1, 1, 1, 0.5));
this.getChildren().addAll(c, t);