Exemple #1
0
        public void Move(CoordsDirections coordsDirection, Direction direction, int movingSpeed)
        {
            switch (direction)
            {
            case Direction.Positive:
                switch (coordsDirection)
                {
                case CoordsDirections.Abscissa:
                    Instance.position.X += movingSpeed;
                    break;

                case CoordsDirections.Ordinate:
                    Instance.position.Y += movingSpeed;
                    break;
                }

                break;

            case Direction.Negative:
                switch (coordsDirection)
                {
                case CoordsDirections.Abscissa:
                    Instance.position.X -= movingSpeed;
                    break;

                case CoordsDirections.Ordinate:
                    Instance.position.Y -= movingSpeed;
                    break;
                }

                break;
            }
        }
Exemple #2
0
        protected void AddToPosition(Direction plusOrMinus, CoordsDirections direction, float val)
        {
            switch (plusOrMinus)
            {
            case Direction.Positive:
                switch (direction)
                {
                case CoordsDirections.Abscissa:
                    this.position.X += val;
                    break;

                case CoordsDirections.Ordinate:
                    this.position.Y += val;
                    break;
                }
                break;

            case Direction.Negative:
                switch (direction)
                {
                case CoordsDirections.Abscissa:
                    this.position.X -= val;
                    break;

                case CoordsDirections.Ordinate:
                    this.position.Y -= val;
                    break;
                }
                break;
            }
        }
Exemple #3
0
        public void SetPosition(CoordsDirections coordsDirections, float value)
        {
            switch (coordsDirections)
            {
            case CoordsDirections.Abscissa:
                this.position.X = value;
                break;

            case CoordsDirections.Ordinate:
                this.position.Y = value;
                break;
            }
        }
Exemple #4
0
        protected void SetPosition(CoordsDirections direction, float val)
        {
            switch (direction)
            {
            case CoordsDirections.Abscissa:
                this.position.X = val;
                break;

            case CoordsDirections.Ordinate:
                this.position.Y = val;
                break;
            }
        }
Exemple #5
0
 public void SetPosition(CoordsDirections coordsDirections, float value)
 {
     switch (coordsDirections)
     {
         case CoordsDirections.Abscissa:
             this.position.X = value;
             break;
         case CoordsDirections.Ordinate:
             this.position.Y = value;
             break;
     }
 }
Exemple #6
0
        public void Move(CoordsDirections coordsDirection, Direction direction, int movingSpeed)
        {
            switch (direction)
            {
                case Direction.Positive:
                    switch (coordsDirection)
                    {
                        case CoordsDirections.Abscissa:
                            this.position.X += movingSpeed;
                            break;
                        case CoordsDirections.Ordinate:
                            this.position.Y += movingSpeed;
                            break;
                    }

                    break;

                case Direction.Negative:
                    switch (coordsDirection)
                    {
                        case CoordsDirections.Abscissa:
                            this.position.X -= movingSpeed;
                            break;
                        case CoordsDirections.Ordinate:
                            this.position.Y -= movingSpeed;
                            break;
                    }

                    break;
            }
        }