Пример #1
0
    public CGameObject collides(CGameObject aGameObject)
    {
        for (int i = mArray.Count - 1; i >= 0; i--)
        {
            if (aGameObject.collides(mArray[i]))
            {
                return(mArray[i]);
            }
        }

        return(null);
    }
Пример #2
0
    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);
    }