/* * Add operation on all objects in sector to a render update queue */ public void ScheduleUpdateOnSectorObjects(RenderObjectUpdateOperations operation, WorldSector sector) { for (int x = sector.lower_boundary_x; x < sector.upper_boundary_x; ++x) { for (int y = sector.lower_boundary_y; y < sector.upper_boundary_y; ++y) { GTile tile = GameData.GData.getTile(new Vector2(x, y)); // schedule structures for (int i = 0; i < tile.Contained_Objects.structures.all.count(); ++i) { ScheduleObjectUpdate(operation, tile.Contained_Objects.structures.all.getObjectAt(i)); } // schedule items for (int i = 0; i < tile.Contained_Objects.items.all.count(); ++i) { ScheduleObjectUpdate(operation, tile.Contained_Objects.items.all.getObjectAt(i)); } } } // schedule actors for (int i = 0; i < sector.Contained_Objects.actors.all.count(); ++i) { ScheduleObjectUpdate(operation, sector.Contained_Objects.actors.all.getObjectAt(i)); } }
public void ScheduleUpdateOnAllObjects(RenderObjectUpdateOperations operation) { for (int i = 0; i < renderedSectors.Count; ++i) { ScheduleUpdateOnSectorObjects(operation, renderedSectors[i]); } }
public Queue <GObject> getOperationQueue(RenderObjectUpdateOperations operation) { switch (operation) { case RenderObjectUpdateOperations.CREATE: return(create); case RenderObjectUpdateOperations.DESTROY: return(destroy); case RenderObjectUpdateOperations.UPDATE_POSITION: return(update_position); case RenderObjectUpdateOperations.UPDATE_BRIGHTNESS: return(update_brightness); case RenderObjectUpdateOperations.UPDATE_TINT: return(update_tint); case RenderObjectUpdateOperations.UPDATE_TRANSPARENCY: return(update_transparency); case RenderObjectUpdateOperations.UPDATE_ANIMATION: return(update_animation); } return(null); }
public Queue<GObject> getOperationQueue(RenderObjectUpdateOperations operation) { switch(operation) { case RenderObjectUpdateOperations.CREATE: return create; case RenderObjectUpdateOperations.DESTROY: return destroy; case RenderObjectUpdateOperations.UPDATE_POSITION: return update_position; case RenderObjectUpdateOperations.UPDATE_BRIGHTNESS: return update_brightness; case RenderObjectUpdateOperations.UPDATE_TINT: return update_tint; case RenderObjectUpdateOperations.UPDATE_TRANSPARENCY: return update_transparency; case RenderObjectUpdateOperations.UPDATE_ANIMATION: return update_animation; } return null; }
/* * Add operation on object to a render update queue */ public void ScheduleObjectUpdate(RenderObjectUpdateOperations operation, GObject obj) { ObjectUpdateQueues.getOperationQueue(operation).Enqueue(obj); }
/* * Add operation on object to a render update queue */ public void ScheduleObjectUpdate(RenderObjectUpdateOperations operation, GObject obj) { ObjectUpdateQueues.getOperationQueue (operation).Enqueue(obj); }
/* * Add operation on all objects in sector to a render update queue */ public void ScheduleUpdateOnSectorObjects(RenderObjectUpdateOperations operation, WorldSector sector) { for (int x = sector.lower_boundary_x; x < sector.upper_boundary_x; ++x) { for (int y = sector.lower_boundary_y; y < sector.upper_boundary_y; ++y) { GTile tile = GameData.GData.getTile(new Vector2(x, y)); // schedule structures for(int i = 0; i < tile.Contained_Objects.structures.all.count(); ++i) { ScheduleObjectUpdate(operation, tile.Contained_Objects.structures.all.getObjectAt(i)); } // schedule items for(int i = 0; i < tile.Contained_Objects.items.all.count(); ++i) { ScheduleObjectUpdate(operation, tile.Contained_Objects.items.all.getObjectAt(i)); } } } // schedule actors for (int i = 0; i < sector.Contained_Objects.actors.all.count(); ++i) { ScheduleObjectUpdate(operation, sector.Contained_Objects.actors.all.getObjectAt(i)); } }