mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-07-02 19:13:43 -04:00
- Improvements for 2.5 release. Alot more work than I expected.
- Examples are out of date and will need to be regenerated before release.
This commit is contained in:
117
README.md
117
README.md
@ -1,55 +1,62 @@
|
||||

|
||||
|
||||
# Raylib-cs
|
||||
|
||||
C# bindings for raylib, a simple and easy-to-use library to learn videogames programming (www.raylib.com)
|
||||
|
||||
# Installation
|
||||
So far, I have only tested on Windows. Tips on making things work smoothly on all platforms is appreciated.
|
||||
|
||||
1. Add the [nuget package](https://www.nuget.org/packages/Raylib-cs/)
|
||||
2. Start coding!
|
||||
|
||||
```csharp
|
||||
using Raylib;
|
||||
using rl = Raylib.Raylib;
|
||||
|
||||
static class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
rl.InitWindow(640, 480, "Hello World");
|
||||
|
||||
while (!rl.WindowShouldClose())
|
||||
{
|
||||
rl.BeginDrawing();
|
||||
|
||||
rl.ClearBackground(Color.WHITE);
|
||||
rl.DrawText("Hello, world!", 12, 12, 20, Color.BLACK);
|
||||
|
||||
rl.EndDrawing();
|
||||
}
|
||||
|
||||
rl.CloseWindow();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# Tech notes
|
||||
- Enums are passed as `int` to prevent the need for explicit casts.
|
||||
- Color defines stored inside `Color`.
|
||||
- Uses `string.Format` in place of `TextFormat`.
|
||||
|
||||
# Extras
|
||||
- Structs have constructors.
|
||||
- Operator overloading for math types.
|
||||
|
||||
# Contributing
|
||||
If you have any ideas, feel free to open an issue and tell me what you think.
|
||||
If you'd like to contribute, please fork the repository and make changes as
|
||||
you'd like. Pull requests are warmly welcome.
|
||||
|
||||
If you want to [request features](https://github.com/raysan5/raylib/pulls) or [report bugs](https://github.com/raysan5/raylib/issues) related to the library (in contrast to this binding), please refer to the [author's project repo](https://github.com/raysan5/raylib).
|
||||
|
||||
# License
|
||||
raylib-cs (and raylib) is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.
|
||||

|
||||
|
||||
# Raylib-cs
|
||||
|
||||
C# bindings for raylib, a simple and easy-to-use library to learn videogames programming (www.raylib.com)
|
||||
|
||||
# Installation
|
||||
So far, I have only done a few tests on Windows and Linux.
|
||||
|
||||
## Package
|
||||
1. Install the [nuget package](https://www.nuget.org/packages/Raylib-cs/)
|
||||
|
||||
2. Start coding!
|
||||
|
||||
## Manual
|
||||
1. Copy or reference the bindings into your project. See Tests for reference.
|
||||
|
||||
2. Make sure your project finds the native library that matches your platform and configuration.
|
||||
|
||||
3. Start coding!
|
||||
|
||||
```csharp
|
||||
using Raylib;
|
||||
using rl = Raylib.Raylib;
|
||||
|
||||
static class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
rl.InitWindow(640, 480, "Hello World");
|
||||
|
||||
while (!rl.WindowShouldClose())
|
||||
{
|
||||
rl.BeginDrawing();
|
||||
|
||||
rl.ClearBackground(Color.WHITE);
|
||||
rl.DrawText("Hello, world!", 12, 12, 20, Color.BLACK);
|
||||
|
||||
rl.EndDrawing();
|
||||
}
|
||||
|
||||
rl.CloseWindow();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# Tech notes
|
||||
- Enums are passed as `int` to prevent the need for explicit casts.
|
||||
- Color defines stored inside `Color`.
|
||||
- Uses `string.Format` in place of `TextFormat`.
|
||||
- Structs have constructors.
|
||||
- Operator overloads for math types.
|
||||
|
||||
# Contributing
|
||||
If you have any ideas, feel free to open an issue and tell me what you think.
|
||||
If you'd like to contribute, please fork the repository and make changes as
|
||||
you'd like. Pull requests are warmly welcome.
|
||||
|
||||
If you want to [request features](https://github.com/raysan5/raylib/pulls) or [report bugs](https://github.com/raysan5/raylib/issues) related to the library (in contrast to this binding), please refer to the [author's project repo](https://github.com/raysan5/raylib).
|
||||
|
||||
# License
|
||||
raylib-cs (and raylib) is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.
|
||||
|
Reference in New Issue
Block a user