First version of usable Displayer class done
This commit is contained in:
@@ -6,8 +6,13 @@ from matplotlib.animation import FuncAnimation
|
||||
from display.dislpay_2d import Displayer
|
||||
|
||||
|
||||
def update(disp, t):
|
||||
disp.move_object("test", t, t)
|
||||
disp.move_object("test2", 20-t, 20-t)
|
||||
|
||||
def run():
|
||||
disp = Displayer(width=6, height=6)
|
||||
# disp.show_object([1, 1], 4, "green")
|
||||
disp.animate(n_steps = 100)
|
||||
#disp.show_object([1, 1], 4, "green")
|
||||
disp.register_object("test")
|
||||
disp.register_object("test2", 'g')
|
||||
disp.animate(n_steps = 100, anim_callback=update)
|
||||
Reference in New Issue
Block a user