Watch
2
0
Fork
You've already forked raylib-cs
0
C# bindings for raylib, a simple and easy-to-use library to learn videogames programming http://www.raylib.com/
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
ChrisDill be2acd3c9a Fixed DrawLineStrip issue from #44.
- Changed DrawLineStrip to take in a Vector2[] instead of ref Vector2 points.
2020-04-01 18:43:33 +01:00
.github/workflows Initial project update. 2020-04-01 14:35:26 +01:00
Generator Updating .csproj files to help with testing continuous integration. 2020-01-29 19:37:21 +00:00
Logo Added logos and updated readme 2018-09-13 12:00:51 +01:00
Raylib-cs Fixed DrawLineStrip issue from #44. 2020-04-01 18:43:33 +01:00
Tests Updated Tests project. 2020-04-01 17:24:54 +01:00
.gitignore - Improvements for 2.5 release. Alot more work than I expected. 2019-04-22 07:40:01 +01:00
app.config Initial project update. 2020-04-01 14:35:26 +01:00
LICENSE.md Updated project files. 2019-12-11 11:24:20 +00:00
netfx.props Initial project update. 2020-04-01 14:35:26 +01:00
Raylib-cs.sln Initial project update. 2020-04-01 14:35:26 +01:00
README.md Update README.md 2020-03-26 22:29:10 +00:00

Raylib-cs Logo

Raylib-cs

C# bindings for raylib 2.5, a simple and easy-to-use library to learn videogames programming (www.raylib.com)

UPDATE

Currently raygui and physac are a work in progress and are not easy to setup. I do not recommend using them at this time. I am also nearly ready to update the master branch with alot changes for raylib 3.0 so be prepared.

Installation

So far, I have only done a few tests on Windows and Linux.

  1. Add the bindings to your project. See the test projects for reference.

  2. Download the native libraries using the official 2.5 release.

  3. Make sure the native library matches the platform you are using and can be found in the search path. See https://www.mono-project.com/docs/advanced/pinvoke/ for more details.

  4. Start coding!

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

  • Certain funtions take a enum instead of a int such as IsKeyPressed.
  • Colors stored in the Color struct. RED changes to Color.RED
  • Uses string.Format instead of TextFormat.
  • Adds constructors for structs.
  • Adds operator overloads for math structs.

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 or report bugs related to the library (in contrast to this binding), please refer to the author's project repo.

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 for further details.