diff --git a/src/main/java/cactusServer/entities/Instance.java b/src/main/java/cactusServer/entities/Instance.java index 68b3b5d..129a44f 100644 --- a/src/main/java/cactusServer/entities/Instance.java +++ b/src/main/java/cactusServer/entities/Instance.java @@ -33,7 +33,8 @@ public class Instance extends Entity { private String name; private State state; - private String stageURI; + private String stageID; + private Universe universe; private Ground stage; private HashMap areaMap = new HashMap<>(); @@ -46,10 +47,10 @@ // JSONDecode���̌Ăяo���p } - public Instance(String name, State state, String stageURI) { + public Instance(String name, State state, String stageID) { setName(name); setState(state); - setStage(stageURI); + setStageID(stageID); //initUniverse(); } @@ -57,7 +58,7 @@ universe = new Universe(); // stageURI�����ɂ��ēǂݍ��ރX�e�[�W�̃t�@�C����(���΃p�X)�����\�� - String stageFileName = stageURI; + String stageFileName = stageID; // �X�e�[�W��3D�f�[�^��ǂݍ��ݔz�u���� Object3D stageObj; @@ -78,8 +79,8 @@ return state; } - public String getStage() { - return stageURI; + public String getStageID() { + return stageID; } @JSONHint(ignore = true) @@ -122,8 +123,8 @@ this.state = state; } - public void setStage(String stageURI) { - this.stageURI = stageURI; + public void setStageID(String stageURI) { + this.stageID = stageURI; } public IDAddressedEntity createArea(String name, Plain[] region, HashSet permissions) { @@ -152,12 +153,17 @@ characterMap.put(id, character); return new IDAddressedEntity(id, character); } + + public Instance update(Instance.State state) { + setState(state); + return this; + } public Character updateCharacter(String characterId, Position3D position, Angle angle, String model) { Character character = characterMap.get(characterId); character.update(position, angle, model, null); // areaURI(��4����)�̍X�V�͌Ăяo����Ŏ����ōs���� return character; - }// + } public Character destroyCharacter(String characterId) { return characterMap.remove(characterId);