diff --git a/src/main/java/cactusServer/entities/Depth3D.java b/src/main/java/cactusServer/entities/Depth3D.java new file mode 100644 index 0000000..555a80b --- /dev/null +++ b/src/main/java/cactusServer/entities/Depth3D.java @@ -0,0 +1,32 @@ +package cactusServer.entities; + +public class Depth3D { + private double depthX,depthY,depthZ; + private Depth3D() { + //Json�f�R�[�h�p + } + + public double getDepthX() { + return depthX; + } + + public void setDepthX(double depthX) { + this.depthX = depthX; + } + + public double getDepthY() { + return depthY; + } + + public void setDepthY(double depthY) { + this.depthY = depthY; + } + + public double getDepthZ() { + return depthZ; + } + + public void setDepthZ(double depthZ) { + this.depthZ = depthZ; + } +} diff --git a/src/main/java/cactusServer/entities/Instance.java b/src/main/java/cactusServer/entities/Instance.java index 85283ae..a3a2b2c 100644 --- a/src/main/java/cactusServer/entities/Instance.java +++ b/src/main/java/cactusServer/entities/Instance.java @@ -140,6 +140,7 @@ RandomStringGenerator.ALPHA_NUMERIC, objMap.keySet()); Object object = new Object(position, velocity, angularVelocity, angle, attribute, model); objMap.put(id, object); + universe.place(object.getPlaceable()); return new IDAddressedEntity(id, object); } @@ -156,7 +157,7 @@ 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); diff --git a/src/main/java/cactusServer/entities/Object.java b/src/main/java/cactusServer/entities/Object.java index 146a821..20f9465 100644 --- a/src/main/java/cactusServer/entities/Object.java +++ b/src/main/java/cactusServer/entities/Object.java @@ -9,15 +9,18 @@ //import framework.physics.Velocity3D; import net.arnx.jsonic.JSONHint; -public class Object extends Entity { +public class Object extends Entity3D { private Position3D position; private Velocity3D velocity; private AngularVelocity3D angularVelocity; private Angle angle; private Attribute attribute; private String model; - @JSONHint(ignore = true) public static final int UNIQUE_ID_LENGTH = 12; + @JSONHint(ignore = true) + public static final int UNIQUE_ID_LENGTH = 12; + + @SuppressWarnings("unused") private Object() { // JSONDecode���̌Ăяo���p } @@ -47,7 +50,7 @@ public Angle getAngle() { return angle; } - + public Attribute getAttribute() { return attribute; } @@ -105,4 +108,5 @@ this.cof = cof; } } -} + +} \ No newline at end of file