Created
December 11, 2015 22:12
-
-
Save quantumpotato/edc46fc77e97d696f88a to your computer and use it in GitHub Desktop.
Turbo
This file contains 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
class TurboMover extends Component { | |
registrationNames() { | |
return ['velocity']; | |
} | |
getValue(name, hash) { | |
if (name == 'velocity') { | |
hash.vx = hash.vx * 20; //times speed | |
hash.vy = hash.vy * 20; | |
} | |
return hash; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment