Move GameObject to the entity package (and remove the now empty entity.obj package).

This commit is contained in:
Major-
2014-07-10 20:28:48 +01:00
parent 337322f491
commit 0173d0b8c8
6 changed files with 17 additions and 22 deletions
@@ -9,7 +9,7 @@ import java.util.List;
import org.apollo.fs.IndexedFileSystem;
import org.apollo.fs.archive.Archive;
import org.apollo.game.model.Position;
import org.apollo.game.model.obj.GameObject;
import org.apollo.game.model.entity.GameObject;
import org.apollo.util.BufferUtil;
import org.apollo.util.CompressionUtil;
@@ -10,8 +10,8 @@ import org.apollo.game.model.World;
import org.apollo.game.model.area.Sector;
import org.apollo.game.model.def.ObjectDefinition;
import org.apollo.game.model.entity.Entity.EntityType;
import org.apollo.game.model.entity.GameObject;
import org.apollo.game.model.entity.Player;
import org.apollo.game.model.obj.GameObject;
/**
* A verification {@link EventHandler} for the {@link ObjectActionEvent}.
+1 -1
View File
@@ -25,9 +25,9 @@ import org.apollo.game.model.def.ItemDefinition;
import org.apollo.game.model.def.NpcDefinition;
import org.apollo.game.model.def.ObjectDefinition;
import org.apollo.game.model.entity.Entity;
import org.apollo.game.model.entity.GameObject;
import org.apollo.game.model.entity.Npc;
import org.apollo.game.model.entity.Player;
import org.apollo.game.model.obj.GameObject;
import org.apollo.game.scheduling.ScheduledTask;
import org.apollo.game.scheduling.Scheduler;
import org.apollo.io.EquipmentDefinitionParser;
@@ -1,6 +1,6 @@
package org.apollo.game.model.def;
import org.apollo.game.model.obj.GameObject;
import org.apollo.game.model.entity.GameObject;
/**
* Represents a type of {@link GameObject}.
@@ -1,8 +1,7 @@
package org.apollo.game.model.obj;
package org.apollo.game.model.entity;
import org.apollo.game.model.Position;
import org.apollo.game.model.def.ObjectDefinition;
import org.apollo.game.model.entity.Entity;
/**
* Represents an object in the game world.
@@ -18,9 +17,9 @@ public final class GameObject extends Entity {
private final ObjectDefinition definition;
/**
* The object's rotation.
* The object's orientation.
*/
private final int rotation;
private final int orientation;
/**
* The object type.
@@ -33,12 +32,12 @@ public final class GameObject extends Entity {
* @param id The object's id.
* @param position The position.
* @param type The type code of the object.
* @param rotation The rotation of the object.
* @param orientation The orientation of the object.
*/
public GameObject(int id, Position position, int type, int rotation) {
public GameObject(int id, Position position, int type, int orientation) {
super(position);
this.type = type;
this.rotation = rotation;
this.orientation = orientation;
definition = ObjectDefinition.lookup(id);
}
@@ -57,7 +56,7 @@ public final class GameObject extends Entity {
}
/**
* Gets the id of this object.
* Gets this object's id.
*
* @return The id.
*/
@@ -66,16 +65,16 @@ public final class GameObject extends Entity {
}
/**
* Gets the object's rotation.
* Gets this object's orientation.
*
* @return The rotation.
* @return The orientation.
*/
public int getRotation() {
return rotation;
return orientation;
}
/**
* Gets the type code of the object.
* Gets this object's type.
*
* @return The type.
*/
@@ -85,8 +84,8 @@ public final class GameObject extends Entity {
@Override
public String toString() {
return GameObject.class.getName() + " [id=" + definition.getId() + ", type=" + type + ", rotation=" + rotation
+ "]";
return GameObject.class.getName() + " [id=" + definition.getId() + ", type=" + type + ", rotation="
+ orientation + "]";
}
}
@@ -1,4 +0,0 @@
/**
* Contains models related to in-game objects.
*/
package org.apollo.game.model.obj;