Created
May 20, 2012 11:06
-
-
Save ardcore/2757662 to your computer and use it in GitHub Desktop.
This file contains 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
function resolveCollisions() { | |
var collision = world.m_contactList; | |
if (!collision) return; | |
var obj1 = collision.GetShape1(); | |
var obj2 = collision.GetShape2(); | |
if ( (obj1.m_body.m_shapeList.renderType == "player" && obj2.m_body.m_shapeList.renderType == "exit") || | |
(obj2.m_body.m_shapeList.renderType == "player" && obj1.m_body.m_shapeList.renderType == "exit")) { | |
winGame(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment