Last active
August 29, 2015 14:05
-
-
Save keyle/c7db0f78a3bb7a4a8bfb to your computer and use it in GitHub Desktop.
wrong FPS way
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
| // listening to flash stage... | |
| // can't figure out the MouseCollision thing | |
| Main.stage.addEventListener(MouseEvent.MOUSE_MOVE, mousemove, false, 0, true); | |
| // ... | |
| private var tally:Number = 0; | |
| private function mousemove(event:MouseEvent):void | |
| { | |
| tally = (event.movementX) / 8.5; | |
| } | |
| private function update(event:Event):void | |
| { | |
| player.rotateY(tally); | |
| tally = 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment