Blocking Info Renderer

From FIFE development wiki
Revision as of 07:35, 25 March 2012 by Helios2000 (Talk | contribs)

Jump to: navigation, search
Document Data structures Data strucures
Concepts illustrated here are relevant to understand what kind of data FIFE engine is able to process.


The BlockingInfoRenderer is a debuger or helper renderer. It can be used to show you which instances on the map have their blocking property set to True. You can only changed the color that is used.


Like all other renderers, you can enable specific layers for this one. Instances on these activated layers are then checked for their blocking property and if it is set to True, the corresponding cells are colored with the default color (green, rgb values: 0,255,0) which you can by using setColor().



string; gets the name of the renderer

setColor(r, g, b)

changes the used color

integer; color values, range 0-255


Here we active a Layer (agentlayer) and change the color to red (255,0,0)

 # "agentlayer" is the Layer Id to get an instance of fife.Layer()
 # is an instance of fife.Map()
 # is an instance of fife.Camera()
 #get renderer
 renderer = fife.BlockingInfoRenderer.getInstance(
 #fetch layer
 layer ="agentlayer")
 #activate a layer
 #enable renderer
 #change color to red
 renderer.setColor(255, 0, 0)