degagé matplotlib
This commit is contained in:
parent
631dac180f
commit
76daf3f452
@ -1,6 +1,5 @@
|
|||||||
import sumolib
|
import sumolib
|
||||||
from Car import Car
|
from Car import Car
|
||||||
from matplotlib import cm
|
|
||||||
|
|
||||||
class CarController:
|
class CarController:
|
||||||
def __init__(self,path,parentMap,surface):
|
def __init__(self,path,parentMap,surface):
|
||||||
@ -18,8 +17,6 @@ class CarController:
|
|||||||
car.update(1.0/60)
|
car.update(1.0/60)
|
||||||
|
|
||||||
def draw(self,screen):
|
def draw(self,screen):
|
||||||
cmap = cm.get_cmap('Spectral')
|
for car in self.cars:
|
||||||
for ind,car in enumerate(self.cars):
|
car.draw((255,255,255))
|
||||||
color=cmap(ind/len(self.cars))
|
|
||||||
car.draw([a*255 for a in color[0:3]])
|
|
||||||
screen.blit(self.surf,(0,0))
|
screen.blit(self.surf,(0,0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user