-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
32 lines (28 loc) · 885 Bytes
/
Program.cs
File metadata and controls
32 lines (28 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Raylib_cs;
using Shnake.Services;
namespace Shnake;
public static class Program
{
public static void Main()
{
// Initialisation de la fenêtre
Raylib.InitWindow(GameController.WindowWith, GameController.WindowHeight, "Shnake");
// Définir le taux de rafraîchissement (facultatif)
Raylib.SetTargetFPS(60);
// Boucle principale du jeu
while (!Raylib.WindowShouldClose())
{
var dt = Raylib.GetFrameTime();
// Mise à jour (logique du jeu ici)
SceneManager.Instance.Update(dt);
AudioManager.Instance.Update();
// Dessin
Raylib.BeginDrawing();
SceneManager.Instance.Draw();
Raylib.EndDrawing();
}
ShutdownManager.UnloadAll();
// Fermeture de la fenêtre
Raylib.CloseWindow();
}
}