mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-27 09:19:18 -05:00
Updated Visual Studio C# Setup (markdown)
@ -9,28 +9,28 @@ Setting up raylib in Visual Studio is very simple.
|
|||||||
|
|
||||||
A simple main program looks like this
|
A simple main program looks like this
|
||||||
|
|
||||||
`using System;`
|
```using System;
|
||||||
|
|
||||||
`using Raylib_cs;`
|
using Raylib_cs;
|
||||||
|
|
||||||
`namespace ConsoleApp`
|
namespace ConsoleApp
|
||||||
`{`
|
{
|
||||||
`class Program`
|
class Program
|
||||||
`{`
|
{
|
||||||
`static void Main(string[] args)`
|
static void Main(string[] args)
|
||||||
`{`
|
{
|
||||||
`Raylib.InitWindow(800, 600, "TEST");`
|
Raylib.InitWindow(800, 600, "TEST");
|
||||||
|
|
||||||
`while (!Raylib.WindowShouldClose())`
|
while (!Raylib.WindowShouldClose())
|
||||||
`{`
|
{
|
||||||
`Raylib.BeginDrawing();`
|
Raylib.BeginDrawing();
|
||||||
`Raylib.ClearBackground(Color.RAYWHITE);`
|
Raylib.ClearBackground(Color.RAYWHITE);
|
||||||
|
|
||||||
`Raylib.DrawText("Hello C# Window", 10, 10, 20, Color.RED);`
|
Raylib.DrawText("Hello C# Window", 10, 10, 20, Color.RED);
|
||||||
|
|
||||||
`Raylib.EndDrawing();`
|
Raylib.EndDrawing();
|
||||||
`}`
|
}
|
||||||
`Raylib.CloseWindow();`
|
Raylib.CloseWindow();
|
||||||
`}`
|
}
|
||||||
`}`
|
}
|
||||||
`}`
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user