Update TestGame
This commit is contained in:
@@ -14,9 +14,9 @@ public class TestGame : Game
|
|||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
_renderer = new StandardRenderer();
|
_renderer = new RaylibRenderer();
|
||||||
_audioBackend = new FmodAudioBackend();
|
_audioBackend = new FmodAudioBackend();
|
||||||
// _inputHandler = new RaylibInputHandler();
|
_inputHandler = new RaylibInputHandler();
|
||||||
|
|
||||||
_resourceManager.AddResourceSaverAssociation(new SerializedSceneSaver());
|
_resourceManager.AddResourceSaverAssociation(new SerializedSceneSaver());
|
||||||
|
|
||||||
@@ -70,37 +70,26 @@ public class TestGame : Game
|
|||||||
|
|
||||||
protected override void Ready()
|
protected override void Ready()
|
||||||
{
|
{
|
||||||
// _inputHandler!.AddInputMapping("play", new InputAction[] { new KeyInputAction(KeyboardKey.Spacebar) });
|
_inputHandler!.AddInputMapping("play", new InputAction[] { new KeyInputAction(KeyboardKey.Spacebar) });
|
||||||
// _inputHandler.AddInputMapping("sprint", new InputAction[] { new KeyInputAction(KeyboardKey.LeftShift) });
|
_inputHandler.AddInputMapping("sprint", new InputAction[] { new KeyInputAction(KeyboardKey.LeftShift) });
|
||||||
// _inputHandler.AddInputMapping("toggle_fullscreen", new InputAction[] { new KeyInputAction(KeyboardKey.F11) });
|
_inputHandler.AddInputMapping("toggle_fullscreen", new InputAction[] { new KeyInputAction(KeyboardKey.F11) });
|
||||||
|
|
||||||
// _scene!.AddLayer("World", _worldLayer!);
|
_scene!.AddLayer("World", _worldLayer!);
|
||||||
|
|
||||||
// _worldLayer!.AddEntity(new World());
|
_worldLayer!.AddEntity(new World());
|
||||||
// _worldLayer.AddEntity(new TestPlayer());
|
_worldLayer.AddEntity(new TestPlayer());
|
||||||
|
|
||||||
// _scene.AddLayer("UI", _uiLayer!);
|
_scene.AddLayer("UI", _uiLayer!);
|
||||||
// _scene.Start();
|
_scene.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Run()
|
protected override void Run()
|
||||||
{
|
{
|
||||||
while (_renderer.ShouldRun)
|
while (_scene.ShouldRun)
|
||||||
{
|
{
|
||||||
// _scene.Update();
|
_scene.Update();
|
||||||
|
_scene.BeginDraw();
|
||||||
// if (_inputHandler!.IsActionPressed("toggle_fullscreen"))
|
_scene.EndDraw();
|
||||||
// {
|
|
||||||
// _renderer!.Fullscreen = !_renderer.Fullscreen;
|
|
||||||
// _logger.Info($"Fullscreen: {_renderer.Fullscreen}");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// _scene.BeginDraw();
|
|
||||||
// _scene.EndDraw();
|
|
||||||
_renderer.BeginFrame();
|
|
||||||
// _renderer.ClearBackground(Color.Aqua);
|
|
||||||
// // _renderer.DrawRectangle(new Vector2(128, 128), Color.Black);
|
|
||||||
_renderer.EndFrame();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user