Ejemplo n.º 1
0
    public void itemEndingMove(GameObject item)
    {
        // When something stops moving, check whether it crossed any gridlines
        IndexBox newLocation = this.getIndexBoxFromWorldBox(item.getBoundingBox());

        if (!(newLocation.equals(this.movingItemStartLocation)))
        {
            // If we get here, then it did cross at least one gridline and we need to update it
            this.removeItem(item, this.movingItemStartLocation);
            this.addItem(item);
        }
    }