private void readObject(ObjectInputStream in) throws IOException
	{
		try
		{
			listeners=(ArrayList<EntityListener>)in.readObject();
		}
		catch(ClassNotFoundException e)
		{
			e.printStackTrace();
		}
		imageIndex=in.readInt();
		try
		{
			offset=(Point)in.readObject();
		}
		catch(ClassNotFoundException e)
		{
			e.printStackTrace();
		}
		x=in.readDouble();
		y=in.readDouble();
		lastDepth=in.readInt();
		lastX=in.readDouble();
		lastY=in.readDouble();
		depth=in.readInt();
		try
		{
			mask=(Mask)in.readObject();
			//sprite=(Sprite)in.readObject();
			String sprName=(String)in.readObject();
			sprite=Sprite.sprite(sprName);
		}
		catch(ClassNotFoundException e)
		{
			e.printStackTrace();
		}
	}