Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

draw rectangle monogame full code

# In The Public Class
Texture2D whiteRectangle;
# In LoadContent Funtion
whiteRectangle = new Texture2D(GraphicsDevice, 1, 1);
whiteRectangle.SetData(new[] { Color.White });
# In Draw Funtion
_spriteBatch.Begin();
_spriteBatch.Draw(whiteRectangle, new Rectangle(0, 0, 30, 30),Color.Chocolate);
_spriteBatch.End();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #draw #rectangle #monogame #full #code
ADD COMMENT
Topic
Name
7+8 =