Mercurial > projects > openmelee
comparison main.d @ 15:8e6a9e390cba
Added binary win32 demo
author | zzzzrrr <mason.green@gmail.com> |
---|---|
date | Tue, 24 Mar 2009 11:06:16 -0400 |
parents | af1e8620f027 |
children | 82efafc87d54 |
comparison
equal
deleted
inserted
replaced
14:af1e8620f027 | 15:8e6a9e390cba |
---|---|
75 gui.immediate.end; | 75 gui.immediate.end; |
76 | 76 |
77 StopWatch timer; | 77 StopWatch timer; |
78 | 78 |
79 jobHub.addRepeatableJob( { | 79 jobHub.addRepeatableJob( { |
80 | |
81 // Update AI | |
82 ai.move(whut.ship1); | |
83 | |
80 // Update physics | 84 // Update physics |
81 whut.world.step(timeStep, settings.velocityIterations, | 85 whut.world.step(timeStep, settings.velocityIterations, |
82 settings.positionIterations); | 86 settings.positionIterations); |
83 // Update AI | 87 |
84 ai.move(whut.ship1); | 88 // Limit velocity |
89 whut.ship1.limitVelocity(); | |
90 whut.ship2.limitVelocity(); | |
91 whut.ship1.updateState(); | |
92 whut.ship2.updateState(); | |
93 | |
85 }, ITERS_PER_SECOND); | 94 }, ITERS_PER_SECOND); |
86 | 95 |
87 bool running = true; | 96 bool running = true; |
88 | 97 |
89 jobHub.addPreFrameJob( { | 98 jobHub.addPreFrameJob( { |
90 whut.ship1.limitVelocity(); | |
91 whut.ship2.limitVelocity(); | |
92 whut.ship1.updateState(); | |
93 whut.ship2.updateState(); | |
94 }); | 99 }); |
95 | 100 |
96 jobHub.addPostFrameJob( { | 101 jobHub.addPostFrameJob( { |
102 | |
97 gui.begin(cfg); | 103 gui.begin(cfg); |
98 gui.push(`main`); | 104 gui.push(`main`); |
99 if (gui().getProperty!(bool)("frame.closeClicked")) { | 105 if (gui().getProperty!(bool)("frame.closeClicked")) { |
100 running = false; | 106 running = false; |
101 } | 107 } |