mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-06-30 19:03:42 -04:00
Moved example menu
- Menu for example removed from Test projects and moved to exampes. - Changed nativeLibName from raylib.dll to raylib. It should find the correct one this way but might need a dll.config file.
This commit is contained in:
@ -1,35 +1,11 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Raylib;
|
||||
using static Raylib.Raylib;
|
||||
|
||||
|
||||
namespace Test.NetCore
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Welcome to raylib-cs!");
|
||||
|
||||
var dir = Environment.CurrentDirectory;
|
||||
while (true)
|
||||
{
|
||||
Console.WriteLine("Select raylib example(core/core_2d_camera)");
|
||||
|
||||
var filePath = Console.ReadLine();;
|
||||
Console.WriteLine("Running example " + filePath + "...");
|
||||
|
||||
dir = Directory.GetParent(dir).FullName;
|
||||
dir = Directory.GetParent(dir).FullName;
|
||||
dir = Directory.GetParent(dir).FullName;
|
||||
dir = Directory.GetParent(dir).FullName;
|
||||
dir += "\\Examples\\";
|
||||
|
||||
var folder = dir + Path.GetDirectoryName(filePath);
|
||||
ChangeDirectory(folder);
|
||||
Type.GetType(filePath)?.GetMethod("Main")?.Invoke(null, args);
|
||||
Console.WriteLine();
|
||||
}
|
||||
Examples.Test.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user