Esempio n. 1
0
        public static Vector GetDirectionVector(Directions direction)
        {
            Vector vector = new Vector(0, 0, 0);

            switch (direction)
            {
                case Directions.North:
                    vector = Direction.North;
                    break;
                case Directions.Northeast:
                    vector = Direction.NorthEast;
                    break;
                case Directions.East:
                    vector = Direction.East;
                    break;
                case Directions.Southeast:
                    vector = Direction.SouthEast;
                    break;
                case Directions.South:
                    vector = Direction.South;
                    break;
                case Directions.Southwest:
                    vector = Direction.SouthWest;
                    break;
                case Directions.West:
                    vector = Direction.West;
                    break;
                case Directions.Northwest:
                    vector = Direction.NorthWest;
                    break;
                case Directions.Up:
                    vector = Direction.Up;
                    break;
                case Directions.Down:
                    vector = Direction.Down;
                    break;
            }

            return vector;
        }
Esempio n. 2
0
        public static bool TryParse(string input, out Vector vector)
        {
            try
            {
                vector = Parse(input);

                return true;
            }
            catch
            {
                vector = Origin;

                return false;
            }
        }
Esempio n. 3
0
 private Vector(Vector v)
     : this(v.X, v.Y, v.Z)
 {
 }
Esempio n. 4
0
 public void SetCellColor(Vector vector, Color color, bool draw = false)
 {
 }