public CGameObject collides(CGameObject aGameObject) { for (int i = mArray.Count - 1; i >= 0; i--) { if (aGameObject.collides(mArray[i])) { return(mArray[i]); } } return(null); }
public List <CGameObject> collidesList(CGameObject aGameObject) { List <CGameObject> results = new List <CGameObject>(); for (int i = mArray.Count - 1; i >= 0; i--) { if (aGameObject.collides(mArray[i])) { results.Add(mArray[i]); } } return(results); }