cykod / Quintus

HTML5 Game Engine
http://html5quintus.com
GNU General Public License v2.0
1.41k stars 401 forks source link

in Q._generateCollisionPoints, obj.p.points is undefined, which throws an error #174

Open akinnee opened 8 years ago

akinnee commented 8 years ago

Uncaught TypeError: Cannot read property 'length' of undefined

Q._generateCollisionPoints @ quintus_sprites.js:312 update @ quintus_sprites.js:676 (anonymous function) @ my game Q.gameLoopCallbackWrapper @ quintus.js:591 requestAnimationFrame (async) Quintus.Q.gameLoop @ quintus.js:595 startGameLoop @ my game (anonymous function) @ my game loadedCallback @ quintus.js:1892 img.onload @ quintus.js:1623

akinnee commented 8 years ago

I worked around this by calling _generatePoints manually after this._super in my Sprite's init method.

Q._generatePoints( this, true );

It's hacky though, so if there is a real solution, please let me know. Other than that one issue, I am enjoying this framework so far.