Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Wkey) {
- if(canJump) {
- velocity.y = speed;
- canJump = false;
- }
- }
- else {
- velocity.y = 0;
- }
- if (Akey) {
- velocity.x = -speed;
- }
- else if (Dkey) {
- velocity.x = speed;
- }
- else {
- velocity.x = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement