comparison main.d @ 9:5b61327b5a7c

update steer
author zzzzrrr <mason.green@gmail.com>
date Sat, 21 Mar 2009 20:19:18 -0400
parents 4ee9e4a0c03b
children d998bf1b0654
comparison
equal deleted inserted replaced
8:4ee9e4a0c03b 9:5b61327b5a7c
71 gui.immediate.end; 71 gui.immediate.end;
72 72
73 StopWatch timer; 73 StopWatch timer;
74 74
75 jobHub.addRepeatableJob( { 75 jobHub.addRepeatableJob( {
76 whut.world.step(timeStep, settings.velocityIterations, 76 // Update physics
77 settings.positionIterations); 77 whut.world.step(timeStep, settings.velocityIterations,
78 settings.positionIterations);
79 // Update AI
80
78 }, ITERS_PER_SECOND); 81 }, ITERS_PER_SECOND);
79 82
80 bool running = true; 83 bool running = true;
81 84
82 jobHub.addPreFrameJob( { 85 jobHub.addPreFrameJob( {
83 bzVec2 velocity = whut.ship1.rBody.linearVelocity; 86 bzVec2 velocity = whut.ship1.rBody.linearVelocity;
84 whut.ship1.limitVelocity(); 87 whut.ship1.limitVelocity();
88 whut.ship2.limitVelocity();
85 }); 89 });
86 90
87 jobHub.addPostFrameJob( { 91 jobHub.addPostFrameJob( {
88 gui.begin(cfg); 92 gui.begin(cfg);
89 gui.push(`main`); 93 gui.push(`main`);