Exemplo n.º 1
0
    public void removeObject(GStructure obj)
    {
        all.removeObjectAt(obj.reflist_index.all);
        for (int i = obj.reflist_index.all; i < all.count(); ++i)
        {
            // every entry after this one had their index decreased by 1, so correct their reflist indexes
            all.getObjectAt(i).reflist_index.all--;
        }

        interactive[(int)obj.properties.interactive].removeObjectAt(obj.reflist_index.interactive);
        for (int i = obj.reflist_index.interactive; i < interactive[(int)obj.properties.interactive].count(); ++i)
        {
            // every entry after this one had their index decreased by 1, so correct their reflist indexes
            interactive[(int)obj.properties.interactive].getObjectAt(i).reflist_index.interactive--;
        }

        movable[(int)obj.properties.movable].removeObjectAt(obj.reflist_index.movable);
        for (int i = obj.reflist_index.movable; i < movable[(int)obj.properties.movable].count(); ++i)
        {
            // every entry after this one had their index decreased by 1, so correct their reflist indexes
            movable[(int)obj.properties.movable].getObjectAt(i).reflist_index.movable--;
        }

        environmental[(int)obj.properties.environmental].removeObjectAt(obj.reflist_index.environmental);
        for (int i = obj.reflist_index.environmental; i < environmental[(int)obj.properties.environmental].count(); ++i)
        {
            // every entry after this one had their index decreased by 1, so correct their reflist indexes
            environmental[(int)obj.properties.environmental].getObjectAt(i).reflist_index.environmental--;
        }
    }
Exemplo n.º 2
0
 public void removeObject(GItem obj)
 {
     all.removeObjectAt(obj.reflist_index.all);
     for (int i = obj.reflist_index.all; i < all.count(); ++i)
     {
         // every entry after this one had their index decreased by 1, so correct their reflist indexes
         all.getObjectAt(i).reflist_index.all--;
     }
 }
Exemplo n.º 3
0
    public void removeObject(GActor obj)
    {
        all.removeObjectAt(obj.reflist_index.all);
        for (int i = obj.reflist_index.all; i < all.count(); ++i)
        {
            // every entry after this one had their index decreased by 1, so correct their reflist indexes
            all.getObjectAt(i).reflist_index.all--;
        }

        environmental[(int)obj.properties.environmental].removeObjectAt(obj.reflist_index.environmental);
        for (int i = obj.reflist_index.environmental; i < environmental[(int)obj.properties.environmental].count(); ++i)
        {
            // every entry after this one had their index decreased by 1, so correct their reflist indexes
            environmental[(int)obj.properties.environmental].getObjectAt(i).reflist_index.environmental--;
        }

        NPCs[(int)obj.properties.npc].removeObjectAt(obj.reflist_index.NPCs);
        for (int i = obj.reflist_index.NPCs; i < NPCs[(int)obj.properties.npc].count(); ++i)
        {
            // every entry after this one had their index decreased by 1, so correct their reflist indexes
            NPCs[(int)obj.properties.npc].getObjectAt(i).reflist_index.NPCs--;
        }
    }