Created
March 17, 2013 02:39
-
-
Save Blecki/5179319 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (if (! server) | |
| (nop | |
| /* Runs on client */ | |
| (print "Binding keys.\n") | |
| (bind-key "W" "HELD" (camera.Pitch (* 1.0 delta))) | |
| (bind-key "S" "HELD" (camera.Pitch (* -1.0 delta))) | |
| (bind-key "A" "HELD" (camera.Yaw (* 1.0 delta))) | |
| (bind-key "D" "HELD" (camera.Yaw (* -1.0 delta))) | |
| (print "Creating interactive cube.") | |
| (let ( | |
| (spacial (c-spacial (xna.v 0 0 0))) | |
| ) | |
| (nop | |
| (create-entity 0 spacial | |
| (c-model (((mesh.cube).Color (xna.v 1 1 1 1)).Facet)) | |
| ) | |
| (on-click 0 (message 42)) | |
| ) | |
| ) | |
| ) | |
| /* Runs on server */ | |
| (let ( | |
| (spacial (c-spacial (xna.v 2 2 2))) | |
| ) | |
| (nop | |
| (set-handler 42 (set spacial "Orientation" (xna.q-from-ypr 1 1 1))) | |
| (create-entity 0 spacial) | |
| ) | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment