Examples - Remove unnecessary Game Loop Creation

This commit is contained in:
Marty Oehme 2018-07-20 19:22:55 +02:00
parent 914b2aa5dd
commit d11a47abc5

View file

@ -92,20 +92,6 @@ void activate(MouseEvent e) {
examples.forEach((Example ex) { examples.forEach((Example ex) {
if (ex.canvas == c) { if (ex.canvas == c) {
resetExample(ex); resetExample(ex);
switch (ex.query) {
case "#while_loop":
ex.loop = new WhileLoop(new Game(ex.canvas));
break;
case "#fixed_variable":
ex.loop = new FixedLoopVariableRender(new Game(ex.canvas));
break;
case "#variable_timestep":
ex.loop = new VariableTimestep(new Game(ex.canvas));
break;
case "#dirty_flag":
ex.loop = new DirtyFlagRender(new Game(ex.canvas));
break;
}
addControls(ex); addControls(ex);
} else { } else {
resetExample(ex); resetExample(ex);