CollisionMediator.findMatch C# (CSharp) Method

findMatch() private method

private findMatch ( GameObject a, GameObject b ) : CollEvent,
a GameObject
b GameObject
return CollEvent,
    private CollEvent findMatch(GameObject a, GameObject b)
    {
        foreach (CollEvent e in collision_events) {
            GameObject e0 = e.getColliders()[0];
            GameObject e1 = e.getColliders()[1];
            // if the object signalling the collision exists in another event - there is a duplicate
            if (b.GetInstanceID() == e0.GetInstanceID() || a.GetInstanceID() == e1.GetInstanceID()) {
                return e;
            }
        }
        return null;
    }