public void Dispose() { if (CharacterProxy != null) { CharacterProxy.Dispose(); CharacterProxy = null; } if (CharacterPhantom != null) { CharacterPhantom.Dispose(); CharacterPhantom = null; } if (CharacterRigidBody != null) { if (CharacterRigidBody.GetRigidBody() != null) { CharacterRigidBody.GetRigidBody().ContactPointCallback -= RigidBody_ContactPointCallback; } CharacterRigidBody.Dispose(); CharacterRigidBody = null; } m_characterShape.RemoveReference(); m_characterCollisionShape.RemoveReference(); m_crouchShape.RemoveReference(); }
public void Dispose() { if (CharacterProxy != null) { CharacterProxy.Dispose(); CharacterProxy = null; } if (CharacterPhantom != null) { CharacterPhantom.Dispose(); CharacterPhantom = null; } if (CharacterRigidBody != null) { CharacterRigidBody.Dispose(); CharacterRigidBody = null; } m_characterShape.RemoveReference(); m_characterCollisionShape.RemoveReference(); m_crouchShape.RemoveReference(); }