diff --git a/src/main/java/cactusServer/entities/Instance.java b/src/main/java/cactusServer/entities/Instance.java index fb2aa1d..d55ed87 100644 --- a/src/main/java/cactusServer/entities/Instance.java +++ b/src/main/java/cactusServer/entities/Instance.java @@ -21,6 +21,7 @@ import cactusServer.entities.Object; import cactusServer.entities.Area.Allowed; import cactusServer.entities.Object.Attribute; +import cactusServer.models.StageModelManager; import cactusServer.utils.RandomStringGenerator; import cactusServer.entities.Character; import net.arnx.jsonic.JSONHint; @@ -48,28 +49,19 @@ // JSONDecode���̌Ăяo���p } - public Instance(String name, State state, int stageID) { + public Instance(String name, int stageID) { setName(name); - setState(state); + setState(Instance.State.AVAILABLE); setStageID(stageID); //initUniverse(); } private void initUniverse() { universe = new Universe(); - - // stageURI�����ɂ��ēǂݍ��ރX�e�[�W�̃t�@�C����(���΃p�X)�����\�� - String stageFileName = ""; - // �X�e�[�W��3D�f�[�^��ǂݍ��ݔz�u���� - Object3D stageObj; - try { - stageObj = ModelFactory.loadModel(stageFileName, null, false, true).createObject(); - stage = new Ground(stageObj); - universe.place(stage); - } catch (IOException | ModelFileFormatException e) { - e.printStackTrace(); - } + Object3D stageObj = StageModelManager.getInstance().getStage(stageID).createObject(); + stage = new Ground(stageObj); + universe.place(stage); } public String getName() {