11// <copyright file="GameContainerBase.cs" company="Software Antics">
2- // Copyright (c) Software Antics. All rights reserved.
2+ // Copyright (c) Software Antics. All rights reserved.
33// </copyright>
44
55namespace FinalEngine . Runtime ;
66
77using System ;
8+ using System . Drawing ;
89using FinalEngine . ECS ;
10+ using FinalEngine . Input . Controllers ;
911using FinalEngine . Input . Keyboards ;
1012using FinalEngine . Input . Mouses ;
1113using FinalEngine . Platform ;
@@ -22,6 +24,7 @@ protected GameContainerBase()
2224 this . Window = ServiceLocator . Provider . GetRequiredService < IWindow > ( ) ;
2325 this . Keyboard = ServiceLocator . Provider . GetRequiredService < IKeyboard > ( ) ;
2426 this . Mouse = ServiceLocator . Provider . GetRequiredService < IMouse > ( ) ;
27+ this . Controller = ServiceLocator . Provider . GetRequiredService < IGameController > ( ) ;
2528 this . RenderDevice = ServiceLocator . Provider . GetRequiredService < IRenderDevice > ( ) ;
2629 this . ResourceManager = ServiceLocator . Provider . GetRequiredService < IResourceManager > ( ) ;
2730 this . Drawer = ServiceLocator . Provider . GetRequiredService < ISpriteDrawer > ( ) ;
@@ -41,6 +44,8 @@ protected GameContainerBase()
4144 this . Dispose ( false ) ;
4245 }
4346
47+ protected IGameController Controller { get ; private set ; }
48+
4449 protected ISpriteDrawer Drawer { get ; private set ; }
4550
4651 protected bool IsDisposed { get ; private set ; }
@@ -78,6 +83,7 @@ public virtual void LoadContent()
7883
7984 public virtual void Render ( float delta )
8085 {
86+ this . RenderDevice . Clear ( Color . CornflowerBlue ) ;
8187 this . World . ProcessAll ( GameLoopType . Render ) ;
8288 }
8389
0 commit comments