diff --git a/GameEngine/src/main/java/gameEngine/entites/gameComponents/Draggable.java b/GameEngine/src/main/java/gameEngine/entites/gameComponents/Draggable.java index 4893aa0..7eee5cd 100644 --- a/GameEngine/src/main/java/gameEngine/entites/gameComponents/Draggable.java +++ b/GameEngine/src/main/java/gameEngine/entites/gameComponents/Draggable.java @@ -1,12 +1,9 @@ package gameEngine.entites.gameComponents; -import gameEngine.Time; -import gameEngine.entites.Entity; import gameEngine.entites.GameObject; import gameEngine.input.Input; import gameEngine.input.MouseInput; import gameEngine.scenes.EditorScene; -import gameEngine.scenes.Scene; import gameEngine.views.Window; public abstract class Draggable extends GameComponent { @@ -25,10 +22,10 @@ float mouseY = MouseInput.getY(); EditorScene scene = (EditorScene) Window.get().getScene(); - if (scene.getSelectedEntity() == null) { + if (scene.getSelectedObject() == null) { if (Input.GetMouseButtonDown(0) && isMouseOver(mouseX, mouseY)) { isDragging = true; - scene.setSelectedEntity(parent); // エンティティを選択 + scene.setSelectedObject(parent); // エンティティを選択 } } @@ -38,7 +35,7 @@ if (Input.GetMouseButtonUp(0)) { isDragging = false; - scene.clearSelectedEntity(); // ドラッグ終了時に選択解除 + scene.clearSelectedObject(); // ドラッグ終了時に選択解除 } }