Mercurial > cortex
comparison org/world.org @ 67:6f74d89fb8b3
got world working with updated jme system
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 08 Dec 2011 20:58:40 -0600 |
parents | 1381a6ebd08b |
children | 0235c32152af |
comparison
equal
deleted
inserted
replaced
66:1381a6ebd08b | 67:6f74d89fb8b3 |
---|---|
42 The most important modifications are: | 42 The most important modifications are: |
43 | 43 |
44 - Separation of Object life-cycles with the Application life-cycle. | 44 - Separation of Object life-cycles with the Application life-cycle. |
45 - Functional interface to the underlying =Application= and | 45 - Functional interface to the underlying =Application= and |
46 =SimpleApplication= classes. | 46 =SimpleApplication= classes. |
47 | 47 |
48 ** Header | 48 ** Header |
49 #+name: header | 49 #+name: header |
50 #+begin_src clojure :results silent | 50 #+begin_src clojure :results silent |
51 (ns cortex.world | 51 (ns cortex.world |
52 "World Creation, abstracion over jme3's input system, and REPL | 52 "World Creation, abstracion over jme3's input system, and REPL |
279 using. The default is to use IsoTimer which will result in this | 279 using. The default is to use IsoTimer which will result in this |
280 value always being the same. | 280 value always being the same. |
281 " | 281 " |
282 [root-node key-map setup-fn update-fn] | 282 [root-node key-map setup-fn update-fn] |
283 (let [physics-manager (BulletAppState.)] | 283 (let [physics-manager (BulletAppState.)] |
284 (JmeSystem/setSystemDelegate (AurellemSystemDelegate.)) | |
284 (doto | 285 (doto |
285 (proxy [SimpleApplication ActionListener] [] | 286 (proxy [SimpleApplication ActionListener] [] |
286 (simpleInitApp | 287 (simpleInitApp |
287 [] | 288 [] |
288 (no-exceptions | 289 (no-exceptions |
329 (react this value))))) | 330 (react this value))))) |
330 ;; don't show a menu to change options. | 331 ;; don't show a menu to change options. |
331 (.setShowSettings false) | 332 (.setShowSettings false) |
332 ;; continue running simulation even if the window has lost | 333 ;; continue running simulation even if the window has lost |
333 ;; focus. | 334 ;; focus. |
334 (JmeSystem/setSystemDelegate (AurellemSystemDelegate.)) | |
335 (.setPauseOnLostFocus false) | 335 (.setPauseOnLostFocus false) |
336 (.setSettings *app-settings*)))) | 336 (.setSettings *app-settings*)))) |
337 | |
337 #+end_src | 338 #+end_src |
338 | 339 |
339 | 340 |
340 =(world)= is the most important function here. It presents a more | 341 =(world)= is the most important function here. It presents a more |
341 functional interface to the Application life-cycle, and all its | 342 functional interface to the Application life-cycle, and all its |