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; } }
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; } }
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; } }
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; } }
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; } }