示例#1
0
 private Vector2 getPlanarPosition(Position enemyPosition)
 {
     Vector2 planarPosition;
     if (render2d)
     {
         planarPosition = new Vector2(enemyPosition.GetPosition(xDimension), enemyPosition.GetPosition(yDimension));
     }
     else
     {
         planarPosition = new Vector2(enemyPosition.GetPosition(xDimension), 0);
     }
     return planarPosition;
 }
示例#2
0
        private void drawLocation(SpriteBatch spriteBatch, Position position)
        {
            int getPlayerDimension = player.getCurrentDimension();
            Vector2 stringPosition = Vector2.Zero;
            spriteBatch.DrawString(defaultFont14, "{", stringPosition, Color.White);
            stringPosition.X += defaultFont14.MeasureString("{").X;

            string startingPoint = position.GetPosition(0).ToString();
            spriteBatch.DrawString(defaultFont14, startingPoint, stringPosition, getIndexColour(0, getPlayerDimension));
            stringPosition.X += defaultFont14.MeasureString(startingPoint).X;

            for (int i = 1; i < dimensionalManager.GetNumberOfActiveDimensions(); ++i)
            {
                string point = ", " + position.GetPosition(i).ToString();
                spriteBatch.DrawString(defaultFont14, point, stringPosition, getIndexColour(i, getPlayerDimension));
                stringPosition.X += defaultFont14.MeasureString(point).X;
            }

            spriteBatch.DrawString(defaultFont14, "}", stringPosition, Color.White);
        }