()
| 126 | |
| 127 | // Jump |
| 128 | function goJump(){ |
| 129 | |
| 130 | var jump = new Audio(); |
| 131 | jump.src = "../assets/sounds/joystick/Jump.mp3"; |
| 132 | jump.play(); |
| 133 | objImage.style.top = parseInt(objImage.style.top)-50 +'px'; |
| 134 | |
| 135 | setTimeout( |
| 136 | //Making the character back to position |
| 137 | function(){ |
| 138 | objImage.style.top = parseInt(objImage.style.top)+50 +'px'; |
| 139 | }, |
| 140 | |
| 141 | 450); |
| 142 | |
| 143 | |
| 144 | } |
| 145 | |
| 146 | // Shoot |
| 147 | function goShoot(){ |