diff --git a/src/main/java/cactusServer/entities/Instance.java b/src/main/java/cactusServer/entities/Instance.java index 51cad77..470d2ca 100644 --- a/src/main/java/cactusServer/entities/Instance.java +++ b/src/main/java/cactusServer/entities/Instance.java @@ -12,9 +12,9 @@ import org.ntlab.radishforandroidstudio.framework.physics.Velocity3D; import cactusServer.entities.Entity; -import cactusServer.entities.Object; +import cactusServer.entities.MovableObject; import cactusServer.entities.Area.Allowed; -import cactusServer.entities.Object.Attribute; +import cactusServer.entities.MovableObject.Attribute; import cactusServer.models.StageModelManager; import cactusServer.utils.RandomStringGenerator; import cactusServer.entities.Character; @@ -34,7 +34,7 @@ private Universe universe; private Ground stage; private HashMap areaMap = new HashMap<>(); - private HashMap objMap = new HashMap<>(); + private HashMap objMap = new HashMap<>(); private HashMap characterMap = new HashMap<>(); private HashMap> bulletMap = new HashMap<>(); @JSONHint(ignore = true) @@ -86,11 +86,11 @@ } @JSONHint(ignore = true) - public HashMap getObjects() { + public HashMap getObjects() { return objMap; } - public Object getObject(String objId) { + public MovableObject getObject(String objId) { return objMap.get(objId); } @@ -145,14 +145,14 @@ return returnedMap; } - public HashMap createObject(Position3D position, Velocity3D velocity, + public HashMap createObject(Position3D position, Velocity3D velocity, AngularVelocity3D angularVelocity, Quaternion3D angle, Attribute attribute, int modelID) { - String id = RandomStringGenerator.generateUniqueString(Object.UNIQUE_ID_LENGTH, + String id = RandomStringGenerator.generateUniqueString(MovableObject.UNIQUE_ID_LENGTH, RandomStringGenerator.ALPHA_NUMERIC, objMap.keySet()); - Object object = new Object(position, velocity, angularVelocity, angle, attribute, modelID); + MovableObject object = new MovableObject(position, velocity, angularVelocity, angle, attribute, modelID); objMap.put(id, object); universe.place(object.getPlaceable()); - HashMap returnedMap = new HashMap<>(); + HashMap returnedMap = new HashMap<>(); returnedMap.put(id, object); return returnedMap; } @@ -212,7 +212,7 @@ return areaMap.remove(areaId); } - public Object destroyObject(String objId) { + public MovableObject destroyObject(String objId) { return objMap.remove(objId); }