Blocking Info Renderer
|Document Data structures|
|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.
Same as by the other renderers, you can enable Layers which instances are then checked and if they have a active blocking property there cells are framed. The default color is green, 0,255,0 you can change it with 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() # self.map is an instance of fife.Map() # self.camera is an instance of fife.Camera() #get renderer renderer = fife.BlockingInfoRenderer.getInstance(self.camera) #change color to red renderer.setColor(255, 0, 0) #fetch layer layer = self.map.getLayer("agentlayer") #activate a layer renderer.addActiveLayer(layer)