Mercurial > cortex
comparison org/test-creature.org @ 191:66fbab414d45
added muscle exertion debug view.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 04 Feb 2012 11:02:19 -0700 |
parents | 2902aca33c6e |
children |
comparison
equal
deleted
inserted
replaced
190:2902aca33c6e | 191:66fbab414d45 |
---|---|
145 hearing-display (view-hearing) | 145 hearing-display (view-hearing) |
146 | 146 |
147 prop (proprioception! creature) | 147 prop (proprioception! creature) |
148 prop-display (view-proprioception) | 148 prop-display (view-proprioception) |
149 | 149 |
150 muscle-fns (movement! creature) | 150 muscle-exertion (atom 0) |
151 | 151 muscles (movement! creature) |
152 muscle-display (view-movement) | |
152 | 153 |
153 me (sphere 0.5 :color ColorRGBA/Blue :physical? false) | 154 me (sphere 0.5 :color ColorRGBA/Blue :physical? false) |
154 bell (AudioNode. (asset-manager) | 155 bell (AudioNode. (asset-manager) |
155 "Sounds/pure.wav" false) | 156 "Sounds/pure.wav" false) |
156 | 157 |
181 (println-repl "play-sound") | 182 (println-repl "play-sound") |
182 (.play bell)))) | 183 (.play bell)))) |
183 "key-h" | 184 "key-h" |
184 (fn [_ value] | 185 (fn [_ value] |
185 (if value | 186 (if value |
186 (do | 187 (swap! muscle-exertion (partial + 20)))) |
187 (println-repl "muscle activating!") | 188 "key-n" |
188 ((first muscle-fns) 199)))) | 189 (fn [_ value] |
190 (if value | |
191 (swap! muscle-exertion (fn [v] (- v 20))))) | |
189 | 192 |
190 }) | 193 }) |
191 (fn [world] | 194 (fn [world] |
192 (light-up-everything world) | 195 (light-up-everything world) |
193 (enable-debug world) | 196 (enable-debug world) |
215 (touch-display (map #(% (.getRootNode world)) touch)) | 218 (touch-display (map #(% (.getRootNode world)) touch)) |
216 | 219 |
217 (vision-display (map #(% world) vision)) | 220 (vision-display (map #(% world) vision)) |
218 | 221 |
219 (hearing-display (map #(% world) hearing)) | 222 (hearing-display (map #(% world) hearing)) |
223 | |
224 (muscle-display (map #(% @muscle-exertion) muscles)) | |
220 | 225 |
221 ;;(println-repl (vision-data)) | 226 ;;(println-repl (vision-data)) |
222 (.setLocalTranslation me (.getLocation (.getCamera world))) | 227 (.setLocalTranslation me (.getLocation (.getCamera world))) |
223 (fix-display world) | 228 (fix-display world) |
224 | 229 |