add examples project
This commit is contained in:
parent
1df4b9b395
commit
34bfcd0729
5 changed files with 93 additions and 0 deletions
4
Raylib-cs.Examples.Desktop/Program.cs
Normal file
4
Raylib-cs.Examples.Desktop/Program.cs
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
using Raylib_cs.Examples;
|
||||||
|
|
||||||
|
using (var samples = new Samples())
|
||||||
|
samples.Run();
|
||||||
15
Raylib-cs.Examples.Desktop/Raylib-cs.Examples.Desktop.csproj
Normal file
15
Raylib-cs.Examples.Desktop/Raylib-cs.Examples.Desktop.csproj
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<RootNamespace>Raylib_cs.Examples.Desktop</RootNamespace>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="../Raylib-cs.Examples/Raylib-cs.Examples.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
14
Raylib-cs.Examples/Raylib-cs.Examples.csproj
Normal file
14
Raylib-cs.Examples/Raylib-cs.Examples.csproj
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<RootNamespace>Raylib_cs.Examples</RootNamespace>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="../Raylib-cs/Raylib-cs.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
32
Raylib-cs.Examples/Samples.cs
Normal file
32
Raylib-cs.Examples/Samples.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
namespace Raylib_cs.Examples;
|
||||||
|
|
||||||
|
public sealed class Samples : IDisposable
|
||||||
|
{
|
||||||
|
public Samples()
|
||||||
|
{
|
||||||
|
Raylib.InitWindow(800, 450, nameof(Samples));
|
||||||
|
Raylib.SetTargetFPS(60);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Run()
|
||||||
|
{
|
||||||
|
while (!Raylib.WindowShouldClose())
|
||||||
|
{
|
||||||
|
Raylib.BeginDrawing();
|
||||||
|
Raylib.ClearBackground(Color.RAYWHITE);
|
||||||
|
Raylib.DrawText(
|
||||||
|
"Congrats! You created your first window!",
|
||||||
|
190,
|
||||||
|
200,
|
||||||
|
20,
|
||||||
|
Color.LIGHTGRAY
|
||||||
|
);
|
||||||
|
Raylib.EndDrawing();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Raylib.CloseWindow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-cs", "Raylib-cs\Rayl
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raylib-cs.Tests", "Raylib-cs.Tests\Raylib-cs.Tests.csproj", "{523DEE6A-20CD-47AB-94A6-8D3C3CF9ADAD}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raylib-cs.Tests", "Raylib-cs.Tests\Raylib-cs.Tests.csproj", "{523DEE6A-20CD-47AB-94A6-8D3C3CF9ADAD}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-cs.Examples", "Raylib-cs.Examples\Raylib-cs.Examples.csproj", "{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-cs.Examples.Desktop", "Raylib-cs.Examples.Desktop\Raylib-cs.Examples.Desktop.csproj", "{0C6DD775-B5D5-400B-82EA-D48DFEBED202}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|
@ -25,6 +29,30 @@ Global
|
||||||
{523DEE6A-20CD-47AB-94A6-8D3C3CF9ADAD}.Release|Any CPU.Build.0 = Release|Any CPU
|
{523DEE6A-20CD-47AB-94A6-8D3C3CF9ADAD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{523DEE6A-20CD-47AB-94A6-8D3C3CF9ADAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{523DEE6A-20CD-47AB-94A6-8D3C3CF9ADAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{523DEE6A-20CD-47AB-94A6-8D3C3CF9ADAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{523DEE6A-20CD-47AB-94A6-8D3C3CF9ADAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{EE8D1328-A59D-42A8-877C-1F71BBCBD0DE}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{0C6DD775-B5D5-400B-82EA-D48DFEBED202}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue