コード例 #1
0
        public void IntersectsPointFalseIfMoreThan10UnitsFromPosition()
        {
            const ulong time = 1500;

            m_Motion.GetCurrentPosition(time).Returns(new Vector(5, -7));

            var intersects = m_SelectableObject.IntersectsPoint(new Vector(25, -7), time);

            Assert.False(intersects);
        }
コード例 #2
0
        public bool IntersectsPoint(Vector worldPosition, ulong time)
        {
            IMotion motion = m_Path.GetCurrentMotion(time);

            var objectPosition = motion.GetCurrentPosition(time);

            return(m_Bounds.Contains(worldPosition, objectPosition));
        }