Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

raylib c#

using Raylib_cs;
using static Raylib_cs.Raylib;
using static Raylib_cs.Color;

namespace Examples
{
    public class core_basic_window
    {
        public static int Main()
        {
            // Initialization
            //--------------------------------------------------------------------------------------
            const int screenWidth = 800;
            const int screenHeight = 450;

            InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");

            SetTargetFPS(60);
            //--------------------------------------------------------------------------------------

            // Main game loop
            while (!WindowShouldClose())    // Detect window close button or ESC key
            {
                // Update
                //----------------------------------------------------------------------------------
                // TODO: Update your variables here
                //----------------------------------------------------------------------------------

                // Draw
                //----------------------------------------------------------------------------------
                BeginDrawing();
                ClearBackground(RAYWHITE);

                DrawText("Congrats! You created your first window!", 190, 200, 20, MAROON);

                EndDrawing();
                //----------------------------------------------------------------------------------
            }

            // De-Initialization
            //--------------------------------------------------------------------------------------
            CloseWindow();        // Close window and OpenGL context
            //--------------------------------------------------------------------------------------

            return 0;
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# turn negative number into positive 
Csharp :: unity audio manager 
Csharp :: unity c# get direction of object 
Csharp :: c# swtich 
Csharp :: billboard canvas unity 
Csharp :: sequelize count all 
Csharp :: C# program that joins List of strings 
Csharp :: public gameobject unity 
Csharp :: c# console print 
Csharp :: C# default value for datetime parameter 
Csharp :: how to save a dictionary as a csv file in c# 
Csharp :: c# empty list 
Csharp :: 2d list c# 
Csharp :: c# dictionary keys to list 
Csharp :: vector2 with switch statement 
Csharp :: top level statements c# 
Csharp :: get what week of the month c# 
Csharp :: c# add button to messagebox 
Csharp :: unity class 
Csharp :: hwo to prevent rotation after hitting an object in unity 
Csharp :: c# select a row from datagridview by value 
Csharp :: c# create array with n elements 
Csharp :: unity set sprite image from script 
Csharp :: rotate gameobject unity 
Csharp :: unity banner Ad position 
Csharp :: unity yield return 
Csharp :: how to type to console in unity 
Csharp :: switch case with 2 variables c# 
Csharp :: autofac .net core 6 
Csharp :: which game engine is best 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =