コード例 #1
0
ファイル: Directions.cs プロジェクト: GalacticSoft/Azmyth
        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;
        }
コード例 #2
0
ファイル: Vector.cs プロジェクト: GalacticSoft/Azmyth
        public static bool TryParse(string input, out Vector vector)
        {
            try
            {
                vector = Parse(input);

                return true;
            }
            catch
            {
                vector = Origin;

                return false;
            }
        }
コード例 #3
0
ファイル: Vector.cs プロジェクト: GalacticSoft/Azmyth
 private Vector(Vector v)
     : this(v.X, v.Y, v.Z)
 {
 }
コード例 #4
0
ファイル: MapViewer.cs プロジェクト: GalacticSoft/Azmyth
 public void SetCellColor(Vector vector, Color color, bool draw = false)
 {
 }