Last active
January 3, 2016 08:29
-
-
Save caubry/8436532 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
| parseJSON = function (weaponJSON) { | |
| var parsedJSON = JSON.parse(weaponJSON); | |
| return parsedJSON['frames']['chaingun_impact.png']['spriteSourceSize']['x']; | |
| }; | |
| var setup = function() { | |
| var xmlRequest = new XMLHttpRequest(); | |
| xmlRequest.open("GET", "/media/resources/gamedev/weapon.json", true); | |
| xmlRequest.onload = function () { | |
| parseJSON = JSON.parse(this.responseText); | |
| }; | |
| xmlRequest.send(); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment