Esempio n. 1
0
        internal RawVector2 TryTeleport(RawVector2 point)
        {
            if (FirstPortal.IsIntersect(point))
            {
                point.X = SecondPortal.Coord.X - FirstPortal.Coord.X - point.X;
                point.Y = SecondPortal.Coord.Y - FirstPortal.Coord.Y - point.Y;
            }
            else if (SecondPortal.IsIntersect(point))
            {
                point.X = FirstPortal.Coord.X - SecondPortal.Coord.X - point.X;
                point.Y = FirstPortal.Coord.Y - SecondPortal.Coord.Y - point.Y;
            }

            return(point);
        }
Esempio n. 2
0
 public void Draw(ref RenderTarget renderTarget)
 {
     FirstPortal.Draw(ref renderTarget);
     SecondPortal.Draw(ref renderTarget);
 }
Esempio n. 3
0
 internal Boolean IsIntersect(RawVector2 point)
 {
     return(FirstPortal.IsIntersect(point) || SecondPortal.IsIntersect(point));
 }