Hello there.
I have encountered a problem while trying to add sound on my game through override the functions inside contactlistener class.
The problem is this.
At some point there are many objects around (bodies) and when the sounds are playing, the game sudently stops (i guess because theres at some points too many sounds playing at the same time).
And i Get the following errors:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at GameContactListener/Add()
at Box2D.Dynamics.Contacts::b2PolygonContact/Evaluate()
at Box2D.Dynamics.Contacts::b2Contact/Update()
at Box2D.Dynamics::b2ContactManager/Collide()
at Box2D.Dynamics::b2World/Step()
at Main/eFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at GameContactListener/Persist()
at Box2D.Dynamics.Contacts::b2PolygonContact/Evaluate()
at Box2D.Dynamics.Contacts::b2Contact/Update()
at Box2D.Dynamics::b2ContactManager/Collide()
at Box2D.Dynamics::b2World/Step()
at Main/eFrame()
Any idea how can i get rid of these errors?
I have encountered a problem while trying to add sound on my game through override the functions inside contactlistener class.
The problem is this.
At some point there are many objects around (bodies) and when the sounds are playing, the game sudently stops (i guess because theres at some points too many sounds playing at the same time).
And i Get the following errors:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at GameContactListener/Add()
at Box2D.Dynamics.Contacts::b2PolygonContact/Evaluate()
at Box2D.Dynamics.Contacts::b2Contact/Update()
at Box2D.Dynamics::b2ContactManager/Collide()
at Box2D.Dynamics::b2World/Step()
at Main/eFrame()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at GameContactListener/Persist()
at Box2D.Dynamics.Contacts::b2PolygonContact/Evaluate()
at Box2D.Dynamics.Contacts::b2Contact/Update()
at Box2D.Dynamics::b2ContactManager/Collide()
at Box2D.Dynamics::b2World/Step()
at Main/eFrame()
Any idea how can i get rid of these errors?