diff --git a/GameEngine/src/main/java/gameEngine/entites/gameComponents/ComponentView.java b/GameEngine/src/main/java/gameEngine/entites/gameComponents/ComponentView.java index 53d3e32..e488105 100644 --- a/GameEngine/src/main/java/gameEngine/entites/gameComponents/ComponentView.java +++ b/GameEngine/src/main/java/gameEngine/entites/gameComponents/ComponentView.java @@ -1,14 +1,12 @@ package gameEngine.entites.gameComponents; import gameEngine.entites.Entity; -import gameEngine.views.ConnectionLine; import gameEngine.views.Sprite; import org.joml.Vector3f; public class ComponentView extends Draggable{ private Sprite sprite; private PortView portviewA; - private PortView connectedEntity; public ComponentView(Entity entity){ this.parent = entity; @@ -31,6 +29,7 @@ sprite.update(); Vector3f pos = new Vector3f(parent.transform.position.x+82,parent.transform.position.y+12,parent.transform.position.z); portviewA.update(pos, parent.transform.rotation, parent.transform.scale); + portviewA.handleDragging("ComponentPort"); } @Override @@ -39,7 +38,7 @@ } @Override - protected void updatePosition(float mouseX, float mouseY) { + protected void draggingAction(float mouseX, float mouseY) { sprite.setPosition(mouseX - sprite.getDisplayedWidth() / 2, mouseY - sprite.getDisplayedHeight() / 2); }