Exemple #1
0
    public static Vector2 Direction(this RayMover.Line line)
    {
        switch (line)
        {
        case RayMover.Line.Down:
            return(Vector2.down);

        case RayMover.Line.Up:
            return(Vector2.up);

        case RayMover.Line.Left:
            return(Vector2.left);

        case RayMover.Line.Right:
            return(Vector2.right);
        }
        return(Vector2.zero);
    }
Exemple #2
0
 public static bool IsHorizontal(this RayMover.Line line)
 {
     return(line == RayMover.Line.Left || line == RayMover.Line.Right);
 }
Exemple #3
0
 public static bool IsVertical(this RayMover.Line line)
 {
     return(line == RayMover.Line.Up || line == RayMover.Line.Down);
 }