예제 #1
0
 /// <summary>
 /// Draws the view
 /// </summary>
 /// <param name="batch">Sprite Batch</param>
 /// <param name="textures">Textures</param>
 public void Draw(SpriteBatch batch, TextureLib textures)
 {
     batch.Draw(textures[view.GetIndentAsset(Team)], Rect, Color);
     if (HasMarble)
     {
         batch.Draw(textures[view.GetMarbleAsset(Team)], Rect, Color);
     }
 }
예제 #2
0
        /// <summary>
        /// Draws the view of the marble
        /// </summary>
        /// <param name="batch">Sprite Batch</param>
        /// <param name="textures">Textures</param>
        public void Draw(SpriteBatch batch, TextureLib textures)
        {
            int marbleWidth  = (int)(boardView.View.Width / 29.166666666666666666666666666667);
            int marbleHeight = (int)(boardView.View.Height / 29.166666666666666666666666666667);

            string asset = boardView.GetMarbleAsset(Team);

            if (dragging)
            {
                batch.Draw(textures[asset], new Rectangle((int)dragPosition.X - 14, (int)dragPosition.Y - 14, marbleWidth, marbleHeight), Color.White);
            }
            else
            {
                batch.Draw(textures[asset], new Rectangle((int)position.X, (int)position.Y, marbleWidth, marbleHeight), Color.White);
            }
        }