public bool RemoveRule(uint classA, uint classB) { CollisionRuleEntry toRemove = null; foreach (CollisionRuleEntry rule in _rules) { if (rule.Involves(classA, classB)) { toRemove = rule; } } if (null != toRemove) { _rules.Remove(toRemove); return(true); } return(false); }
public bool CanCollide(uint classA, uint classB, out CollisionRuleEntry collisionRule) { collisionRule = null; if ((0 == classA) || (0 == classB)) { return(false); } foreach (CollisionRuleEntry rule in _rules) { if (rule.Involves(classA, classB)) { collisionRule = rule; return(true); } } return(false); }
public bool CanCollide(uint classA, uint classB, out CollisionRuleEntry collisionRuleEntry) { collisionRuleEntry = null; return(CanCollide(classA, classB)); }