Raylib bindings/wrapper to nelua language
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
André Luiz Alvares 45fd1f8c59 array out of bounds fix 3 months ago
examples array out of bounds fix 3 months ago
.gitignore first commit, with basic window example working :) 5 months ago
LICENSE MPL License 5 months ago
README.md using "input keys" example on README 4 months ago
raylib.nelua actually, camera and gestures are already binded 3 months ago

README.md

raylib-nelua

This is a Raylib wrapper for Nelua language

Example

    -- moves raylib.nelua file to your project
    require 'raylib'

    local screenWidth: integer <comptime> = 800
    local screenHeight: integer <comptime> = 450
    local ballPosition: Vector2 = {x = screenWidth/2, y = screenHeight/2}

    Raylib.InitWindow(screenWidth, screenHeight, "raylib [core] example - keyboard input")
    Raylib.SetTargetFPS(60)

    while (not Raylib.WindowShouldClose()) do
        if Raylib.IsKeyDown(KeyboardKey.RIGHT) then
            ballPosition.x = ballPosition.x + 2.0
        end
        if Raylib.IsKeyDown(KeyboardKey.LEFT) then
            ballPosition.x = ballPosition.x - 2.0
        end
        if Raylib.IsKeyDown(KeyboardKey.UP) then
            ballPosition.y = ballPosition.y - 2.0
        end
        if Raylib.IsKeyDown(KeyboardKey.DOWN) then
            ballPosition.y = ballPosition.y + 2.0
        end

        Raylib.BeginDrawing()
            Raylib.ClearBackground(RaylibColors.Raywhite)
            Raylib.DrawText("move the ball with arrow keys", 10, 10, 20, RaylibColors.Darkgray)
            Raylib.DrawCircleV(ballPosition, 50, RaylibColors.Maroon)
        Raylib.EndDrawing()
    end

    Raylib.CloseWindow()